ITK  4.6.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  /* Generate Data */
119  void GenerateData(void);
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122  // Begin concept checking
123  itkConceptMacro( VectorHasNumericTraitsCheck,
125  // End concept checking
126 #endif
127 
128 protected:
131  void PrintSelf(std::ostream & os, Indent indent) const;
132 
133 private:
134  PolylineMaskImageFilter(const Self &); //purposely not implemented
135  void operator=(const Self &); //purposely not implemented
136 
137  /* viewing direction and up vector */
140 
143 
146 
149 
150  /* focal distance of the camera */
152 };
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkPolylineMaskImageFilter.hxx"
157 #endif
158 
159 #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.
Implements image masking operation constrained by a polyline on a plane perpendicular to certain view...
InputImageType::RegionType InputImageRegionType
InputImageType::PixelType InputImagePixelType
void PrintSelf(std::ostream &os, Indent indent) const
void operator=(const Self &)
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