[Insight-users] DicomSeriesReaderSeriesWriter.cxx doesnot write Image position Patient and image orientation patient Z values

Sachin Jambawalikar sachinjam at gmail.com
Sat Jun 7 21:17:13 EDT 2008


Hi all,

 I was trying to use the  DicomSeriesWriter.cxx examples in the
Examples/IO directory to just read a dicom series and write it to a
new directory.
The series writer produces the dicom files fine but when you  see the
dicom header the
tags are wrong for example

the original file tag values are :

0020,0032,Image Position Patient=
-102.34347617253\-156.03754969686\-62.252762846648
0020,0037,Image Orientation (Patient)=
0.99587732553482\0.07696951180696\0.04800064116716\-0.0597707442939\0.95484501123428\-0.2910300195217

and the tags for the generated dcm file is:
0020,0032,Image Position Patient= -102.343475\-156.037552\0.000000
0020,0037,Image Orientation (Patient)=
0.995877\-0.059771\0.000000\0.076970\0.954845\0.000000

I guess the problem is in the itk:ImageSeriesWriter() which assumes
the output datatype to be 2D and hence wihle writing the metadata info
trunctates it only for  the image dimension
I''ve used the
inputdict=reader->GetMetaDataDictionaryArray() ;
std::string imagepositionpatient;
itk::ExposeMetaData<std::string>(*inputDict, "0020|0032",
imagepositionpatient) and it reads the right values.

I want to use this to read a dicom series  process the dicom series
and  save this processed data as a new series in the study.
The wrong  IPP and IOP tags causes  problems when viewing  this
generated series in any pacs viewer when the study is loaded.

Is there a way around this or am  I doing something wrong ??()

Thanks

Regards
Sachin Jambawalikar


More information about the Insight-users mailing list