ITK  4.9.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 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 
73  /* typedef for the polyline type */
74  typedef TPolyline PolylineType;
75 
76  /* typedef for the output image */
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 
85  void SetInput2(const PolylineType *polyline);
86 
88  itkSetMacro(ViewVector, VectorType);
89  itkGetConstMacro(ViewVector, VectorType);
91 
93  itkSetMacro(UpVector, VectorType);
94  itkGetConstMacro(UpVector, VectorType);
96 
98  itkSetMacro(CameraCenterPoint, PointType);
99  itkGetConstMacro(CameraCenterPoint, PointType);
101 
103  itkSetMacro(FocalDistance, double);
104  itkGetConstMacro(FocalDistance, double);
106 
108  itkSetMacro(FocalPoint, ProjPlanePointType);
109  itkGetConstMacro(FocalPoint, ProjPlanePointType);
111 
112  /* Roatation matrix generation matrix */
113  void GenerateRotationMatrix();
114 
115  /* 3D Point transforming and projecting function */
117 
118 #ifdef ITK_USE_CONCEPT_CHECKING
119  // Begin concept checking
120  itkConceptMacro( VectorHasNumericTraitsCheck,
122  // End concept checking
123 #endif
124 
125 protected:
128  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
129 
130  virtual void GenerateData() ITK_OVERRIDE;
131 
132 private:
133  PolylineMaskImageFilter(const Self &) ITK_DELETE_FUNCTION;
134  void operator=(const Self &) ITK_DELETE_FUNCTION;
135 
136  /* viewing direction and up vector */
139 
142 
145 
148 
149  /* focal distance of the camera */
151 };
152 } // end namespace itk
153 
154 #ifndef ITK_MANUAL_INSTANTIATION
155 #include "itkPolylineMaskImageFilter.hxx"
156 #endif
157 
158 #endif
ImageToImageFilter< TInputImage, TOutputImage > Superclass
OutputImageType::PixelType OutputImagePixelType
Matrix< double, itkGetStaticConstMacro(InputDimension), itkGetStaticConstMacro(InputDimension) > MatrixType
static const unsigned int NDimensions
OutputImageType::Pointer OutputImagePointer
Base class for all process objects that output image data.
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Implements image masking operation constrained by a polyline on a plane perpendicular to certain view...
InputImageType::RegionType InputImageRegionType
InputImageType::PixelType InputImagePixelType
virtual void GenerateData() override
static const unsigned int InputDimension
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
void SetInput1(const InputImageType *image)
void SetInput2(const PolylineType *polyline)
#define itkConceptMacro(name, concept)
SmartPointer< const Self > ConstPointer
ProjPlanePointType TransformProjectPoint(PointType inputPoint)
OutputImageType::RegionType OutputImageRegionType