[ITK-users] itk Python: origin of DICOM slice does not change

D'Isidoro Fabio fisidoro at ethz.ch
Mon Sep 19 16:09:39 EDT 2016


Hi,

Following the code ResampleImageFilter2.cxx, I am applying an Identity Transform to a single DICOM slice, I change the origin to
output_origin = reader.GetOutput().GetOrigin() + offset

and I write the transformed DICOM slice into a new DICOM slice (following the code DICOMImageReadAndWrite.cxx).

I visualize the written DICOM slice with a viewer (it's an itk-vtk segmentation software).

The transformed DICOM slice looks as it should. Surprisingly however the viewer shows the original input values as origin. This is confirmed by the fact that if I read with an itk script the written DICOM slice again, and I print the information of the DICOM slice, the origin is still the original one and not the modified one.

How could this be?

Original DICOM slice:

[cid:image001.png at 01D212C2.83CCFB10]

Transformed DICOM slice:

[cid:image002.png at 01D212C2.83CCFB10]


Thank you for help,

Fabio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160919/6774aeaa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: application/softgrid-png
Size: 33458 bytes
Desc: image001.png
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160919/6774aeaa/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: application/softgrid-png
Size: 34423 bytes
Desc: image002.png
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160919/6774aeaa/attachment-0003.bin>


More information about the Insight-users mailing list