From: tbaudier Date: Fri, 11 Jan 2019 10:58:58 +0000 (+0100) Subject: Change paradigm to find files X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=commitdiff_plain;h=48727138e88f056b67312603560e600362346462 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) --- 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 "