SetShrinkFactorsPerLevel anisotropically

Is there a way to set shrink factors anisotropically? This would be for cases when one dimension of an image is much thinner than the others so it doesn’t need as much shrinking.
In Simple ITK it doesn’t work to pass SetShrinkFactorsPerLevel a sub list/tuple of shrink factors for each dimension.

registration_method = sitk.ImageRegistrationMethod()
registration_method.SetShrinkFactorsPerLevel([(16, 8, 16), (8, 4, 8), (2,1,2)])

only registration_method.SetShrinkFactorsPerLevel([16, 8, 2]) works so each dimension is shank by the same amount at each level.

For the above case of wanting: [(16, 8, 16), (8, 4, 8), (2,1,2)] shrink factor, the XZ dimensions can be reduced outside the registration framework then processed by the frame work.

For other shrink sequences, separate registration can be done for each level.


Hello @ktdiedrich,

This jupyter notebook illustrates how to create such a pyramid with the flexibility you want. Specifically the smooth_and_resample and multiscale_demons functions.