Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPolylineMaskImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPolylineMaskImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/10 00:24:01 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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   /* typedef for the polyline type */
00073   typedef TPolyline    PolylineType;
00074   
00075   /* typedef for the output image */
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   /* Roatation matrix generation matrix */
00106   void GenerateRotationMatrix();
00107 
00108   /* 3D Point transforming and projecting function */
00109   ProjPlanePointType TransformProjectPoint(PointType inputPoint);
00110   /* Generate Data */
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&); //purposely not implemented
00121   void operator=(const Self&); //purposely not implemented
00122 
00123   /* viewing direction and up vector */
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   /* focal distance of the camera */
00137   double m_FocalDistance;
00138   
00139 };
00140 
00141 } // end namespace itk
00142 
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkPolylineMaskImageFilter.txx"
00145 #endif
00146 
00147 #endif

Generated at Wed May 24 23:53:14 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000