]> Creatis software - FrontAlgorithms.git/blobdiff - appli/CTBronchi/Process.h
...
[FrontAlgorithms.git] / appli / CTBronchi / Process.h
index 9daaf662b3027a054abe3fb799e62e1b4a7857b4..bae6f4388b4d1752d4046173aac84d51e970dde3 100644 (file)
@@ -4,25 +4,65 @@
 #ifndef __CTBronchi__Process__h__
 #define __CTBronchi__Process__h__
 
-#include <itkImage.h>
+#include <map>
+#include <tuple>
+#include <fpa_ctbronchi_export.h>
+#include "Image.h"
 
 namespace CTBronchi
 {
-  class Process
+  class FPA_CTBRONCHI_EXPORT Process
   {
+  public:
     // Some types and values
     static const unsigned int Dim = 3;
     typedef short         TPixel;
     typedef unsigned char TLabel;
     typedef float         TScalar;
 
-    double MeasureTime( itk::ProcessObject* f );
-
-    template< class _TImagePtr >
-    void ReadImage( _TImagePtr& image, const std::string& fname );
-
-    template< class _TImage >
-    void WriteImage( const _TImage* image, const std::string& fname );
+    // Arguments
+    typedef std::tuple< std::string, bool > TArgument;
+    typedef std::map< std::string, TArgument > TArguments;
+
+    // Images
+    typedef CTBronchi::Image< TPixel, Dim >  TPixelImage;
+    typedef CTBronchi::Image< TLabel, Dim >  TLabelImage;
+    typedef CTBronchi::Image< TScalar, Dim > TScalarImage;
+
+    // Seed
+    typedef TPixelImage::TImage::PointType TPoint;
+    typedef TPixelImage::TImage::IndexType TIndex;
+    typedef std::pair< TIndex, TPoint >    TSeed;
+
+  public:
+    Process( );
+    virtual ~Process( );
+
+    void ParseArguments( int argc, char* argv[] );
+    void Update( );
+
+  protected:
+    void _Input( );
+    void _Vesselness( );
+    void _Mori( );
+    void _MoriLabelling( );
+
+  protected:
+    TArguments m_StrArg;
+    TArguments m_DblArg;
+
+    std::string  m_BaseFileName;
+    TSeed        m_Seed;
+    TLabel m_UndefinedLabel;
+    TLabel m_InsideLabel;
+    TLabel m_OutsideLabel;
+
+    TPixelImage  m_Input;
+    TScalarImage m_Vesselness;
+    TLabelImage  m_Mori;
+    TLabelImage  m_Labels;
+    TLabelImage  m_FastRW;
+    TLabelImage  m_SliceRW;
   };
 
 } // ecapseman