]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Algorithm.h
...
[FrontAlgorithms.git] / lib / fpa / Image / Algorithm.h
index 58dc5eee8c1649e1fd5bba48bc623036593d6e19..1c84a7253532bd69f72d2ec89b6aafddeada40ca 100644 (file)
@@ -17,33 +17,51 @@ namespace fpa
   {
     /**
      */
-    template< class _TInputImage, class _TOutputImage, class _TMarksInterface, class _TSeedsInterface >
+    template< class _TTraits >
     class Algorithm
-      : public fpa::Base::Algorithm< itk::ImageToImageFilter< _TInputImage, _TOutputImage >, _TMarksInterface, _TSeedsInterface >
+      : public fpa::Base::Algorithm< _TTraits >
     {
     public:
-      typedef _TInputImage     TInputImage;
-      typedef _TOutputImage    TOutputImage;
-      typedef _TMarksInterface TMarksInterface;
-      typedef _TSeedsInterface TSeedsInterface;
-      typedef itk::ImageToImageFilter< TInputImage, TOutputImage > TFilter;
-
-      typedef Algorithm Self;
-      typedef fpa::Base::Algorithm< TFilter, TMarksInterface, TSeedsInterface > Superclass;
-      typedef itk::SmartPointer< Self >       Pointer;
-      typedef itk::SmartPointer< const Self > ConstPointer;
-
-      typedef typename TInputImage::PixelType    TInputValue;
-      typedef typename TOutputImage::PixelType   TOutputValue;
-      typedef typename Superclass::TFrontId      TFrontId;
-      typedef typename Superclass::TNeighborhood TNeighborhood;
-      typedef typename Superclass::TNode         TNode;
-      typedef typename Superclass::TNodes        TNodes;
-      typedef typename Superclass::TSeeds        TSeeds;
-      typedef typename Superclass::TVertex       TVertex;
-      typedef typename Superclass::TPoint        TPoint;
-
-      typedef itk::Image< TFrontId, TInputImage::ImageDimension > TMarks;
+      typedef _TTraits TTraits;
+      typedef fpa::Base::Algorithm< _TTraits > Superclass;
+      typedef Algorithm                        Self;
+      typedef itk::SmartPointer< Self >        Pointer;
+      typedef itk::SmartPointer< const Self >  ConstPointer;
+
+      typedef typename TTraits::TFrontId      TFrontId;
+      typedef typename TTraits::TInputImage   TInputImage;
+      typedef typename TTraits::TInputValue   TInputValue;
+      typedef typename TTraits::TNeighborhood TNeighborhood;
+      typedef typename TTraits::TNode         TNode;
+      typedef typename TTraits::TNodes        TNodes;
+      typedef typename TTraits::TOutputImage  TOutputImage;
+      typedef typename TTraits::TOutputValue  TOutputValue;
+      typedef typename TTraits::TSeeds        TSeeds;
+      typedef typename TTraits::TVertex       TVertex;
+
+      typedef itk::Image< TFrontId, TTraits::Dimension > TMarks;
+
+      /* TODO
+         typedef _TMarksInterface TMarksInterface;
+         typedef _TSeedsInterface TSeedsInterface;
+
+         typedef typename TSeedsInterface::TTraits TTraits;
+         typedef typename TTraits::TInputImage   TInputImage;
+         typedef typename TTraits::TOutputImage  TOutputImage;
+         typedef typename TTraits::TInputValue   TInputValue;
+         typedef typename TTraits::TOutputValue  TOutputValue;
+         typedef typename TTraits::TFrontId      TFrontId;
+         typedef typename TTraits::TNeighborhood TNeighborhood;
+         typedef typename TTraits::TNode         TNode;
+         typedef typename TTraits::TNodes        TNodes;
+         typedef typename TTraits::TSeeds        TSeeds;
+         typedef typename TTraits::TVertex       TVertex;
+         typedef typename TTraits::TPoint        TPoint;
+
+         typedef itk::ImageToImageFilter< TInputImage, TOutputImage > TFilter;
+         typedef fpa::Base::Algorithm< TFilter, TMarksInterface, TSeedsInterface > Superclass;
+         typedef Algorithm                       Self;
+      */
 
     public:
       itkTypeMacro( fpa::Image::Algorithm, fpa::Base::Algorithm );