ITK  5.0.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:
52  ITK_DISALLOW_COPY_AND_ASSIGN(PolylineMask2DImageFilter);
53 
59 
61  itkNewMacro(Self);
62 
65 
67  static constexpr unsigned int NDimensions = TInputImage::ImageDimension;
68  static constexpr unsigned int NOutputDimensions = TOutputImage::ImageDimension;
69 
71  using InputImageType = TInputImage;
72  using InputImageConstPointer = typename InputImageType::ConstPointer;
73  using InputImagePointer = typename InputImageType::Pointer;
75  using InputImagePixelType = typename InputImageType::PixelType;
76 
77  /* type alias for the polyline type */
78  using PolylineType = TPolyline;
79 
80  /* type alias for the output image */
81  using OutputImageType = TOutputImage;
82  using OutputImagePointer = typename OutputImageType::Pointer;
84  using OutputImagePixelType = typename OutputImageType::PixelType;
85 
87  void SetInput1(const InputImageType *image);
88 
89  void SetInput2(const PolylineType *polyline);
90 
91 #ifdef ITK_USE_CONCEPT_CHECKING
92  // Begin concept checking
93  itkConceptMacro( SameDimensionCheck,
95  itkConceptMacro( IntConvertibleOutputCheck,
97  itkConceptMacro( OutputEqualityComparableCheck,
99  itkConceptMacro( InputConvertibleToOutputCheck,
101  // End concept checking
102 #endif
103 
104 protected:
106  ~PolylineMask2DImageFilter() override = default;
107 
108  void GenerateData() override;
109 };
110 } // end namespace itk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkPolylineMask2DImageFilter.hxx"
114 #endif
115 
116 #endif
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::Pointer InputImagePointer
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
Base class for filters that take an image as input and produce an image as output.
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer
Implements 2D image masking operation constrained by a contour.