ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkPolylineMaskImageFilter.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 itkPolylineMaskImageFilter_h
19 #define itkPolylineMaskImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
36 template< typename TInputImage, typename TPolyline, typename TVector,
37  typename TOutputImage >
38 class ITK_TEMPLATE_EXPORT PolylineMaskImageFilter:public ImageToImageFilter< TInputImage, TOutputImage >
39 {
40 public:
46 
48  itkNewMacro(Self);
49 
52 
54  itkStaticConstMacro(NDimensions, unsigned int,
55  TInputImage::ImageDimension);
56 
57  itkStaticConstMacro(InputDimension, unsigned int, 3);
58 
60  typedef TInputImage InputImageType;
61  typedef typename InputImageType::ConstPointer InputImagePointer;
62  typedef typename InputImageType::RegionType InputImageRegionType;
63  typedef typename InputImageType::PixelType InputImagePixelType;
66 
69 
71  typedef TVector VectorType;
72 
74  typedef TPolyline PolylineType;
75 
77  typedef TOutputImage OutputImageType;
78  typedef typename OutputImageType::Pointer OutputImagePointer;
79  typedef typename OutputImageType::RegionType OutputImageRegionType;
80  typedef typename OutputImageType::PixelType OutputImagePixelType;
81 
83  void SetInput1(const InputImageType *image);
84 
86  void SetInput2(const PolylineType *polyline);
87 
89  itkSetMacro(ViewVector, VectorType);
90  itkGetConstMacro(ViewVector, VectorType);
92 
94  itkSetMacro(UpVector, VectorType);
95  itkGetConstMacro(UpVector, VectorType);
97 
99  itkSetMacro(CameraCenterPoint, PointType);
100  itkGetConstMacro(CameraCenterPoint, PointType);
102 
104  itkSetMacro(FocalDistance, double);
105  itkGetConstMacro(FocalDistance, double);
107 
109  itkSetMacro(FocalPoint, ProjPlanePointType);
110  itkGetConstMacro(FocalPoint, ProjPlanePointType);
112 
114  void GenerateRotationMatrix();
115 
117  ProjPlanePointType TransformProjectPoint(PointType inputPoint);
118 
119 #ifdef ITK_USE_CONCEPT_CHECKING
120  // Begin concept checking
121  itkConceptMacro( VectorHasNumericTraitsCheck,
123  // End concept checking
124 #endif
125 
126 protected:
128  virtual ~PolylineMaskImageFilter() ITK_OVERRIDE {}
129  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
130 
131  virtual void GenerateData() ITK_OVERRIDE;
132 
133 private:
134  ITK_DISALLOW_COPY_AND_ASSIGN(PolylineMaskImageFilter);
135 
136  VectorType m_ViewVector;
137  VectorType m_UpVector;
138 
139  MatrixType m_RotationMatrix;
140 
141  PointType m_CameraCenterPoint;
142 
143  ProjPlanePointType m_FocalPoint;
144 
145  double m_FocalDistance;
146 };
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkPolylineMaskImageFilter.hxx"
151 #endif
152 
153 #endif
ImageToImageFilter< TInputImage, TOutputImage > Superclass
OutputImageType::PixelType OutputImagePixelType
Matrix< double, itkGetStaticConstMacro(InputDimension), itkGetStaticConstMacro(InputDimension) > MatrixType
OutputImageType::Pointer OutputImagePointer
Base class for all process objects that output image data.
Implements image masking operation constrained by a polyline on a plane perpendicular to certain view...
InputImageType::RegionType InputImageRegionType
InputImageType::PixelType InputImagePixelType
InputImageType::ConstPointer InputImagePointer
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
SmartPointer< const Self > ConstPointer
OutputImageType::RegionType OutputImageRegionType