[Insight-users] Transforming image to world coordinates with negative z axis
Luis Ibanez
luis.ibanez at kitware.com
Thu Mar 12 16:35:15 EDT 2009
Hi John,
Thanks a lot for posting the output of the Print() method.
It seems that the image is not being read as the last slice
begin located at:
Z = -359.750
Instead it is located at:
Z = -35.685 + 2.5 * 107 = +231.81
and... even if the spacing was negative,
it could have only got to:
Z = -35.685 - 2.5 * 107 = -303.18
This raises suspicion about what you call the
"last DICOM slice..."
Are you sure that it belongs to the same Series
as the first slice ?
Also,
If you visualize the image that you can read with ITK,
does it look ok ?
BTW: As DICOM readers/viewers you may want to try:
A) Slicer
http://www.slicer.org
B) VV
http://www.midasjournal.org/browse/publication/288
Please let us know what you find.
Thanks
Luis
-------------------
John Drescher wrote:
>>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