Add IPP sorter on file read. I am not sure if the DB indexer sorts files by Z location.

This commit is contained in:
2022-06-27 16:42:28 +02:00
parent 11446be630
commit b91ca7c5e9
2 changed files with 8 additions and 10 deletions

View File

@ -385,17 +385,15 @@ int itkImageProcessor::load3DSerieFromFiles( std::vector<std::string> v_fnames){
bool b = ZSorter.Sort(v_fnames);
if( !b )
{
std::cerr << "Failed to sort files." << std::endl;
std::cerr << "itkImageProcessor::load3DSerieFromFiles :: Failed to sort files based on IPP." << std::endl;
return EXIT_FAILURE;
}
std::cout << "Sorting succeeded:" << std::endl;
ZSorter.Print( std::cout );
std::cout << "Found z-spacing:" << std::endl;
std::cout << ZSorter.GetZSpacing() << std::endl;
/* Some debugging output */
//std::cout << "Sorting succeeded:" << std::endl;
//ZSorter.Print( std::cout );
//std::cout << "Found z-spacing:" << std::endl;
//std::cout << ZSorter.GetZSpacing() << std::endl;
const std::vector<std::string> & v_sortedFnames =
ZSorter.GetFilenames();
@ -473,7 +471,7 @@ int itkImageProcessor::load3DSerieFromFiles( std::vector<std::string> v_fnames){
}
int itkImageProcessor::load3DSerie(const char * pcDirName)
int itkImageProcessor::load3DSerieFromFolder(const char * pcDirName)
{
using NamesGeneratorType = itk::GDCMSeriesFileNames;

View File

@ -72,7 +72,7 @@ public:
itkTypeMacro(itkImageProcessor, Object);
/** Input data load methods*/
int load3DSerie(const char* );
int load3DSerieFromFolder(const char* );
int load3DSerieFromFiles( std::vector<std::string> );
int load2D(const char *);