X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ffpa%2FImage%2FRegionGrow.h;h=5d7b4db227fabcbf2aeda4fd19f4b09a3041400b;hb=617f49bff4a6db5ed51b4f767c3634d1915fdced;hp=b8147985d53f1fb60c6e99bcd5f28a80d6dc8792;hpb=015105c2f44abb80923a59adfb1a01713506744f;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/RegionGrow.h b/lib/fpa/Image/RegionGrow.h index b814798..5d7b4db 100644 --- a/lib/fpa/Image/RegionGrow.h +++ b/lib/fpa/Image/RegionGrow.h @@ -1,60 +1,47 @@ -#ifndef __FPA__IMAGE__REGIONGROW__H__ -#define __FPA__IMAGE__REGIONGROW__H__ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + +#ifndef __fpa__Image__RegionGrow__h__ +#define __fpa__Image__RegionGrow__h__ -#include -#include -#include #include -#include +#include +#include +#include namespace fpa { namespace Image { /** - * @param I Input image type - * @param O Output image type */ - template< class I, class O = I > + template< class _TInputImage, class _TOutputImage > class RegionGrow - : public Algorithm< I, O, fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename O::PixelType, I, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > > + : public fpa::Base::RegionGrow< fpa::Image::Filter< _TInputImage, _TOutputImage >, fpa::Image::MarksInterface< _TInputImage::ImageDimension >, fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > > { public: - typedef fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename O::PixelType, I, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, O > > TBaseAlgorithm; - - typedef RegionGrow Self; - typedef Algorithm< I, O, TBaseAlgorithm > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - typedef typename Superclass::TInputImage TInputImage; - typedef typename Superclass::TOutputImage TOutputImage; - typedef typename Superclass::TVertex TVertex; - typedef typename Superclass::TValue TValue; - typedef typename Superclass::TResult TResult; - typedef typename Superclass::TSpace TSpace; - typedef typename Superclass::TGrowingFunction TGrowingFunction; + // Interfaces + typedef fpa::Image::Filter< _TInputImage, _TOutputImage > TFilter; + typedef fpa::Image::MarksInterface< _TInputImage::ImageDimension > TMarksInterface; + typedef fpa::Base::SeedsInterface< typename _TInputImage::IndexType, typename _TInputImage::IndexType::LexicographicCompare > TSeedsInterface; - protected: - typedef typename Superclass::_TVertices _TVertices; - typedef typename Superclass::_TCollision _TCollision; - typedef typename Superclass::_TCollisionsRow _TCollisionsRow; - typedef typename Superclass::_TCollisions _TCollisions; - typedef typename Superclass::_TNode _TNode; - typedef typename Superclass::_TNodes _TNodes; + // Smart pointers + typedef RegionGrow Self; + typedef fpa::Base::RegionGrow< TFilter, TMarksInterface, TSeedsInterface > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; public: itkNewMacro( Self ); - itkTypeMacro( RegionGrow, Algorithm ); + itkTypeMacro( fpa::Image::RegionGrow, fpa::Base::RegionGrow ); protected: - RegionGrow( ); - virtual ~RegionGrow( ); - - virtual void _InitResults( ); + RegionGrow( ) : Superclass( ) { } + virtual ~RegionGrow( ) { } private: - // Purposely not implemented RegionGrow( const Self& other ); Self& operator=( const Self& other ); }; @@ -63,8 +50,6 @@ namespace fpa } // ecapseman -#include - -#endif // __FPA__IMAGE__REGIONGROW__H__ +#endif // __fpa__Image__RegionGrow__h__ // eof - $RCSfile$