X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpExtensions%2FAlgorithms%2FRegionOfInterestImageCalculator.h;fp=lib%2FcpExtensions%2FAlgorithms%2FRegionOfInterestImageCalculator.h;h=84102adf7fb63b0b4994856fe203d3a58b279e24;hb=17f052241f7ab67015e3a34f7564da17da8a0e07;hp=0000000000000000000000000000000000000000;hpb=b689862afd79f8fdc07a10153404936110ccb440;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/RegionOfInterestImageCalculator.h b/lib/cpExtensions/Algorithms/RegionOfInterestImageCalculator.h new file mode 100644 index 0000000..84102ad --- /dev/null +++ b/lib/cpExtensions/Algorithms/RegionOfInterestImageCalculator.h @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------- +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ------------------------------------------------------------------------- + +#ifndef __CPEXTENSIONS__ALGORITHMS__REGIONOFINTERESTIMAGECALCULATOR__H__ +#define __CPEXTENSIONS__ALGORITHMS__REGIONOFINTERESTIMAGECALCULATOR__H__ + +#include +#include + +namespace cpExtensions +{ + namespace Algorithms + { + /** + */ + template< class _TImage > + class RegionOfInterestImageCalculator + : public itk::Object + { + public: + // Basic types + typedef RegionOfInterestImageCalculator Self; + typedef itk::Object Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + typedef _TImage TImage; + typedef typename _TImage::IndexType TIndex; + typedef typename _TImage::PixelType TPixel; + + public: + itkNewMacro( Self ); + itkTypeMacro( RegionOfInterestImageCalculator, itkObject ); + + itkGetConstObjectMacro( Image, _TImage ); + itkGetConstMacro( BackgroundValue, TPixel ); + itkGetConstMacro( Minimum, TIndex ); + itkGetConstMacro( Maximum, TIndex ); + + itkSetConstObjectMacro( Image, _TImage ); + itkSetMacro( BackgroundValue, TPixel ); + + public: + void Compute( ); + + protected: + RegionOfInterestImageCalculator( ); + virtual ~RegionOfInterestImageCalculator( ); + + private: + // Purposely not implemented + RegionOfInterestImageCalculator( const Self& ); + void operator=( const Self& ); + + protected: + typename _TImage::ConstPointer m_Image; + TPixel m_BackgroundValue; + TIndex m_Minimum; + TIndex m_Maximum; + }; + + } // ecapseman + +} // ecapseman + +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION + +#endif // __CPEXTENSIONS__ALGORITHMS__REGIONOFINTERESTIMAGECALCULATOR__H__ + +// eof - $RCSfile$