-
Notifications
You must be signed in to change notification settings - Fork 3
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
resizing an image while retaining physical location. #13
Conversation
@zivy This does not appear to be a general "resize" method. |
@blowekamp, you are correct. This resize keeps the original physical aspect ratio and makes the image isotropic. Function name should reflect this, but I think it is a useful function. Would appreciate any ideas you have for a better function name (it's harder to get the name right than the implementation). |
@zivy We could have many function for different things, or functions with parameters to control behavior. From #4 I said:
There should be a argument added "preserve_physical_ratio". The current configuration would be when We can add parameterization for the interpolator and antialiasing strategy later. |
ef9f997
to
8fbbf64
Compare
interpolator=sitk.sitkLinear, | ||
fill_value: float = 0.0, | ||
use_nearest_extrapolator: bool = False, | ||
anti_aliasing_sigma: Union[None, float, Sequence[float]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expected the default for anti_aliasing_sigma to be 0, no antialiasing. The value of None results in antialiasing with a default sigma.
Possibly change to 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resize method is a high level turn key method which automatically configures the itk resample filter to produce a good quality image. Enabling antialiasing by default follows this intention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Makes sense given the intended turnkey aspect of the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a test with a 3d image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All comments have been resolved.
resolves #4