]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Filters/Image/DefaultTraits.h
...
[FrontAlgorithms.git] / lib / fpa / Filters / Image / DefaultTraits.h
index a09570410bbfc36929b82659adea3700bcbcf5c6..27aaa3a9e3703ff3a4335e71d658d6ae1424e0b5 100644 (file)
@@ -7,10 +7,10 @@
 
 #include <set>
 #include <vector>
-#include <itkConceptChecking.h>
+#include <itkImage.h>
 #include <itkImageToImageFilter.h>
-#include <fpa/Filters/MarksWithCollisionsInterface.h>
-#include <fpa/Filters/SeedsInterface.h>
+#include <fpa/Filters/CollisionMarksInterface.h>
+#include <fpa/Filters/MultipleSeedsInterface.h>
 
 namespace fpa
 {
@@ -27,32 +27,22 @@ namespace fpa
         typedef _TInputImage  TInputImage;
         typedef _TOutputImage TOutputImage;
 
+        /**
+         */
         class TInternalTraits
         {
         public:
           typedef _TMark TMark;
-          typedef typename TInputImage::IndexType        TVertex;
-          typedef typename TInputImage::PixelType        TInputValue;
-          typedef typename TInputImage::PointType        TPoint;
-          typedef typename TOutputImage::PixelType       TOutputValue;
+          typedef typename TInputImage::IndexType  TVertex;
+          typedef typename TInputImage::PixelType  TInputValue;
+          typedef typename TInputImage::PointType  TPoint;
+          typedef typename TOutputImage::PixelType TOutputValue;
           typedef typename TVertex::LexicographicCompare TVertexCompare;
           itkStaticConstMacro(
-            Dimension, unsigned int, _TInputImage::ImageDimension
+            Dimension, unsigned int, TInputImage::ImageDimension
             );
 
           typedef std::vector< TVertex > TNeighborhood;
-          struct TSeed
-          {
-            TVertex Vertex;
-            TPoint  Point;
-            bool    IsPoint;
-            TMark   FrontId;
-            TSeed( const TMark& fid = 0 )
-              : FrontId( fid )
-              { }
-          };
-          typedef std::vector< TSeed > TSeeds;
-
           struct TNode
           {
             TVertex Vertex;
@@ -71,17 +61,27 @@ namespace fpa
               }
           };
           typedef std::set< TNode, TNodeCompare > TNodes;
-        };
-
-        typedef itk::ImageToImageFilter< TInputImage, TOutputImage > TFilter;
-        typedef fpa::Filters::MarksWithCollisionsInterface< TInternalTraits >  TMarksInterface;
-        typedef fpa::Filters::SeedsInterface< TInternalTraits > TSeedsInterface;
 
-      protected:
-        itkConceptMacro(
-          Check_Dimensions,
-          ( itk::Concept::SameDimension< TInputImage::ImageDimension, TOutputImage::ImageDimension > )
+          struct TSeed
+          {
+            TVertex Vertex;
+            TPoint  Point;
+            bool    IsPoint;
+            TMark   FrontId;
+            TSeed( const TMark& fid = 0 )
+              : FrontId( fid )
+              { }
+          };
+          typedef std::vector< TSeed > TSeeds;
+        };
+        itkStaticConstMacro(
+          Dimension, unsigned int, TInternalTraits::Dimension
           );
+
+        typedef itk::Image< _TMark, TInternalTraits::Dimension >         TMarksImage;
+        typedef itk::ImageToImageFilter< TInputImage, TOutputImage >     TFilterInterface;
+        typedef fpa::Filters::CollisionMarksInterface< TInternalTraits > TMarksInterface;
+        typedef fpa::Filters::MultipleSeedsInterface< TInternalTraits >  TSeedsInterface;
       };
 
     } // ecapseman