]> Creatis software - clitk.git/commitdiff
GDCM 1.x compatibility
authordbcache <dbcache@clavaire.champignons>
Thu, 27 Sep 2012 14:55:43 +0000 (16:55 +0200)
committerdbcache <dbcache@clavaire.champignons>
Thu, 27 Sep 2012 14:55:43 +0000 (16:55 +0200)
tools/clitkWriteDicomSeriesGenericFilter.txx

index d14347412f4bee7af1f0e6c204cca70160921b9c..3f0d168897e429f4301df4d72cd7b9eb87ae20a6 100644 (file)
@@ -294,15 +294,16 @@ WriteDicomSeriesGenericFilter<args_info_type>::UpdateWithDimAndPixelType()
 
   // check if file UIDs will be be preserved
   bool useInputFileUID = true;
-  if (m_ArgsInfo.newSeriesUID_flag || m_ArgsInfo.newStudyUID_flag || seriesUIDGiven || studyUIDGiven)
-      useInputFileUID = false;
-  else {
-    namesGenerator->SetOutputDirectory( m_ArgsInfo.outputDir_arg  );
-    filenames_out = namesGenerator->GetOutputFileNames();
+  if (m_ArgsInfo.newSeriesUID_flag || m_ArgsInfo.newStudyUID_flag || seriesUIDGiven || studyUIDGiven) {
+    useInputFileUID = false;
 #if GDCM_MAJOR_VERSION < 2
     gdcmIO->SetKeepOriginalUID(true);
 #endif
   }
+  else {
+    namesGenerator->SetOutputDirectory( m_ArgsInfo.outputDir_arg  );
+    filenames_out = namesGenerator->GetOutputFileNames();
+  }
   
   filenames_out.resize(numberOfFilenames);