[Insight-users] Transforming image to world coordinates with negative z axis

John Drescher drescherjm at gmail.com
Thu Mar 12 12:11:10 EDT 2009


> You are right, this looks strange.
>
>
> Please do the following:
>
> Just after you load your DICOM image into an ITK image,
> call the Print() method in the resulting image, and post
> the outcome to the mailing list.
>
> Your code should look something like
>
>  imageSeriesReader->Update();
>
>  imageSeriesReader->GetOutput()->Print( std::cout );
>
>
> The output of the Print() method will help us to locate
> the source of the problem.
>
>

OrientedImage (01D5C650)
  RTTI typeinfo:   class itk::OrientedImage<short,3>
  Reference Count: 1
  Modified Time: 2757
  Debug: Off
  Observers:
    none
  Source: (01D5C508)
  Source output index: 0
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 30
  UpdateMTime: 2758
  LargestPossibleRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [512, 512, 107]
  BufferedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [512, 512, 107]
  RequestedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [512, 512, 107]
  Spacing: [0.626953, 0.626953, 2.5]
  Origin: [-174.6, -160.5, -35.685]
  Direction:
1 0 0
0 1 0
0 0 1

  IndexToPointMatrix:
  0.626953 0 0
0 0.626953 0
0 0 2.5

  PointToIndexMatrix:
  1.59502 0 0
0 1.59502 0
0 0 0.4

  PixelContainer:
    ImportImageContainer (01D5C8A0)
      RTTI typeinfo:   class itk::ImportImageContainer<unsigned long,short>
      Reference Count: 1
      Modified Time: 81
      Debug: Off
      Observers:
        none
      Pointer: 03410040
      Container manages memory: true
      Size: 28049408
      Capacity: 28049408

> ----
>
>
> BTW: Why do you say that the direction cosines
>
>> 1 0 0
>> 0 1 0
>> 0 0 1
>
> look wrong to you ?
>
I thought it should be

1 0 0
0 1 0
0 0 -1

so that the z axis coordinate conversion would be handled correctly.

> Given that the direction cosines in the DICOM header
> are
>
>> 1.000000\0.000000\0.000000\0.000000\1.000000\0.000000
>
> It seems normal to have the Direction matrix to be an
> identity matrix.
>
Looks like I have to do some reading.

Thanks for your help,
John


More information about the Insight-users mailing list