]> Creatis software - clitk.git/commitdiff
Add a tag to preserve UID and private DICOM tags for clitkWriteDicomSeries (see previ...
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 10 Mar 2016 08:37:38 +0000 (09:37 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 10 Mar 2016 08:37:38 +0000 (09:37 +0100)
tools/clitkWriteDicomSeries.ggo
tools/clitkWriteDicomSeriesGenericFilter.txx

index faa08cb..d5f1347 100644 (file)
@@ -14,3 +14,4 @@ option "tag"          t       "Tags values"                    string         no multiple default="MIDPOSITION"
 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
index f30947f..a2bccc4 100644 (file)
@@ -153,8 +153,12 @@ WriteDicomSeriesGenericFilter<args_info_type>::UpdateWithDimAndPixelType()
 
   // 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 {