[Insight-users] Wrong origin when reading a nifti image saved with MIPAV

Luis Ibanez luis.ibanez at kitware.com
Thu Oct 16 08:23:10 EDT 2008


Hi Elena,

This looks like a problem in MIPAV, not really an ITK problem.

If you are looking for applications for preprocessing images
you may want to look at:


     Slicer:   http://www.slicer.org/
     SNAP:     http://www.itksnap.org/


That are both build based on ITK and VTK.


What kind of pre-processing do you need to apply to these images ?


    Thanks


       Luis


-----------------------
Elena Faggiano wrote:
> Hi,
> 
> I have a CT image (series of images) in DICOM format and I read it with 
> DicomSeriesImageWrite, and I write a nifti file (.nii).
> Then I read the nifti image with an ImageFileReader and if I ask the 
> information about the DICOM image and the nifti image they are equal:
> 
> for the DICOM image:
> /OrientedImage (0x8f92fd0)
>   RTTI typeinfo:   itk::OrientedImage<short, 3u>
>   Reference Count: 1
>   Modified Time: 2592
>   Debug: Off
>   Observers:
>     none
>   Source: (0x8f908e8)
>   Source output index: 0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 18
>   UpdateMTime: 2593
>   LargestPossibleRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   BufferedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   Spacing: [1.36719, 1.36719, 2.5]
>   Origin: [-350, -350, -402]
>   Direction:
> 1 0 0
> 0 1 0
> 0 0 1
> 
>   PixelContainer:
>     ImportImageContainer (0x8f93188)
>       RTTI typeinfo:   itk::ImportImageContainer<//unsigned long, short>
>       Reference Count: 1
>       Modified Time: 66
>       Debug: Off
>       Observers:
>         none
>       Pointer: 0xb4d31008
>       Container manages memory: true
>       Size: 26476544
>       Capacity: 26476544/
> 
> for the NIFTI image:
>  /RTTI typeinfo:   itk::OrientedImage<short, 3u>
>   Reference Count: 1
>   Modified Time: 119
>   Debug: Off
>   Observers:
>     none
>   Source: (0xa1788e8)
>   Source output index: 0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 12
>   UpdateMTime: 120
>   LargestPossibleRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   BufferedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   Spacing: [1.36719, 1.36719, 2.5]
>   Origin: [-350, -350, -402]
>   Direction:
> 1 0 0
> 0 1 0
> 0 0 1
> 
>   PixelContainer:
>     ImportImageContainer (0xa17b198)
>       RTTI typeinfo:   itk::ImportImageContainer<//unsigned long, short>
>       Reference Count: 1
>       Modified Time: 117
>       Debug: Off
>       Observers:
>         none
>       Pointer: 0xb4d22008
>       Container manages memory: true
>       Size: 26476544
>       Capacity: 26476544/
> 
> 
> Then I open the nifti image with MIPAV image viewer 
> (http://mipav.cit.nih.gov/download.php) and if I re-save it using MIPAV 
> I get incorrect origin:
> 
> /OrientedImage (0x99ddfe0)
>   RTTI typeinfo:   itk::OrientedImage<short, 3u>
>   Reference Count: 1
>   Modified Time: 119
>   Debug: Off
>   Observers:
>     none
>   Source: (0x99db8e8)
>   Source output index: 0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 12
>   UpdateMTime: 120
>   LargestPossibleRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   BufferedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   RequestedRegion:
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [512, 512, 101]
>   Spacing: [1.36719, 1.36719, 2.5]
>   Origin: [-350, 350, -402]
>   Direction:
> 1 0 0
> 0 1 0
> 0 0 1
> 
>   PixelContainer:
>     ImportImageContainer (0x99de198)
>       RTTI typeinfo:   itk::ImportImageContainer<//unsigned long, short>
>       Reference Count: 1
>       Modified Time: 117
>       Debug: Off
>       Observers:
>         none
>       Pointer: 0xb4cbf008
>       Container manages memory: true
>       Size: 26476544
>       Capacity: 26476544/
> 
> 
> I wonder that ti is a MIPAV problem but I'm not sure! I can't understand 
> why MIPAV changes the origin...Anyone knows this problem?
> 
> And if the problem is MIPAV I can use something else to do some 
> pre-elaboration on the images and than work with itk?
> 
> Thanks for any hints.
> Elena Faggiano
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list