From 48727138e88f056b67312603560e600362346462 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Fri, 11 Jan 2019 11:58:58 +0100 Subject: [PATCH] Change paradigm to find files When we find the files to sort them with itk::GDCMSeriesFileNames, I just have to remove the first ./ if present Moreover, sliceIndex has to be the sorting vector (it was not correct before) --- tools/clitkDicom2Image.cxx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/clitkDicom2Image.cxx b/tools/clitkDicom2Image.cxx index d32fbae..38e8aa3 100644 --- a/tools/clitkDicom2Image.cxx +++ b/tools/clitkDicom2Image.cxx @@ -155,22 +155,29 @@ int main(int argc, char * argv[]) std::vector locs = sliceLocations[*sn]; std::vector origin = theorigin[*sn]; std::vector files = seriesFiles[*sn]; - std::vector sliceIndex; + std::vector sliceIndex(files.size()); //clitk::GetSortedIndex(locs, sliceIndex); //Look for files into GDCMSeriesFileNames, because it sorts files correctly and take the order const std::vector & temp = nameGenerator->GetFileNames(*sn); for(unsigned int i=0; i " -- 2.47.1