[Insight-users] Problem with DICOM direction matrix
    Jafari, Kourosh 
    kjafari at rad.hfh.edu
       
    Fri Sep  2 04:14:16 EDT 2011
    
    
  
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
    
    
More information about the Insight-users
mailing list