[Insight-users] Analyze Image Orientation (Again)
Perhavc
J.Perhavc at student.tudelft.nl
Mon Mar 26 03:22:13 EST 2007
Hey Geoff!
You should use your image orienter in the pipeline, meaning that you need to insert it into the whole process. For now you only set the parameters, but you do not end up using the results. To be more specific, you set the input to the orienter correctly, but then you should use the output of it as the input to your writer. As an example look at the code below. You might need to modify it a bit, but the idea is there:
caster->SetInput(resampler->GetOutput());
outputImageOrienter->SetInput(caster->GetOutput(););
outputImageOrienter->SetUseImageDirection(true);
outputImageOrienter->SetDesiredCoordinateOrientation(itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RPI);
writer->SetInput( outputImageOrienter->GetOutput() );
I hope this will work.... Oh, another thing. I believe you dont need to set the orientation at the beginning when you read the file. Setting the orientation for the output image should be enough I guess.
Jernej
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3190 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070326/ca319b0a/attachment.bin
More information about the Insight-users
mailing list