ITK  4.2.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< class TInputImage, class TPolyline, class TVector,
37  class TOutputImage >
38 class ITK_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 
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 */
116  ProjPlanePointType TransformProjectPoint(PointType inputPoint);
117 
118  /* Generate Data */
119  void GenerateData(void);
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122 
123  itkConceptMacro( VectorHasNumericTraitsCheck,
125 
127 #endif
128 protected:
131  void PrintSelf(std::ostream & os, Indent indent) const;
133 
134 private:
135  PolylineMaskImageFilter(const Self &); //purposely not implemented
136  void operator=(const Self &); //purposely not implemented
137 
138  /* viewing direction and up vector */
141 
144 
147 
150 
151  /* focal distance of the camera */
153 };
154 } // end namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkPolylineMaskImageFilter.hxx"
158 #endif
159 
160 #endif
161