]> 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 faa08cb44492dad8574303acf3f5d89bcc40a08f..d5f1347cc6bb504a55c829ba337da6cc7aa5fff7 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 f30947f8a88531f0ed292de33bedf49a510255ce..a2bccc4aa0daa52fbef3b8a34cb115b3eb9cc20c 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 {