X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FMori.h;h=7e6b0e032ce1f779d763893c3600f1010ff1916a;hb=6cdba92a782c9ca52b1be25868c2267b2e3966ca;hp=550864d7957de297a6f65bed47e84716af5903fb;hpb=a44c34f8d4118730a65ab3a7f9b6fc12614ce67a;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Mori.h b/lib/fpa/Image/Mori.h index 550864d..7e6b0e0 100644 --- a/lib/fpa/Image/Mori.h +++ b/lib/fpa/Image/Mori.h @@ -10,6 +10,7 @@ #include #include #include +#include namespace fpa { @@ -18,32 +19,58 @@ namespace fpa /** */ template< class _TInputImage, class _TOutputImage > - class Mori - : public fpa::Base::Mori< fpa::Image::Algorithm< _TInputImage, _TOutputImage, fpa::Base::MarksInterface< typename _TInputImage::IndexType >, fpa::Base::SingleSeedInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, typename _TOutputImage::PixelType, typename _TOutputImage::PixelType, typename _TInputImage::IndexType::LexicographicCompare > > > + class MoriTraits + : public fpa::Image::DefaultTraits< _TInputImage, _TOutputImage, typename _TOutputImage::PixelType > { public: + typedef MoriTraits Self; typedef _TInputImage TInputImage; typedef _TOutputImage TOutputImage; + typedef typename TOutputImage::PixelType TFrontId; + 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 fpa::Base::SingleSeedInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TCompare > TSeedsInterface; + typedef fpa::Base::MarksInterface< TVertex > TMarksInterface; - typedef typename TInputImage::IndexType TVertex; - typedef typename TInputImage::PointType TPoint; - typedef typename TVertex::LexicographicCompare TVertexCompare; - typedef typename TInputImage::PixelType TInputValue; - typedef typename TOutputImage::PixelType TOutputValue; - typedef typename TOutputImage::PixelType TFrontId; + typedef typename TSeedsInterface::TNode TNode; + typedef typename TSeedsInterface::TNodes TNodes; + typedef typename TSeedsInterface::TSeed TSeed; + typedef typename TSeedsInterface::TSeeds TSeeds; - typedef fpa::Base::MarksInterface< TVertex > TMarksInterface; - typedef fpa::Base::SingleSeedInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TVertexCompare > TSeedsInterface; - typedef fpa::Image::Algorithm< TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm; + private: + // Purposely not implemented. + MoriTraits( ); + MoriTraits( const Self& other ); + virtual ~MoriTraits( ); + Self& operator=( const Self& other ); + }; + + /** + */ + template< class _TInputImage, class _TOutputImage > + class Mori + : public fpa::Base::Mori< fpa::Image::Algorithm< fpa::Image::MoriTraits< _TInputImage, _TOutputImage > > > + { + public: + typedef _TInputImage TInputImage; + typedef _TOutputImage TOutputImage; + typedef fpa::Image::MoriTraits< TInputImage, TOutputImage > TTraits; + typedef fpa::Image::Algorithm< TTraits > TAlgorithm; typedef Mori Self; typedef fpa::Base::Mori< TAlgorithm > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; - typedef typename TSeedsInterface::TNode TNode; - typedef typename TSeedsInterface::TNodes TNodes; - typedef typename TAlgorithm::TMarks TMarks; + typedef typename TAlgorithm::TMarks TMarks; public: itkNewMacro( Self );