[vtkusers] Re: Image Orientation filter

Anja Ende anja.ende at googlemail.com
Tue Feb 26 05:23:34 EST 2008


Apologies! Meant to send it to ITK list!

On 26/02/2008, Anja Ende <anja.ende at googlemail.com> wrote:
> Hi everyone,
>
> Just trying to figure out how to use the itk::OrientImageFilter but am
> having a bit of trouble understanding how it works.
>
> In VTK, when I wanted to flip an image, I simple played with the
> reslice cosine vectors as follows:
>
> double resliceAxes[9] = {1, 0, 0, 0, 1, 0, 0, 0, 1};
>
> int x ,y, z;
> x = y = z = -1;
>
> int acqOrientation = reader->GetAcquisitionOrientation();
> if (acqOrientation == AXIAL)
> {
>         reader->GetOrientation(x, y, z);
>         if (x == NIFTI_L2R)
>         {
>                  resliceAxes[0] = -1;
>          }
>
>           // account for different origin here as up/down is important!
>           if (y == A2P)
>           {
>                  resliceAxes[4] = -1;
>            }
>
>            if (z == NIFTI_S2I)
>            {
>                  resliceAxes[8] = -1;
>            }
> }
>
> Is it possible to do something similar iwith this filter? I see all
> these codes but am not sure how to combine them or what exactly they
> mean...
>
> So when you say ITK_COORDINATE_ORIENTATION_RIP: Does this mean x-axis
> is increasing to the right, y axis is increasing o the inferior and
> the z axis is increasing towards the posterior?
>
> Thanks,
> Anja
>


-- 
Cheers,

Anja



More information about the vtkusers mailing list