Skip to content

2422 Enhance the pixdim of spacing transform#2423

Merged
Nic-Ma merged 12 commits into
Project-MONAI:devfrom
Nic-Ma:2422-enhance-pixdim-spacing
Jun 23, 2021
Merged

2422 Enhance the pixdim of spacing transform#2423
Nic-Ma merged 12 commits into
Project-MONAI:devfrom
Nic-Ma:2422-enhance-pixdim-spacing

Conversation

@Nic-Ma

@Nic-Ma Nic-Ma commented Jun 23, 2021

Copy link
Copy Markdown
Contributor

Fixes #2422 .

Description

This PR added support to use original pixdim in Spacing transform, also fixed a minor issue when using 1 single float number for all the dims. According to the test case:
https://github.com/Project-MONAI/MONAI/blob/dev/tests/test_spacing.py#L151
it should expand the float number to all dims, but we actually used 1.0 or the original pixdim to pad for this case:
https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/spatial/array.py#L174

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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Comment thread monai/transforms/spatial/array.py
Comment thread monai/transforms/spatial/array.py Outdated
Comment thread monai/data/utils.py
Nic-Ma added 4 commits June 23, 2021 14:58
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma Nic-Ma marked this pull request as ready for review June 23, 2021 07:46
@Nic-Ma Nic-Ma changed the title [WIP] 2422 Enhance the pixdim of spacing transform 2422 Enhance the pixdim of spacing transform Jun 23, 2021
Signed-off-by: Nic Ma <nma@nvidia.com>
Comment thread monai/transforms/spatial/array.py Outdated
Nic-Ma added 2 commits June 23, 2021 23:29
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Jun 23, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma Nic-Ma enabled auto-merge (squash) June 23, 2021 15:45
@Nic-Ma Nic-Ma merged commit 2464199 into Project-MONAI:dev Jun 23, 2021
@Nic-Ma Nic-Ma deleted the 2422-enhance-pixdim-spacing branch July 2, 2021 23:36
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.

3 participants