[ITK-users] Smallest region containing the physical space covered by another image's region
Cyril Mory
cyril.mory at creatis.insa-lyon.fr
Fri Apr 10 06:02:19 EDT 2015
Hi ITK users,
I am preparing a patch for the itkWarpImageFilter, and I came to realize
that computing the requestedRegion of the inputs from the output's
requested region is non trivial.
- the displacement in the deformation field can be very large, in any
direction, ... therefore there is no choice but to load the full input
image into memory (unless we want to go through the whole deformation
field to evaluate the maximum displacement, but in a method like
GenerateInputRequestedRegion we do not want such heavy processing)
=> Input image's requested region should be the largest possible region
- the requested region in the deformation field, on the other hand, can
be computed. But it is not trivial. If the output and the DF have
identical information (spacing, origin, direction), then the requested
region in the DF should be copied from the output. If their information
differs, computing the requested region would require a method to
compute the smallest rectangular region that contains the physical space
covered by an other image's region, the other image having (potentially)
a different spacing, origin and/or direction. Does such a method exist
somewhere in ITK ?
Cyril
More information about the Insight-users
mailing list