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);
00084
00086 itkSetMacro(ViewVector,VectorType);
00087 itkGetConstMacro(ViewVector,VectorType);
00088
00090 itkSetMacro(UpVector,VectorType);
00091 itkGetConstMacro(UpVector,VectorType);
00092
00094 itkSetMacro(CameraCenterPoint,PointType);
00095 itkGetConstMacro(CameraCenterPoint,PointType);
00096
00098 itkSetMacro(FocalDistance,double);
00099 itkGetConstMacro(FocalDistance,double);
00100
00102 itkSetMacro(FocalPoint,ProjPlanePointType);
00103 itkGetConstMacro(FocalPoint,ProjPlanePointType);
00104
00105
00106 void GenerateRotationMatrix();
00107
00108
00109 ProjPlanePointType TransformProjectPoint(PointType inputPoint);
00110
00111 void GenerateData(void);
00112
00113
00114 protected:
00115 PolylineMaskImageFilter();
00116 virtual ~PolylineMaskImageFilter() {};
00117 void PrintSelf(std::ostream& os, Indent indent) const;
00118
00119 private:
00120 PolylineMaskImageFilter(const Self&);
00121 void operator=(const Self&);
00122
00123
00124 VectorType m_ViewVector;
00125 VectorType m_UpVector;
00126
00128 MatrixType m_RotationMatrix;
00129
00131 PointType m_CameraCenterPoint;
00132
00134 ProjPlanePointType m_FocalPoint;
00135
00136
00137 double m_FocalDistance;
00138
00139 };
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkPolylineMaskImageFilter.txx"
00145 #endif
00146
00147 #endif