mReader = MaskReaderType::New();
MinMaxCalculator = MinMaxCalculatorType::New();
- maskPath = expDescription->experimentPath+expDescription->inputFolder+expDescription->maskImage+expDescription->imageExtension;
+ maskPath = expDescription->maskImage; //expDescription->experimentPath+expDescription->inputFolder+expDescription->maskImage+expDescription->imageExtension;
mReader->SetFileName( maskPath );
mReader->Update();
mask = mReader->GetOutput();
itkSTMS::ParserOutputType* desc );
void GenerateImageSequence();
- void GenerateCSVFile();
+
+ //! To generate CSV File from all classes. The file contains the class ID, the number of pixels of this class and then all filtered values along time.
+ //! You can pass a delimiter (ie a record separator) to this function.
+ void GenerateCSVFile(const std::string &delimiter = std::string(", "));
private:
// Attributes
template < class ImageType, class ClassImageType>
void
itkSTMS_TemporalSetToImageSequence< ImageType, ClassImageType >
-::GenerateCSVFile()
+::GenerateCSVFile(const std::string &delimiter)
{
std::string CSVFilename = expDescription->experimentPath+expDescription->outputFolder+
expDescription->outputCommonRoot+
for(unsigned int j=0 ; j<rangeSet->size() ; ++j)
{
- ofs << j+1 <<", " << std::count (classSet->begin(), classSet->end(), j+1);
+ ofs << j+1 << delimiter << std::count (classSet->begin(), classSet->end(), j+1);
for( unsigned int i=1 ; i<=stmsParameters->numTimePoints - stmsParameters->startTimePoint + 1; ++i )
- ofs << ", " << rangeSet->at(j)[i-1]*stmsParameters->rScale ;
+ ofs << delimiter << rangeSet->at(j)[i-1]*stmsParameters->rScale ;
ofs << std::endl;
}
postProcess->GenerateImageSequence();
if(preProcess->GetExperimentDescription()->outputCSV == "true" )
- postProcess->GenerateCSVFile( );
+ postProcess->GenerateCSVFile();
dtime = gettime_hp()-dtime;
std::cout<<std::endl<< std::setw(30) << std::left << "Image sequence saving: " << dtime/1000 << " s" <<std::endl;