ITK  4.6.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 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  /* Generate Data */
93  void GenerateData(void);
94 
95 #ifdef ITK_USE_CONCEPT_CHECKING
96  // Begin concept checking
97  itkConceptMacro( SameDimensionCheck,
99  itkConceptMacro( IntConvertibleOutputCheck,
101  itkConceptMacro( OutputEqualityComparableCheck,
103  itkConceptMacro( InputConvertibleToOutputCheck,
105  // End concept checking
106 #endif
107 
108 protected:
111 
112 private:
113  PolylineMask2DImageFilter(const Self &); //purposely not implemented
114  void operator=(const Self &); //purposely not implemented
115 };
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkPolylineMask2DImageFilter.hxx"
120 #endif
121 
122 #endif
void operator=(const Self &)
OutputImageType::PixelType OutputImagePixelType
void SetInput1(const InputImageType *image)
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void SetInput2(const PolylineType *polyline)
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.
static const unsigned int NOutputDimensions
#define itkConceptMacro(name, concept)
Implements 2D image masking operation constrained by a contour.