ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkPolylineMask2DImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkPolylineMask2DImageFilter_h
19 #define itkPolylineMask2DImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
47 template< typename TInputImage, typename TPolyline,
48  typename TOutputImage >
49 class ITK_TEMPLATE_EXPORT PolylineMask2DImageFilter:public ImageToImageFilter< TInputImage, TOutputImage >
50 {
51 public:
57 
59  itkNewMacro(Self);
60 
63 
65  itkStaticConstMacro(NDimensions, unsigned int,
66  TInputImage::ImageDimension);
67  itkStaticConstMacro(NOutputDimensions, unsigned int,
68  TOutputImage::ImageDimension);
70 
72  typedef TInputImage InputImageType;
73  typedef typename InputImageType::ConstPointer InputImageConstPointer;
74  typedef typename InputImageType::Pointer InputImagePointer;
75  typedef typename InputImageType::RegionType InputImageRegionType;
76  typedef typename InputImageType::PixelType InputImagePixelType;
77 
78  /* typedef for the polyline type */
79  typedef TPolyline PolylineType;
80 
81  /* typedef for the output image */
82  typedef TOutputImage OutputImageType;
83  typedef typename OutputImageType::Pointer OutputImagePointer;
84  typedef typename OutputImageType::RegionType OutputImageRegionType;
85  typedef typename OutputImageType::PixelType OutputImagePixelType;
86 
88  void SetInput1(const InputImageType *image);
89 
90  void SetInput2(const PolylineType *polyline);
91 
92 #ifdef ITK_USE_CONCEPT_CHECKING
93  // Begin concept checking
94  itkConceptMacro( SameDimensionCheck,
96  itkConceptMacro( IntConvertibleOutputCheck,
98  itkConceptMacro( OutputEqualityComparableCheck,
100  itkConceptMacro( InputConvertibleToOutputCheck,
102  // End concept checking
103 #endif
104 
105 protected:
107  virtual ~PolylineMask2DImageFilter() ITK_OVERRIDE {}
108 
109  virtual void GenerateData() ITK_OVERRIDE;
110 
111 private:
112  ITK_DISALLOW_COPY_AND_ASSIGN(PolylineMask2DImageFilter);
113 };
114 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 #include "itkPolylineMask2DImageFilter.hxx"
118 #endif
119 
120 #endif
OutputImageType::PixelType OutputImagePixelType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
InputImageType::PixelType InputImagePixelType
InputImageType::ConstPointer InputImageConstPointer
InputImageType::RegionType InputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Base class for filters that take an image as input and produce an image as output.
#define itkConceptMacro(name, concept)
Implements 2D image masking operation constrained by a contour.