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: 2006/03/30 15:36:25 $
00007   Version:   $Revision: 1.7 $
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);
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   /* Roatation matrix generation matrix */
00112   void GenerateRotationMatrix();
00113 
00114   /* 3D Point transforming and projecting function */
00115   ProjPlanePointType TransformProjectPoint(PointType inputPoint);
00116   /* Generate Data */
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&); //purposely not implemented
00134   void operator=(const Self&); //purposely not implemented
00135 
00136   /* viewing direction and up vector */
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   /* focal distance of the camera */
00150   double m_FocalDistance;
00151   
00152 };
00153 
00154 } // end namespace itk
00155 
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkPolylineMaskImageFilter.txx"
00158 #endif
00159 
00160 #endif
00161 

Generated at Sun Sep 23 13:55:16 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000