[Insight-users] Regarding OrientImagefilter
Vincent A. Magnotta
vincent-magnotta at uiowa.edu
Thu, 04 Mar 2004 08:07:59 -0600
Srivalli,
There are a couple of things to note about your code. First the
fileOrientation value is never set. The filter needs both the original
orientation and the final orientation set to determine the permutations
and flips that are required to change the image orientation. The second
area of caution is the use of GetMetaDataDictionary() method.
Currently, only the Analyze image reader fills in values in the
MetaDataDictionary for other file readers you need to define the
fileOrientation manually or with a command line parameter to your
program.
Vince
On Wed, 2004-03-03 at 23:29, valli gummadi wrote:
> Hi All,
>
> I want convert SPECt image from Axial view to Coronal view.
> I used the class itkOrinetImageFilter. But, I am getting blan output.
> Can anybody tell me the correct usage of the class.
>
> I am enclosing the code snippet.
>
> typedef itk::OrientImageFilter<FixedImageType, FixedImageType> OrientImage;
> OrientImage::Pointer objOrient = OrientImage::New();
>
> itk::SpatialOrientation::ValidCoordinateOrientationFlags fileOrientation;
> itk::ExposeMetaData<itk::SpatialOrientation::ValidCoordinateOrientationFlags>
> (ITKImage->GetMetaDataDictionary(),itk::ITK_CoordinateOrientation,fileOrientation);
>
> objOrient->SetInput( ITKImage );
> objOrient->SetGivenCoordinateOrientation(fileOrientation);
> objOrient->SetDesiredCoordinateOrientation
> (itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP);
> objOrient->Update();
>
>
> ITKImage is the input image.
>
>
> Thanks,
> Regards,
> Srivalli.
>
--
Assistant Professor
Department of Radiology
0437 JCP
E-mail: vincent-magnotta at uiowa.edu
Phone: 319-356-8255
Fax: 319-353-6275
Website: http://www.radiology.uiowa.edu