From 9da3ad1b0b1a22f1ed31213202116250e0eded06 Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Tue, 5 Feb 2013 01:05:52 +0100 Subject: [PATCH] addition of verbose messages --- tools/clitkWriteDicomSeriesGenericFilter.txx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/clitkWriteDicomSeriesGenericFilter.txx b/tools/clitkWriteDicomSeriesGenericFilter.txx index 480e496..2477aaf 100644 --- a/tools/clitkWriteDicomSeriesGenericFilter.txx +++ b/tools/clitkWriteDicomSeriesGenericFilter.txx @@ -139,7 +139,7 @@ WriteDicomSeriesGenericFilter::UpdateWithDimAndPixelType() namesGenerator->SetInputDirectory( m_ArgsInfo.inputDir_arg ); namesGenerator->SetOutputDirectory( m_ArgsInfo.outputDir_arg ); typename ReaderType::FileNamesContainer filenames_in = namesGenerator->GetInputFileNames(); - typename ReaderType::FileNamesContainer filenames_out; + typename ReaderType::FileNamesContainer filenames_out = namesGenerator->GetOutputFileNames(); // Output the dicom files unsigned int numberOfFilenames = filenames_in.size(); @@ -314,7 +314,6 @@ WriteDicomSeriesGenericFilter::UpdateWithDimAndPixelType() gdcmIO->SetKeepOriginalUID(true); #endif namesGenerator->SetOutputDirectory( m_ArgsInfo.outputDir_arg ); - filenames_out = namesGenerator->GetOutputFileNames(); } filenames_out.resize(numberOfFilenames); @@ -378,6 +377,9 @@ WriteDicomSeriesGenericFilter::UpdateWithDimAndPixelType() // file UIDs are recreated for new studies or series if (!useInputFileUID) { + if (m_ArgsInfo.verbose_flag) + std::cout << "Recreating file UIDs" << std::endl; + std::string fileUID; #if GDCM_MAJOR_VERSION >= 2 gdcm::UIDGenerator fid; @@ -405,6 +407,8 @@ WriteDicomSeriesGenericFilter::UpdateWithDimAndPixelType() // Write try { + if (m_ArgsInfo.verbose_flag) + std::cout << seriesWriter << std::endl; seriesWriter->Update(); } catch( itk::ExceptionObject & excp ) { std::cerr << "Error: Exception thrown while writing the series!!" << std::endl; -- 2.47.1