[Insight-users] A Q on OrientImageFilter
yaolu at engineering.uiowa.edu
yaolu at engineering.uiowa.edu
Wed Aug 3 16:41:41 EDT 2005
Hi, all,
I'm new here. I load a DICOM series of data and want to swich y and z axies.
That is: My input is coronal and I want to change them to axial. So I use
OrientImageFilter. But I didn't see it switch the y and z after the filting.
Could anybody tell me is there anything wrong with my code?
Thanks a lot!
Jenny
The following is related code:
itk::SpatialOrientation::ValidCoordinateOrientationFlags CoordinateOrientation;
itk::ExposeMetaData<itk::SpatialOrientation::ValidCoordinateOrientationFlags>
(m_Temp->GetMetaDataDictionary(),itk::ITK_CoordinateOrientation,CoordinateOrientation);
typedef itk::OrientImageFilter<ImageType,ImageType> OrientFilterType;
OrientFilterType::Pointer orienterfilter = OrientFilterType::New();
//orienterfilter->UseImageDirectionOn();
orienterfilter->SetGivenCoordinateOrientation(CoordinateOrientation);
orienterfilter->SetDesiredCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RAI);
orienterfilter->SetInput(m_Temp);
orienterfilter->Update();
m_Temp= orienterfilter->GetOutput();
More information about the Insight-users
mailing list