From: dbcache Date: Thu, 27 Sep 2012 14:55:43 +0000 (+0200) Subject: GDCM 1.x compatibility X-Git-Tag: v1.3.0~4^2~3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8a0b56364a3a4e8d3951c65213e21b39a2339e10;p=clitk.git GDCM 1.x compatibility --- diff --git a/tools/clitkWriteDicomSeriesGenericFilter.txx b/tools/clitkWriteDicomSeriesGenericFilter.txx index d143474..3f0d168 100644 --- a/tools/clitkWriteDicomSeriesGenericFilter.txx +++ b/tools/clitkWriteDicomSeriesGenericFilter.txx @@ -294,15 +294,16 @@ WriteDicomSeriesGenericFilter::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);