Skip to content

5206 channel_dim param has higher priority in EnsureChannelFirst #5208

Merged
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:5206-ensure-channel
Sep 25, 2022
Merged

5206 channel_dim param has higher priority in EnsureChannelFirst #5208
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:5206-ensure-channel

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented Sep 24, 2022

Signed-off-by: Wenqi Li [email protected]

Fixes #5206

Description

changes to EnsureChannelFirst so that the input channel_dim has a higher priority than metatensor.meta['original_channel_dim']

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.

@wyli wyli changed the title 5206 channel_dim param has higher priority 5206 channel_dim param has higher priority in EnsureChannelFirst Sep 24, 2022
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Sep 24, 2022

this will break the use case of a vanilla array input when channel_dim is not specified. previously, the default value was no_channel, after this PR it'll be a ValueError Metadata not available and channel_dim=None, EnsureChannelFirst is not in use. I think the error message is clear enough for the user to update the previous code.

@wyli wyli marked this pull request as ready for review September 24, 2022 20:27
Signed-off-by: Wenqi Li <[email protected]>
@wyli
Copy link
Copy Markdown
Contributor Author

wyli commented Sep 25, 2022

/build

@wyli wyli merged commit 7f16a15 into Project-MONAI:dev Sep 25, 2022
@wyli wyli deleted the 5206-ensure-channel branch September 25, 2022 19:46
wyli added a commit that referenced this pull request Oct 24, 2022
…5208)

Signed-off-by: Wenqi Li <[email protected]>

Fixes #5206

### Description
changes to `EnsureChannelFirst` so that the input `channel_dim` has a
higher priority than `metatensor.meta['original_channel_dim']`

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: Wenqi Li <[email protected]>
wyli added a commit that referenced this pull request Oct 24, 2022
…5208)

Signed-off-by: Wenqi Li <[email protected]>

Fixes #5206

### Description
changes to `EnsureChannelFirst` so that the input `channel_dim` has a
higher priority than `metatensor.meta['original_channel_dim']`

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: Wenqi Li <[email protected]>
KumoLiu pushed a commit that referenced this pull request Nov 2, 2022
…5208)

Signed-off-by: Wenqi Li <[email protected]>

Fixes #5206

### Description
changes to `EnsureChannelFirst` so that the input `channel_dim` has a
higher priority than `metatensor.meta['original_channel_dim']`

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
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.

EnsureChannelFirst behaves wrong when loading npy files

2 participants