From 8a0b56364a3a4e8d3951c65213e21b39a2339e10 Mon Sep 17 00:00:00 2001 From: dbcache Date: Thu, 27 Sep 2012 16:55:43 +0200 Subject: [PATCH] GDCM 1.x compatibility --- tools/clitkWriteDicomSeriesGenericFilter.txx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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); -- 2.47.1