X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FRegionGrow.h;h=2deff2f637de9001588b0ddbd8bdf1e261188ee1;hb=fe01e92d9bce3519fa2a0936b6180ca7b057a87a;hp=dbc57f00759be5d017c1c49bb0c42f0eba583c71;hpb=e9083d9f5f381f258f994fa9bbbe39a897f97c5b;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/RegionGrow.h b/lib/fpa/Image/RegionGrow.h index dbc57f0..2deff2f 100644 --- a/lib/fpa/Image/RegionGrow.h +++ b/lib/fpa/Image/RegionGrow.h @@ -1,7 +1,14 @@ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + #ifndef __fpa__Image__RegionGrow__h__ #define __fpa__Image__RegionGrow__h__ #include +#include +#include #include namespace fpa @@ -10,34 +17,48 @@ namespace fpa { /** */ - template< class _TInputImage, class _TOutputImage > + template< class _TInputImage, class _TOutputImage, class _TFrontId = unsigned char > class RegionGrow - : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage > > + : public fpa::Base::RegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage, fpa::Base::MarksInterfaceWithCollisions< typename _TInputImage::IndexType >, fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::PointType, typename _TInputImage::PixelType, typename _TOutputImage::PixelType, _TFrontId, typename _TInputImage::IndexType::LexicographicCompare > > > { public: - typedef fpa::Image::Algorithm< _TInputImage, _TOutputImage > TAlgorithm; + typedef _TInputImage TInputImage; + typedef _TOutputImage TOutputImage; + typedef _TFrontId TFrontId; + + 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 fpa::Base::MarksInterfaceWithCollisions< TVertex > TMarksInterface; + typedef fpa::Base::SeedsInterface< TVertex, TPoint, TInputValue, TOutputValue, TFrontId, TVertexCompare > TSeedsInterface; + typedef fpa::Image::Algorithm< TInputImage, TOutputImage, TMarksInterface, TSeedsInterface > TAlgorithm; + typedef RegionGrow Self; typedef fpa::Base::RegionGrow< TAlgorithm > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; - typedef typename Superclass::TOutput TOutput; - typedef typename Superclass::TVertex TVertex; - - typedef fpa::Image::Functors::Base< _TInputImage, typename Superclass::TGrowFunction > TGrowFunction; + typedef typename TSeedsInterface::TNode TNode; + typedef typename TSeedsInterface::TNodes TNodes; public: itkNewMacro( Self ); itkTypeMacro( fpa::Image::RegionGrow, fpa::Base::RegionGrow ); protected: - RegionGrow( ); - virtual ~RegionGrow( ); - - virtual void _BeforeGenerateData( ) override; + RegionGrow( ) + : Superclass( ) + { + } + virtual ~RegionGrow( ) + { + } private: - // Purposely not defined + // Purposely not implemented. RegionGrow( const Self& other ); Self& operator=( const Self& other ); }; @@ -46,10 +67,6 @@ namespace fpa } // ecapseman -#ifndef ITK_MANUAL_INSTANTIATION -# include -#endif // ITK_MANUAL_INSTANTIATION - #endif // __fpa__Image__RegionGrow__h__ // eof - $RCSfile$