#define __fpa__Image__RandomWalker__h__
#include <itkImage.h>
-
#include <fpa/Base/DijkstraBase.h>
#include <fpa/Base/MarksInterface.h>
#include <fpa/Image/Algorithm.h>
+#include <fpa/Image/DefaultTraits.h>
#include <fpa/Image/LabelledSeedsInterface.h>
-#include <fpa/Image/Functors/Dijkstra/Function.h>
namespace fpa
{
/**
*/
template< class _TInputImage, class _TLabelImage, class _TScalar >
- class RandomWalker
- : public fpa::Base::DijkstraBase< fpa::Image::Algorithm< _TInputImage, itk::Image< _TScalar, _TInputImage::ImageDimension >, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Image::LabelledSeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, _TScalar, typename _TLabelImage::PixelType, typename _TInputImage::IndexType::LexicographicCompare > > >
+ class RandomWalkerTraits
+ : public fpa::Image::DefaultTraits< _TInputImage, itk::Image< _TScalar, _TInputImage::ImageDimension >, typename _TLabelImage::PixelType >
{
public:
- typedef _TInputImage TInputImage;
- typedef _TLabelImage TLabelImage;
- typedef _TScalar TScalar;
- typedef typename TInputImage::IndexType TVertex;
- typedef typename TInputImage::PointType TPoint;
- typedef typename TVertex::LexicographicCompare TVertexCompare;
- typedef typename TInputImage::PixelType TInputValue;
- typedef typename TLabelImage::PixelType TFrontId;
-
+ typedef RandomWalkerTraits Self;
+ typedef _TInputImage TInputImage;
+ typedef _TLabelImage TLabelImage;
+ typedef _TScalar TScalar;
+ typedef typename _TLabelImage::PixelType TFrontId;
typedef itk::Image< TScalar, _TInputImage::ImageDimension > TOutputImage;
- typedef fpa::Base::MarksInterface< TVertex > TMarksInterface;
- typedef fpa::Image::LabelledSeedsInterface< TVertex, TPoint, TInputValue, _TScalar, TFrontId, TVertexCompare > TSeedsInterface;
- typedef fpa::Image::Algorithm< _TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm;
+ typedef fpa::Image::DefaultTraits< TInputImage, TOutputImage, TFrontId > Superclass;
+
+ typedef typename Superclass::TVertex TVertex;
+ typedef typename Superclass::TInputValue TInputValue;
+ typedef typename Superclass::TPoint TPoint;
+ typedef typename Superclass::TOutputValue TOutputValue;
+ typedef typename Superclass::TCompare TCompare;
+ typedef typename Superclass::TNeighborhood TNeighborhood;
+ typedef typename Superclass::TFilter TFilter;
- typedef RandomWalker Self;
- typedef fpa::Base::DijkstraBase< TAlgorithm > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef fpa::Image::LabelledSeedsInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TCompare > TSeedsInterface;
+ typedef fpa::Base::MarksInterface< TVertex > TMarksInterface;
- typedef fpa::Image::Functors::Dijkstra::Function< TInputImage, TScalar > TWeightFunction;
typedef typename TSeedsInterface::TNode TNode;
typedef typename TSeedsInterface::TNodes TNodes;
+ typedef typename TSeedsInterface::TSeed TSeed;
+ typedef typename TSeedsInterface::TSeeds TSeeds;
+
+ public:
+ itkConceptMacro(
+ Check_SameDimension,
+ ( itk::Concept::SameDimension< TInputImage::ImageDimension, TLabelImage::ImageDimension > )
+ );
+
+ private:
+ // Purposely not implemented.
+ RandomWalkerTraits( );
+ RandomWalkerTraits( const Self& other );
+ virtual ~RandomWalkerTraits( );
+ Self& operator=( const Self& other );
+ };
+
+ /**
+ */
+ template< class _TInputImage, class _TLabelImage, class _TScalar >
+ class RandomWalker
+ : public fpa::Base::DijkstraBase< fpa::Image::Algorithm< fpa::Image::RandomWalkerTraits< _TInputImage, _TLabelImage, _TScalar > > >
+ /* TODO
+ : public fpa::Base::DijkstraBase< fpa::Image::Algorithm< _TInputImage, itk::Image< _TScalar, _TInputImage::ImageDimension >, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Image::LabelledSeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, _TScalar, typename _TLabelImage::PixelType, typename _TInputImage::IndexType::LexicographicCompare > > >
+ */
+ {
+ public:
+ /* TODO
+ typedef _TInputImage TInputImage;
+ typedef _TLabelImage TLabelImage;
+ typedef _TScalar TScalar;
+ typedef typename TInputImage::IndexType TVertex;
+ typedef typename TInputImage::PointType TPoint;
+ typedef typename TVertex::LexicographicCompare TVertexCompare;
+ typedef typename TInputImage::PixelType TInputValue;
+ typedef typename TLabelImage::PixelType TFrontId;
+
+ typedef itk::Image< TScalar, _TInputImage::ImageDimension > TOutputImage;
+ typedef fpa::Base::MarksInterface< TVertex > TMarksInterface;
+ typedef fpa::Image::LabelledSeedsInterface< TVertex, TPoint, TInputValue, _TScalar, TFrontId, TVertexCompare > TSeedsInterface;
+ typedef fpa::Image::Algorithm< _TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm;
+ typedef RandomWalker Self;
+ typedef fpa::Base::DijkstraBase< TAlgorithm > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef fpa::Image::Functors::Dijkstra::Function< TInputImage, TScalar > TWeightFunction;
+ typedef typename TSeedsInterface::TNode TNode;
+ typedef typename TSeedsInterface::TNodes TNodes;
+ */
public:
itkNewMacro( Self );