1 #ifndef __CPEXTENSIONS__ALGORITHMS__SPATIALOBJECTMASKIMAGEFILTER__H__
2 #define __CPEXTENSIONS__ALGORITHMS__SPATIALOBJECTMASKIMAGEFILTER__H__
4 #include <itkConceptChecking.h>
5 #include <itkInPlaceImageFilter.h>
6 #include <itkSpatialObject.h>
14 template< class I, class O = I >
15 class SpatialObjectMaskImageFilter
16 : public itk::InPlaceImageFilter< I, O >
19 typedef SpatialObjectMaskImageFilter Self;
20 typedef itk::InPlaceImageFilter< I, O > Superclass;
21 typedef itk::SmartPointer< Self > Pointer;
22 typedef itk::SmartPointer< const Self > ConstPointer;
24 typedef I TInputImage;
25 typedef O TOutputImage;
27 itkStaticConstMacro( InputDimension, unsigned int, I::ImageDimension );
28 itkStaticConstMacro( OutputDimension, unsigned int, O::ImageDimension );
30 #ifdef ITK_USE_CONCEPT_CHECKING
31 // Begin concept checking
34 ( itk::Concept::SameDimension< InputDimension, OutputDimension > )
36 // End concept checking
39 typedef typename I::RegionType TRegion;
40 typedef typename O::PixelType TOutPixel;
41 typedef itk::SpatialObject< InputDimension > TSpatialObject;
45 itkTypeMacro( SpatialObjectMaskImageFilter, itk::InPlaceImageFilter );
47 itkGetObjectMacro( SpatialObject, TSpatialObject );
48 itkGetConstObjectMacro( SpatialObject, TSpatialObject );
49 itkGetConstMacro( OutsideValue, TOutPixel );
51 itkSetObjectMacro( SpatialObject, TSpatialObject );
52 itkSetMacro( OutsideValue, TOutPixel );
55 SpatialObjectMaskImageFilter( );
56 virtual ~SpatialObjectMaskImageFilter( );
58 virtual void GenerateOutputInformation( );
59 virtual void ThreadedGenerateData(
60 const TRegion& region, itk::ThreadIdType threadId
64 // Purposely not implemented.
65 SpatialObjectMaskImageFilter( const Self& other );
66 Self& operator=( const Self& other );
69 typename TSpatialObject::Pointer m_SpatialObject;
70 TOutPixel m_OutsideValue;
77 #ifndef ITK_MANUAL_INSTANTIATION
78 #include <cpExtensions/Algorithms/SpatialObjectMaskImageFilter.hxx>
79 #endif // ITK_MANUAL_INSTANTIATION
81 #endif // __CPEXTENSIONS__ALGORITHMS__SPATIALOBJECTMASKIMAGEFILTER__H__