Add IPP sorter on file read. I am not sure if the DB indexer sorts files by Z location.
This commit is contained in:
@ -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;
|
||||
|
@ -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 *);
|
||||
|
Reference in New Issue
Block a user