[Insight-users] itk::OrientImageFilter
Pascal
mastersofwar at yahoo.com
Mon Feb 2 10:44:00 EST 2009
Hi all,
I am faced with a problem
regarding the pasting or stitching of oblique images in a final volume.
For instance, suppose I have three images, each one oriented at Rx=[-5,
0, +5] degrees, how could I read these oriented images
and place all three in a common volume?
I am not certain that the OrientImageFilter can do these, even though it can allow us to use the following command:
orienter --> SetUseImageDirection( );
any insight on this would be appreciated.
Pascal
--- On Mon, 2/2/09, Bill Lorensen <bill.lorensen at gmail.com> wrote:
From: Bill Lorensen <bill.lorensen at gmail.com>
Subject: Re: [Insight-users] itk::OrientImageFilter
To: "Xavier Planes" <xplanes at cistib.upf.edu>
Cc: "insight-users at itk.org" <insight-users at itk.org>
Date: Monday, February 2, 2009, 10:27 AM
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
>
>
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090202/4d005306/attachment-0001.htm>
More information about the Insight-users
mailing list