Skip to content

748 replace AsChannelFirst as EnsureChannelFirst #812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

KumoLiu
Copy link
Contributor

@KumoLiu KumoLiu commented Jul 20, 2022

Signed-off-by: KumoLiu [email protected]

Fixes #748 .

Description

Replace AsChannelFirst as EnsureChannelFirst which is more robust.

Status

Work in progress

Checks

  • Notebook runs automatically ./runner [-p <regex_pattern>]

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@KumoLiu KumoLiu changed the title replace AsChannelFirst as EnsureChannelFirst 748 replace AsChannelFirst as EnsureChannelFirst Jul 20, 2022
@Nic-Ma
Copy link
Contributor

Nic-Ma commented Jul 20, 2022

Hi @wyli ,

@KumoLiu is trying to update all the tutorials for EnsureChannelFirst and run them to verify locally.
As you know, many tutorials may not be easy to set up the environment and run, I think maybe we should ask the PICs to update the AsChannelFirst and AddChannel of these tutorials when they update MetaTensor?
What do you think?

Thanks.

@wyli
Copy link
Contributor

wyli commented Jul 20, 2022

sure, I think we update the basics, these should be fine. Perhaps @KumoLiu could help add a warning message in AddChannel in the core codebase https://github.com/Project-MONAI/MONAI/blob/422cc6dcf5e7ba5243d5d585d632a7d54e0622e6/monai/transforms/utility/array.py#L176 with the metatensor we can identify some false cases now.

@wyli wyli enabled auto-merge (squash) July 21, 2022 05:07
@wyli wyli merged commit e31dd31 into Project-MONAI:main Jul 21, 2022
@KumoLiu KumoLiu deleted the replace-AsChannelFirstd-with-EnsureChannelFirstd branch July 21, 2022 05:10
boneseva pushed a commit to boneseva/MONAI-tutorials that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace AsChannelFirstd with EnsureChannelFirstd
3 participants