[Insight-users] itk::OrientImageFilter

Xavier Planes xplanes at cistib.upf.edu
Mon Feb 2 12:28:56 EST 2009


Thanks Bill, I've read that itk orientation names are the opposite of DICOM orientation names. The real input image orientations I've tried are LPS (itk is RAI) and LIP (itk is RSA) and the real output image orientation I would like to get is RAI (itk is LPS). However, I think the problem is not in the output orientation I set to the filter because for the two input DICOM images I've tried, the output image had different orientation between them. (sorry, in my first email ALL orientation names are in itk orientation letter notation).

-----Original Message-----
From: Bill Lorensen [mailto:bill.lorensen at gmail.com] 
Sent: lunes, 02 de febrero de 2009 16:27
To: Xavier Planes
Cc: insight-users at itk.org
Subject: Re: [Insight-users] itk::OrientImageFilter

I think the OrientImageFIlter's letter notation is the opposite of the
DICOM orientations.

Instead of LPS, try RAI.

Bill
On Mon, Feb 2, 2009 at 10:01 AM, Xavier Planes <xplanes at cistib.upf.edu> wrote:
> Hi,
>
>
>
>                 I've tried to use the filter itk::OrientImageFilter. I've
> read a several documentation about DICOM orientation standards, tried some
> source code examples and read several emails in the mailing list without
> success...  . My main goal is to be able to transform the DICOM volume image
> that can be in any DICOM orientation (LPS, RAS, RAI, LPI, ...) to an itk
> Volume image always oriented in the same way (for example LPS).
>
>
>
>                 I've tried this code:
>
>
>
>                 typedef itk::OrientedImage<dcmAPI::PixelType, 3>
> OrientedVolumeType;
>
>                 typedef itk::ImageSeriesReader< OrientedVolumeType >
> VolumeReader;
>
>
>
>                 VolumeReader::Pointer volumeReader = VolumeReader::New();
>
>                 itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();
>
>                 volumeReader->SetImageIO( dicomIO );
>
>                 volumeReader->SetFileNames( sliceFilePaths );
>
>                 volumeReader->Update();
>
>                 OrientedVolumeType::Pointer volume =
> volumeReader->GetOutput();
>
>
>
> itk::OrientImageFilter<VolumeType,VolumeType>::Pointer orienter =
> itk::OrientImageFilter<VolumeType,VolumeType>::New();
>
>                 orienter->UseImageDirectionOn();
>
>                 orienter->SetDesiredCoordinateOrientation(
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_LPS);
>
>                 orienter->SetInput(volume);
>
>                 orienter->Update();
>
>
>
>                 It works fine with RAI input image orientation. However, it
> doesn't work for RSA input image orientation because the output image is not
> in LPS orientation. I've used VolView to check that the input images are
> correct and it works fine: the VTK output image is always in the same
> orientation.
>
>
>
> I've also debugged a little bit with DICOM RSA input orientation. The
> itk::OrientImageFilter does this steps:
>
> 1.       RSA -> RAS. Permute Y And Z axis
>
> 2.       RAS -> LAS. Flip X axis
>
> 3.       LAS -> LPS. Flip Y axis
>
> However the output is not correct. It seems that when input image is
> permuted (Y and Z axis), the orientation of the third axis is also
> indirectly flipped (X). So after the permute filter, the image orientation
> is not RAS, as it was expected by the filter.
>
>
>
> I was thinking to create a table for permutation and flipping parameters
> depending on each orientation. However I don't have sample DICOM data for
> all the possible orientations.
>
>
>
> Has anybody tried this filter? Has anybody tried RSA orientation input
> image? Do you know what input image orientations have been tried?
>
>
>
> Thanks!
>
> Xavi
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.233 / Virus Database: 270.10.10/1903 - Release Date: 2/1/2009 6:02 PM


More information about the Insight-users mailing list