[Insight-users] How to Set Output Origin and Output Region in ResampleImageFilter When Resampling For a Different Direction?
Luis Ibanez
luis.ibanez at kitware.com
Wed May 20 23:33:29 EDT 2009
Hi Kon,
You want to
A) take the indexes of the input image corners,
B) convert them to physical point coordinates,
C) Transform them using the Transform.
D) get the maximum and minimum values along each dimension
E) Use all the minima to compose the origin coordinates
F) Use all the maxima minus the minima, divided by the
output image spacing, in order to compute the output
image size
Regards,
Luis
-----------
Kon Z wrote:
> Hello ALL.
>
> I realise that the output image region is likely to become larger then
> the input region when using ResampleImageFilter to resample an image
> with a new direction and I would like to have all original image data to
> be included in the output region.
>
> Also while in the input image the (0,0,0) index is at the position of
> the image origin, in the output image the origin needs to be set with
> the new direction in mind.
>
> What is the correct way of calculating the output region (for calling
> SetSize()) and output origin (for calling SetOutputOrigin()) when using
> ResampleImageFilter to resample an image with a new direction?
>
> Regards,
> Kon
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list