[Insight-users] Nifti vs Dicom orientation

Luis Ibanez luis.ibanez at kitware.com
Mon Apr 6 11:47:56 EDT 2009


Hi Antoine,

Could you please read the original DICOM series with ITK and
report the Direction that you get from the ITK image in that case ?



In this way we will be able to figure out if the problem is in


A) the conversion from DICOM to Nifti as processed by "dcm2nii"

                 or

B) the process of reading the nifti file with itkNiftiImageIo.


Please post to the list the Direction cosines that you obtain
when your read the original DICOM series with ITK.


    Thanks


          Luis


-----------------
On Mon, Apr 6, 2009 at 10:46 AM, Antoine DUCHAMPS
<antoine.duchamps at gmail.com> wrote:
> 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();
>
> }
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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