-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Allow a 0 value for output spacing when resampling
When resampling, allow the output spacing for any dimension to be set to 0 (the parameter 'resampledPixelSpacing' still needs to be a sequence of 3 elements, but the value of any element can be 0). Doing so will enable 'preserving' the original spacing, as 0 values are replaced with the original spacing for that dimension (original spacing of the mask). This way, it is possible to only resample in-plane (by setting the out-of-plane output spacing to 0). Additionally, move the check between original and resampled spacing to after the size check (no resampling over dimensions for which bounding box size = 1) and build in a tolerance (1e-5 + 1e-8 * abs(resampledspacing)). Finally, fix data type for resampled spacing in the validation schema for parameter files (change from integer to float).
- Loading branch information
Showing
3 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters