[Insight-users] Nifti vs Dicom orientation

Antoine DUCHAMPS antoine.duchamps at gmail.com
Mon Apr 6 10:46:52 EDT 2009


Hi all,

I have a DWI sequence (brain) acquired with a Siemens scanner in Dicom
format. After converting it to NIfTI with dcm2nii
(http://www.sph.sc.edu/comd/rorden/mricron/dcm2nii.html) I tried to read
it an recover the orientation by using ITK (I've copied the code below).
The matrix I obtain is the following:

 0.9997  0.0000  0.0252
 0.0002 -1.0000 -0.0072
-0.0252 -0.0072  0.9997
 
However, the transforation matrix in the Dicom header is

 0.9997  0.0000  0.0252
 0.0002  1.0000 -0.0072
-0.0252  0.0072  0.9997

If the Dicom image orientation is LPS, this means that the image
orientation in NIfTI is LAS (And not RAS as I believed). Could anybody
clarify this please? Are there several possible orientations in NIfTI?
If so, how can I know the specific image orientation?

Antoine.  


#include "itkImageFileReader.h"
#include "itkOrientedImage.h"

const unsigned int Dimension = 4;
typedef short PixelType;
typedef itk::OrientedImage<PixelType, Dimension> ImageType;
typedef ImageType::Pointer ImagePointerType;
typedef itk::ImageFileReader< ImageType > ReaderType;


int main(int argc, char* argv[])
{
	
  ImageType::Pointer image = ImageType::New();	

  ReaderType::Pointer reader = ReaderType::New();
  reader->SetFileName(argv[1]);
  reader->Update();
  
  image = reader -> GetOutput();
  std::cout << image->GetDirection() << std::endl; std::cout.flush();
  
}



More information about the Insight-users mailing list