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: 2009-09-17 11:14:57 $
00007   Version:   $Revision: 1.13 $
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 // #include "itkConformalFlatteningFunction.h"
00028 
00029 namespace itk
00030 {
00031 
00041 template <class TInputMesh, class TOutputMesh>
00042 class ITK_EXPORT ConformalFlatteningMeshFilter :
00043     public MeshToMeshFilter<TInputMesh, TOutputMesh>
00044 {
00045 public:
00047   typedef ConformalFlatteningMeshFilter  Self;
00048 
00049   typedef TInputMesh   InputMeshType;
00050   typedef TOutputMesh  OutputMeshType;
00051 
00052   typedef MeshToMeshFilter<TInputMesh,TOutputMesh> Superclass;
00053 
00054   typedef SmartPointer<Self>        Pointer;
00055   typedef SmartPointer<const Self>  ConstPointer;
00056 
00057   typedef typename InputMeshType::ConstPointer InputMeshConstPointer;
00058   typedef typename OutputMeshType::Pointer     OutputMeshPointer;
00059   typedef typename InputMeshType::PointType    InputPointType;
00060   typedef typename OutputMeshType::PointType   OutputPointType;
00061 
00063   //typedef typename TInputMesh::CoordRepType          CoordRepType;
00064   typedef double CoordRepType;
00065 
00067   itkNewMacro(Self);
00068 
00070   itkTypeMacro(ConformalFlatteningMeshFilter,MeshToMeshFilter);
00071 
00073   itkStaticConstMacro(InputPointDimension, unsigned int,
00074      ::itk::GetMeshDimension< TInputMesh >::PointDimension );
00075   itkStaticConstMacro(OutputPointDimension, unsigned int,
00076      ::itk::GetMeshDimension< TOutputMesh >::PointDimension );
00078 
00079   typedef typename InputMeshType::PointsContainer    PointsContainer;
00080   typedef typename InputMeshType::CellsContainer     CellsContainer;
00081   typedef typename InputMeshType::PointIdentifier    PointIdentifier;
00082   typedef typename InputMeshType::CellIdentifier     CellIdentifier;
00083   typedef typename PointsContainer::ConstIterator    PointIterator;
00084   typedef typename CellsContainer::ConstIterator     CellIterator;
00085   typedef typename InputMeshType::CellType           CellType;
00086   typedef typename CellType::PointIdIterator         PointIdIterator;
00087   typedef typename CellType::CellAutoPointer         CellAutoPointer;
00088 
00094   void SetPolarCellIdentifier( CellIdentifier cellId );
00095 
00098   void SetScale( double );
00099 
00101   void MapToSphere( void );
00102 
00105   void MapToPlane( void );
00106 
00107 protected:
00108   ConformalFlatteningMeshFilter();
00109   ~ConformalFlatteningMeshFilter() {};
00110   void PrintSelf(std::ostream& os, Indent indent) const;
00111 
00113   virtual void GenerateData( void );
00114 
00115 private:
00116   //purposely not implemented
00117   ConformalFlatteningMeshFilter(const ConformalFlatteningMeshFilter&);
00118   //purposely not implemented
00119   void operator=(const ConformalFlatteningMeshFilter&);
00120 
00121   typedef vnl_vector< CoordRepType >       VectorCoordType;
00122   typedef vnl_sparse_matrix<CoordRepType>  SparseMatrixCoordType;
00123 
00126   unsigned int m_PolarCellIdentifier;
00127 
00129   bool    m_MapToSphere;
00130 
00133   double  m_MapScale;
00134 };
00135 
00136 } // end namespace itk
00137 
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkConformalFlatteningMeshFilter.txx"
00140 #endif
00141 
00142 #endif
00143 

Generated at Fri Apr 16 18:07:27 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000