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

Elena Faggiano elena.faggiano at gmail.com
Fri Oct 10 04:25:23 EDT 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081010/35672bce/attachment.htm>


More information about the Insight-users mailing list