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

Timothee Evain tevain at telecom-paristech.fr
Tue Sep 20 04:34:43 EDT 2016


Hi,

You refer to the DICOMImageReadWrite example. If you don't change the writing part, I think your problem comes from the fact that you assign the read metadata directly to the output ( ->UseInputMetaDataDictionaryOff() ) so the original origin will be saved.

HTH,

Tim

----- Mail original -----
De: "D'Isidoro Fabio" <fisidoro at ethz.ch>
À: insight-users at itk.org
Envoyé: Lundi 19 Septembre 2016 22:09:39
Objet: [ITK] [ITK-users] itk Python: origin of DICOM slice does not change



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: 







Transformed DICOM slice: 









Thank you for help, 



Fabio. 

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users

_______________________________________________
Community mailing list
Community at itk.org
http://public.kitware.com/mailman/listinfo/community


More information about the Insight-users mailing list