[vtkusers] Image Orientation filter

Anja Ende anja.ende at googlemail.com
Tue Feb 26 02:11:06 EST 2008


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



More information about the vtkusers mailing list