[Insight-users] Extraction of a oriented subimage

Peter Cech pcech at vision.ee.ethz.ch
Tue Apr 4 06:26:57 EDT 2006


On Mon, Apr 03, 2006 at 18:25:42 -0700, Popa Teo wrote:
> Hi,
>   I think that  the transform in case of resample filter rotates the coordinate system of the output image .What I actually want is to cut an parallelogram from initial image not to cut a rectangule and then rotate it.
>   
> Maybe I should first rotate my input and then resample it with a desired subvolume(smaller size than inital image)-so i'm applying twice the resample filter once for rotate and second time for selecting a subvolume?

Are you using OrientedImage? If yes, it is enough to properly set
Direction (to specify rotation of the parallelogram) and
Origin/Spacing/Size (to specify position and size of the parallelogram)
of the output and ResampleImageFilter will do the right thing (it is
using identity transform by default).

Normal Image class ignores Direction matrix, so you need to specify
image rotation via SetTransform. As you already noticed, the transform
is from output image coordinates to input image coordinates.

Regards,
Peter Cech


More information about the Insight-users mailing list