From: tbaudier Date: Fri, 11 Jan 2019 10:55:04 +0000 (+0100) Subject: Remove extract_series option X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d647919fe732d73ed24138daaec16080c00df892;p=clitk.git Remove extract_series option With the itk::GDCMSeriesFileNames, we automatically have the dicom sorted according series, so this option is not necessary anymore. So I removed the option in the .ggo file and I remove the if conditions. I add .c_str() to series_UID to remove trailling white spaces --- diff --git a/tools/clitkDicom2Image.cxx b/tools/clitkDicom2Image.cxx index 54ab6bd..066aaf8 100644 --- a/tools/clitkDicom2Image.cxx +++ b/tools/clitkDicom2Image.cxx @@ -93,11 +93,9 @@ int main(int argc, char * argv[]) hreader.Read(); gdcm::DataSet& ds = hreader.GetFile().GetDataSet(); - if (args_info.extract_series_flag) { - gdcm::Attribute<0x20,0x000e> series_UID_att; - series_UID_att.SetFromDataSet(ds); - series_UID = series_UID_att.GetValue(); - } + gdcm::Attribute<0x20,0x000e> series_UID_att; + series_UID_att.SetFromDataSet(ds); + series_UID = series_UID_att.GetValue().c_str(); series_UIDs.insert(series_UID); theorigin[series_UID] = gdcm::ImageHelper::GetOriginValue(hreader.GetFile()); @@ -132,9 +130,7 @@ int main(int argc, char * argv[]) header->SetMaxSizeLoadEntry(16384); // required ? header->Load(); - if (args_info.extract_series_flag) { - series_UID = header->GetEntryValue(0x20,0x000e).c_str(); - } + series_UID = header->GetEntryValue(0x20,0x000e).c_str(); series_UIDs.insert(series_UID); theorigin[series_UID].resize(3); diff --git a/tools/clitkDicom2Image.ggo b/tools/clitkDicom2Image.ggo index 7cf454f..fd678f9 100644 --- a/tools/clitkDicom2Image.ggo +++ b/tools/clitkDicom2Image.ggo @@ -1,6 +1,6 @@ # file clitkDicom2Image.ggo package "clitk" -version "Try to convert a DICOM into an image (.hdr, .vox...)" +version "Try to convert a DICOM into an image (.hdr, .vox...) identifying all available series" option "config" - "Config file" string no option "verbose" v "Verbose" flag off @@ -8,5 +8,4 @@ option "tolerance" t "Tolerance for slice position" double default="0" no option "output" o "Output image filename" string yes option "std_input" - "Take the like of input file from stdin, to support huge lists of filenames" flag off option "focal_origin" - "Output files with FOCAL-like origin, instead of the origin present in the dicom files" flag off -option "extract_series" s "Identify different series in the file list and create the MHDs accordinly" flag off option "patientSystem" p "Open the image with patient coordinate system" flag off