1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __CPPLUGINS__EXTENSIONS__ALGORITHMS__RGBIMAGETOHSVCHANNELSFILTER__H__
6 #define __CPPLUGINS__EXTENSIONS__ALGORITHMS__RGBIMAGETOHSVCHANNELSFILTER__H__
8 #include <itkImageToImageFilter.h>
18 template< class I, class O >
19 class RGBImageToHSVChannelsFilter
20 : public itk::ImageToImageFilter< I, O >
23 typedef RGBImageToHSVChannelsFilter Self;
24 typedef itk::ImageToImageFilter< I, O > Superclass;
25 typedef itk::SmartPointer< Self > Pointer;
26 typedef itk::SmartPointer< const Self > ConstPointer;
28 typedef I TInputImage;
29 typedef O TOutputImage;
30 typedef typename I::PixelType TInputPixel;
31 typedef typename O::PixelType TOutputPixel;
35 itkTypeMacro( RGBImageToHSVChannelsFilter, itkImageToImageFilter );
39 O* GetSaturationOutput( );
42 const O* GetHueOutput( ) const;
43 const O* GetSaturationOutput( ) const;
44 const O* GetValueOutput( ) const;
46 void GraftHueOutput( O* hue );
47 void GraftSaturationOutput( O* saturation );
48 void GraftValueOutput( O* value );
51 RGBImageToHSVChannelsFilter( );
52 virtual ~RGBImageToHSVChannelsFilter( );
54 virtual void BeforeThreadedGenerateData( );
55 virtual void AfterThreadedGenerateData( );
57 virtual void ThreadedGenerateData(
58 const typename Superclass::OutputImageRegionType& region,
59 itk::ThreadIdType threadId
64 const TInputPixel& RGB,
65 TOutputPixel& H, TOutputPixel& S, TOutputPixel& V
69 // Purposely not implemented
70 RGBImageToHSVChannelsFilter( const Self& other );
71 void operator=( const Self& other );
80 #include <cpPlugins/Extensions/Algorithms/RGBImageToHSVChannelsFilter.hxx>
82 #endif // __CPPLUGINS__EXTENSIONS__ALGORITHMS__RGBIMAGETOHSVCHANNELSFILTER__H__