Skip to content

Change to EnsureChannelFirst to include behaviour from deprecated transforms#4842

Merged
wyli merged 4 commits intoProject-MONAI:devfrom
ericspod:ensurechannelfirst_change
Aug 5, 2022
Merged

Change to EnsureChannelFirst to include behaviour from deprecated transforms#4842
wyli merged 4 commits intoProject-MONAI:devfrom
ericspod:ensurechannelfirst_change

Conversation

@ericspod
Copy link
Copy Markdown
Member

@ericspod ericspod commented Aug 5, 2022

Signed-off-by: Eric Kerfoot [email protected]

Description

EnsureChannelFirst should be used in place of AddChannel, however it requires that metadata be provided as MetaTensor inputs or separate dictionaries. This doesn't substitute for AddChannel which required neither of these things and so can't be used in the situation where one has data known to have no channel dimension nor metadata and we just want to hard-code adding a 1-sized channel dimension. This is useful in a lot of examples that use generated data and not loaded files that come with metadata, and avoids forcing the user to use MetaTensor.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma Nic-Ma requested a review from KumoLiu August 5, 2022 13:47
ericspod and others added 3 commits August 5, 2022 15:02
@ericspod ericspod requested review from Nic-Ma, rijobro and wyli August 5, 2022 15:47
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Aug 5, 2022

/build

@wyli wyli enabled auto-merge (squash) August 5, 2022 16:45
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Aug 5, 2022

/build

@wyli wyli merged commit 9901824 into Project-MONAI:dev Aug 5, 2022
@ericspod ericspod deleted the ensurechannelfirst_change branch August 8, 2022 17:33
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.

4 participants