Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkPolylineMaskImageFilter_h
00018 #define __itkPolylineMaskImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImageRegionIteratorWithIndex.h"
00022
00023 namespace itk
00024 {
00025
00035 template <class TInputImage, class TPolyline, class TVector,
00036 class TOutputImage>
00037 class ITK_EXPORT PolylineMaskImageFilter:public ImageToImageFilter<TInputImage, TOutputImage>
00038 {
00039 public:
00041 typedef PolylineMaskImageFilter Self;
00042 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00043 typedef SmartPointer<Self> Pointer;
00044 typedef SmartPointer<const Self> ConstPointer;
00045
00047 itkNewMacro(Self);
00048
00050 itkTypeMacro( PolylineMaskImageFilter, ImageToImageFilter );
00051
00053 itkStaticConstMacro(NDimensions, unsigned int,
00054 TInputImage::ImageDimension);
00055
00056 itkStaticConstMacro(InputDimension, unsigned int, 3);
00057
00059 typedef TInputImage InputImageType;
00060 typedef typename InputImageType::ConstPointer InputImagePointer;
00061 typedef typename InputImageType::RegionType InputImageRegionType;
00062 typedef typename InputImageType::PixelType InputImagePixelType;
00063 typedef Point<double,3> PointType;
00064 typedef Point<double,2> ProjPlanePointType;
00065
00067 typedef Matrix<double, itkGetStaticConstMacro(InputDimension), itkGetStaticConstMacro(InputDimension)> MatrixType;
00068
00070 typedef TVector VectorType;
00071
00072
00073 typedef TPolyline PolylineType;
00074
00075
00076 typedef TOutputImage OutputImageType;
00077 typedef typename OutputImageType::Pointer OutputImagePointer;
00078 typedef typename OutputImageType::RegionType OutputImageRegionType;
00079 typedef typename OutputImageType::PixelType OutputImagePixelType;
00080
00082 void SetInput1( const InputImageType * image);
00083 void SetInput2( const PolylineType * polyline);
00085
00087 itkSetMacro(ViewVector,VectorType);
00088 itkGetConstMacro(ViewVector,VectorType);
00090
00092 itkSetMacro(UpVector,VectorType);
00093 itkGetConstMacro(UpVector,VectorType);
00095
00097 itkSetMacro(CameraCenterPoint,PointType);
00098 itkGetConstMacro(CameraCenterPoint,PointType);
00100
00102 itkSetMacro(FocalDistance,double);
00103 itkGetConstMacro(FocalDistance,double);
00105
00107 itkSetMacro(FocalPoint,ProjPlanePointType);
00108 itkGetConstMacro(FocalPoint,ProjPlanePointType);
00110
00111
00112 void GenerateRotationMatrix();
00113
00114
00115 ProjPlanePointType TransformProjectPoint(PointType inputPoint);
00116
00117 void GenerateData(void);
00118
00119 #ifdef ITK_USE_CONCEPT_CHECKING
00120
00121 itkConceptMacro(VectorHasNumericTraitsCheck,
00122 (Concept::HasNumericTraits<typename VectorType::ValueType>));
00123
00125 #endif
00126
00127 protected:
00128 PolylineMaskImageFilter();
00129 virtual ~PolylineMaskImageFilter() {};
00130 void PrintSelf(std::ostream& os, Indent indent) const;
00131
00132 private:
00133 PolylineMaskImageFilter(const Self&);
00134 void operator=(const Self&);
00135
00136
00137 VectorType m_ViewVector;
00138 VectorType m_UpVector;
00139
00141 MatrixType m_RotationMatrix;
00142
00144 PointType m_CameraCenterPoint;
00145
00147 ProjPlanePointType m_FocalPoint;
00148
00149
00150 double m_FocalDistance;
00151
00152 };
00153
00154 }
00155
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkPolylineMaskImageFilter.txx"
00158 #endif
00159
00160 #endif
00161