[Insight-users] Problem with DICOM direction matrix
Jafari, Kourosh
kjafari at rad.hfh.edu
Mon Sep 5 02:46:44 EDT 2011
Anyone with the following experience?
________________________________________
From: insight-users-bounces at itk.org [insight-users-bounces at itk.org] On Behalf Of Jafari, Kourosh [kjafari at rad.hfh.edu]
Sent: Friday, September 02, 2011 4:14 AM
To: insight-users at itk.org
Subject: [Insight-users] Problem with DICOM direction matrix
Dear all,
I am reading a series of dicom images using itk v4. I need to correctly show axial, coronal, and sagittal planes regardless of the original orientation of the images. It seems that I need to use the direction matrix (or cosines) for this purpose. But no matter what the original orientation of my images is (axial, coronal or sagittal) the direction matrix is always identity. In other words, itk treats all images as axial. Does anybody know the reason?
Here is the piece of code that I use to print the direction matrix:
ImageType::DirectionType ImageOrientation = image->GetDirection();
std::cout<< ImageOrientation(0,0) << "," << ImageOrientation(0,1) << "," << ImageOrientation(0,2) << std::endl;
std::cout<< ImageOrientation(1,0) << "," << ImageOrientation(1,1) << "," << ImageOrientation(1,2) << std::endl;
std::cout<< ImageOrientation(2,0) << "," << ImageOrientation(2,1) << "," << ImageOrientation(2,2) << std::endl;
And this is what I always get:
1,0,0
0,1,0
0,0,1
My images are MR images accquired by a GE scanner. I get the following message for all images. Does it have anything to do with the above problem? (The folder has only dicom images.)
"No DICOM magic number found, but file appears to be DICOM."
Thanks a lot!
Kourosh
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list