1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __CPEXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__
6 #define __CPEXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__
8 #include <itkImageToImageFilter.h>
10 namespace cpExtensions
16 template< class I, class O, class C >
17 class RGBImageToOtherChannelsFilter
18 : public itk::ImageToImageFilter< I, O >
21 typedef RGBImageToOtherChannelsFilter Self;
22 typedef itk::ImageToImageFilter< I, O > Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef I TInputImage;
27 typedef O TOutputImage;
29 typedef typename I::PixelType TInputPixel;
30 typedef typename O::PixelType TOutputPixel;
34 itkTypeMacro( RGBImageToOtherChannelsFilter, itkImageToImageFilter );
41 const O* GetChannel1( ) const;
42 const O* GetChannel2( ) const;
43 const O* GetChannel3( ) const;
45 void GraftChannel1( O* c1 );
46 void GraftChannel2( O* c2 );
47 void GraftChannel3( O* c3 );
50 RGBImageToOtherChannelsFilter( );
51 virtual ~RGBImageToOtherChannelsFilter( );
53 virtual void BeforeThreadedGenerateData( );
54 virtual void AfterThreadedGenerateData( );
56 virtual void ThreadedGenerateData(
57 const typename Superclass::OutputImageRegionType& region,
58 itk::ThreadIdType threadId
62 // Purposely not implemented
63 RGBImageToOtherChannelsFilter( const Self& other );
64 void operator=( const Self& other );
74 #include <cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.hxx>
76 #endif // __CPEXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__