]> Creatis software - STMS.git/blobdiff - Lib/PrePostProcessing/itkSTMS_TemporalSetToImageSequence.h
output 2D as png file
[STMS.git] / Lib / PrePostProcessing / itkSTMS_TemporalSetToImageSequence.h
index dd93ea4982317da4c3600aa6cda0acd443f4e26a..1b53b3e57910ff07c5dfac7db346483cb867142b 100755 (executable)
@@ -62,6 +62,7 @@
 
 #include <string>
 #include <vector>
+#include <algorithm>
 #include <math.h>
 
 #include "itkImage.h"
 
 namespace itkSTMS
 {
-    template < class ImageType, class ClassImageType >
+    template < class ImageType, class ClassImageType, class OutputImageType=ImageType>
     class itkSTMS_TemporalSetToImageSequence
     {
     public:
         // Reader and writer typedefs
         typedef itk::ImageFileReader< ImageType >       ReaderType;
         typedef typename ReaderType::Pointer            ReaderPointer;
-        typedef itk::ImageFileWriter< ImageType >       WriterType;
+        typedef itk::ImageFileWriter< OutputImageType > WriterType;
         typedef typename WriterType::Pointer            WriterPointer;
         typedef itk::ImageFileWriter< ClassImageType >  ClassWriterType;
         typedef typename ClassWriterType::Pointer       ClassWriterPointer;
@@ -121,6 +122,10 @@ namespace itkSTMS
 
         void GenerateImageSequence();
 
+        //! 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
         itkSTMS::ParserOutputType*         expDescription;