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

itkConformalFlatteningMeshFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkConformalFlatteningMeshFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-02-24 12:56:51 $
00007   Version:   $Revision: 1.9 $
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 __itkConformalFlatteningMeshFilter_h
00018 #define __itkConformalFlatteningMeshFilter_h
00019 
00020 #include "itkMesh.h"
00021 #include "itkMeshToMeshFilter.h"
00022 
00023 // vnl headers
00024 #include <vnl/vnl_math.h>
00025 #include <vnl/vnl_sparse_matrix.h>
00026 
00027 namespace itk
00028 {
00029 
00039 template <class TPixelType>
00040 class ITK_EXPORT ConformalFlatteningMeshFilter :
00041     public MeshToMeshFilter< Mesh<TPixelType, 3>,Mesh<TPixelType, 3> >
00042 {
00043 public:
00045   typedef ConformalFlatteningMeshFilter  Self;
00046   typedef Mesh< TPixelType, 3 >          Mesh3DType;
00047 
00048   typedef Mesh3DType   TInputMesh;
00049   typedef Mesh3DType   TOutputMesh;
00050   typedef TInputMesh   InputMeshType;
00051   typedef TOutputMesh  OutputMeshType;
00052 
00053   typedef MeshToMeshFilter<TInputMesh,TOutputMesh> Superclass;
00054 
00055   typedef SmartPointer<Self>        Pointer;
00056   typedef SmartPointer<const Self>  ConstPointer;
00057 
00058   typedef typename InputMeshType::Pointer      InputMeshPointer;
00059   typedef typename OutputMeshType::Pointer     OutputMeshPointer;
00060   typedef typename InputMeshType::PointType    InputPointType;
00061   typedef typename OutputMeshType::PointType   OutputPointType;
00062 
00064   //typedef typename TInputMesh::CoordRepType          CoordRepType;
00065   typedef double CoordRepType;
00066 
00068   itkNewMacro(Self);
00069 
00071   itkTypeMacro(ConformalFlatteningMeshFilter,MeshToMeshFilter);
00072 
00073   void SetInput(TInputMesh *input);
00074 
00076   itkStaticConstMacro(InputPointDimension, unsigned int,
00077      ::itk::GetMeshDimension< TInputMesh >::PointDimension );
00078   itkStaticConstMacro(OutputPointDimension, unsigned int,
00079      ::itk::GetMeshDimension< TOutputMesh >::PointDimension );
00081 
00082   typedef typename InputMeshType::PointsContainer    PointsContainer;
00083   typedef typename InputMeshType::CellsContainer     CellsContainer;
00084   typedef typename InputMeshType::PointIdentifier    PointIdentifier;
00085   typedef typename InputMeshType::CellIdentifier     CellIdentifier;
00086   typedef typename PointsContainer::ConstIterator    PointIterator;
00087   typedef typename CellsContainer::ConstIterator     CellIterator;
00088   typedef typename InputMeshType::CellType           CellType;
00089   typedef typename CellType::PointIdIterator         PointIdIterator;
00090   typedef typename CellType::CellAutoPointer         CellAutoPointer;
00091 
00097   void SetPolarCellIdentifier( CellIdentifier cellId );
00098 
00101   void SetScale( double );
00102 
00104   void MapToSphere( void );
00105 
00108   void MapToPlane( void );
00109 
00110 protected:
00111   ConformalFlatteningMeshFilter();
00112   ~ConformalFlatteningMeshFilter() {};
00113   void PrintSelf(std::ostream& os, Indent indent) const;
00114 
00116   virtual void GenerateData( void );
00117 
00118 private:
00119   //purposely not implemented
00120   ConformalFlatteningMeshFilter(const ConformalFlatteningMeshFilter&);
00121   //purposely not implemented
00122   void operator=(const ConformalFlatteningMeshFilter&);
00123 
00124   typedef vnl_vector< CoordRepType >       VectorCoordType;
00125   typedef vnl_sparse_matrix<CoordRepType>  SparseMatrixCoordType;
00126 
00129   unsigned int m_PolarCellIdentifier;
00130 
00132   bool    m_MapToSphere;
00133 
00136   double  m_MapScale;
00137 };
00138 
00139 } // end namespace itk
00140 
00141 #ifndef ITK_MANUAL_INSTANTIATION
00142 #include "itkConformalFlatteningMeshFilter.txx"
00143 #endif
00144 
00145 #endif
00146 

Generated at Mon Apr 14 12:03:28 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000