option "newSeriesUID" e "Write the series with a new series UID (ignored if given in key/tag option)" flag off
option "newStudyUID" u "Write the series with a new study UID (ignored if given in key/tag option; forces newSeriesUID = true)" flag off
option "useSizeAsReference" s "Use the size of the dicom image as reference for an occasional resampling" flag off
+option "preserve" p "Preserve private tags and keep original UID (eg: Xio)" flag off
// Read the series
typename ReaderType::Pointer reader = ReaderType::New();
- gdcmIO->LoadPrivateTagsOn();
- gdcmIO->KeepOriginalUIDOn();
+ if (m_ArgsInfo.preserve_flag) {
+#if GDCM_MAJOR_VERSION >= 2
+ gdcmIO->LoadPrivateTagsOn();
+ gdcmIO->KeepOriginalUIDOn();
+#endif
+ }
reader->SetImageIO( gdcmIO );
reader->SetFileNames( filenames_in );
try {