From: Romulo Pinho Date: Thu, 30 Aug 2012 10:35:58 +0000 (+0200) Subject: support for new pixel types X-Git-Tag: v1.3.0~15 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=79092b12f7beb3fbf9b3c69335817b5d767f4faa;p=clitk.git support for new pixel types - removed midP stuff --- diff --git a/tools/clitkWriteDicomSeries.ggo b/tools/clitkWriteDicomSeries.ggo index ef7a9eb..f6bccde 100644 --- a/tools/clitkWriteDicomSeries.ggo +++ b/tools/clitkWriteDicomSeries.ggo @@ -11,5 +11,4 @@ option "inputDir" d "Input dicom directory" string yes option "outputDir" o "Output dicom directory" string yes option "key" k "Keys of tags to modify" string no multiple default="0008|103e" option "tag" t "Tags values" string no multiple default="MIDPOSITION" -option "midP" m "Modify tags using defaults, for MidPosition" flag off option "useSizeAsReference" s "Use the size of the dicom image as reference for an occasional resampling" flag off \ No newline at end of file diff --git a/tools/clitkWriteDicomSeriesGenericFilter.txx b/tools/clitkWriteDicomSeriesGenericFilter.txx index 9bc52dc..6f09ba9 100644 --- a/tools/clitkWriteDicomSeriesGenericFilter.txx +++ b/tools/clitkWriteDicomSeriesGenericFilter.txx @@ -82,10 +82,10 @@ WriteDicomSeriesGenericFilter::UpdateWithDim(std::string PixelTy if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed short..." << std::endl; UpdateWithDimAndPixelType(); } - // else if(PixelType == "unsigned_short"){ - // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl; - // UpdateWithDimAndPixelType(); - // } + else if(PixelType == "unsigned_short"){ + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl; + UpdateWithDimAndPixelType(); + } else if (PixelType == "unsigned_char") { if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_char..." << std::endl; @@ -96,6 +96,10 @@ WriteDicomSeriesGenericFilter::UpdateWithDim(std::string PixelTy // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed_char..." << std::endl; // UpdateWithDimAndPixelType(); // } + else if (PixelType == "double") { + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and double..." << std::endl; + UpdateWithDimAndPixelType(); + } else { if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and float..." << std::endl; UpdateWithDimAndPixelType(); @@ -230,13 +234,7 @@ WriteDicomSeriesGenericFilter::UpdateWithDimAndPixelType() const std::vector* dictionary = reader->GetMetaDataDictionaryArray(); // Get keys - unsigned int numberOfKeysGiven=0; - if(m_ArgsInfo.midP_flag && m_ArgsInfo.key_given) - std::cerr<<"Error: both keys and midP option are given"<::UpdateWithDimAndPixelType() // Write try { seriesWriter->Update(); - std::cerr << "filter update" << std::endl; } catch( itk::ExceptionObject & excp ) { std::cerr << "Error: Exception thrown while writing the series!!" << std::endl; std::cerr << excp << std::endl;