#include <iomanip>
#include <ctime>
-#define STMS_NUMBERING_FORM_ONE "01"
+#define STMS_NUMBERING_FORM_ONE "0001"
#include "itkImage.h"
#include "itkSTMS_ArgumentsAnalysis.h"
typedef float PixelType;
+typedef unsigned char OutputPixelType2D;
+typedef float OutputPixelType3D;
+
double gettime_hp()
{
switch(params->dim){
case 2:
{
- typedef itk::Image< PixelType, 2 > ImageType2D;
- typedef itk::Image< unsigned char, 2 > MaskImageType2D;
+ typedef itk::Image< PixelType, 2 > ImageType2D;
+ typedef itk::Image< OutputPixelType2D, 2 > OutputImageType2D;
+ typedef itk::Image< unsigned char, 2 > MaskImageType2D;
typedef itkSTMS::itkSTMS_ImageSequenceToTemporalSet< ImageType2D, MaskImageType2D >::IndexType IndexType;
dtime=gettime_hp();
- itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType2D, ClassImageType2D >* postProcess
- = new itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType2D, ClassImageType2D >(stmsFilter->GetClassMemory(),
+ itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType2D, ClassImageType2D, OutputImageType2D >* postProcess
+ = new itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType2D, ClassImageType2D, OutputImageType2D>(stmsFilter->GetClassMemory(),
stmsFilter->GetSpatialMemory(),
stmsFilter->GetRangeSet(),
params,
preProcess->GetExperimentDescription());
postProcess->GenerateImageSequence();
+ if(preProcess->GetExperimentDescription()->outputCSV == "true" )
+ postProcess->GenerateCSVFile();
dtime = gettime_hp()-dtime;
std::cout<<std::endl<< std::setw(30) << std::left << "Image sequence saving: " << dtime/1000 << " s" <<std::endl;
case 3:
{
typedef itk::Image< PixelType, 3 > ImageType3D;
+ typedef itk::Image< OutputPixelType3D, 3 > OutputImageType3D;
typedef itk::Image< unsigned char, 3 > MaskImageType3D;
typedef itkSTMS::itkSTMS_ImageSequenceToTemporalSet< ImageType3D, MaskImageType3D >::IndexType IndexType;
dtime=gettime_hp();
- itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType3D, MaskImageType3D >* postProcess
- = new itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType3D, MaskImageType3D >(stmsFilter->GetClassMemory(),
+ itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType3D, MaskImageType3D, OutputImageType3D>* postProcess
+ = new itkSTMS::itkSTMS_TemporalSetToImageSequence< ImageType3D, MaskImageType3D, OutputImageType3D >(stmsFilter->GetClassMemory(),
stmsFilter->GetSpatialMemory(),
stmsFilter->GetRangeSet(),
params,
preProcess->GetExperimentDescription());
postProcess->GenerateImageSequence();
+ if(preProcess->GetExperimentDescription()->outputCSV == "true" )
+ postProcess->GenerateCSVFile();
dtime = gettime_hp()-dtime;
std::cout<<std::endl<< std::setw(30) << std::left << "Image sequence saving: " << dtime/1000 << " s" <<std::endl;