[Insight-users] Coronal Orientation MIPAV Analyze Format

paniwani paniwani at gmail.com
Tue Jan 11 17:06:51 EST 2011


Hello,

I have a CT colon dataset of DICOM images in the default LPS "Axial"
orientation, as far as I can tell, when viewing the images with MIPAV. My
normal approach is to first convert the dataset into an ANALYZE .img and
.hdr file and then continue the rest of my code on that file. My problem
occurs when I allocate new images from scratch. The new images have a
coronal orientation, and when testing for a centroid using label maps, I
found the order of axes to be [X, Z, Y]. I would like the newly allocated
images to be the in the original orientation [X, Y, Z]. 

I attempted to use the OrientImageFilter to set the desired orientation to
ITK_COORDINATE_ORIENTATION_LPS, but after doing so, neither the orientation
attribute in MIPAV nor the centroid ordering was changed. How do I go about
properly allocating new images such that they have the same proper
orientation as the original dataset, which I assume is LPS. Is this a
problem because I'm using the ANALYZE format?

Thanks in advance.

Here is some code to explain my approach. The "threshold.hdr" has a coronal
orientation that I can't seem to fix.

// Setup IO
typedef itk::ImageFileReader< ImageType3D > ReaderType;
typedef itk::ImageFileWriter< ImageType3D > WriterType;
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();

reader->SetFileName( "C:/ImageData/dataset.hdr" );
reader->Update();

ImageType3D::Pointer input = reader->GetOutput();
IteratorType inputIt( input, input->GetLargestPossibleRegion() );

writer->SetFileName( "input.hdr" );
writer->SetInput( input );
writer->Update();

// Threshold to detect bone
ScalarImageType3D::Pointer threshold = ScalarImageType3D::New();
threshold->SetRegions( input->GetLargestPossibleRegion() );
threshold->Allocate();
ScalarIteratorType thresholdIt( threshold, input->GetLargestPossibleRegion()
);

for (	inputIt.GoToBegin(), thresholdIt.GoToBegin();
		!inputIt.IsAtEnd() && !thresholdIt.IsAtEnd();
		++inputIt, ++thresholdIt		) 
{
	if ( inputIt.Get() >= 200 )		{ thresholdIt.Set( 1 ); }
	else							{ thresholdIt.Set( 0 ); }
}

writer->SetFileName( "threshold.hdr" );
writer->SetInput( threshold );
writer->Update();
-- 
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Coronal-Orientation-MIPAV-Analyze-Format-tp5912637p5912637.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list