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: 2008-07-09 20:17:38 $
00007   Version:   $Revision: 1.12 $
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::Pointer      InputMeshPointer;
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 
00072   void SetInput(TInputMesh *input);
00073 
00075   itkStaticConstMacro(InputPointDimension, unsigned int,
00076      ::itk::GetMeshDimension< TInputMesh >::PointDimension );
00077   itkStaticConstMacro(OutputPointDimension, unsigned int,
00078      ::itk::GetMeshDimension< TOutputMesh >::PointDimension );
00080 
00081   typedef typename InputMeshType::PointsContainer    PointsContainer;
00082   typedef typename InputMeshType::CellsContainer     CellsContainer;
00083   typedef typename InputMeshType::PointIdentifier    PointIdentifier;
00084   typedef typename InputMeshType::CellIdentifier     CellIdentifier;
00085   typedef typename PointsContainer::ConstIterator    PointIterator;
00086   typedef typename CellsContainer::ConstIterator     CellIterator;
00087   typedef typename InputMeshType::CellType           CellType;
00088   typedef typename CellType::PointIdIterator         PointIdIterator;
00089   typedef typename CellType::CellAutoPointer         CellAutoPointer;
00090 
00096   void SetPolarCellIdentifier( CellIdentifier cellId );
00097 
00100   void SetScale( double );
00101 
00103   void MapToSphere( void );
00104 
00107   void MapToPlane( void );
00108 
00109 protected:
00110   ConformalFlatteningMeshFilter();
00111   ~ConformalFlatteningMeshFilter() {};
00112   void PrintSelf(std::ostream& os, Indent indent) const;
00113 
00115   virtual void GenerateData( void );
00116 
00117 private:
00118   //purposely not implemented
00119   ConformalFlatteningMeshFilter(const ConformalFlatteningMeshFilter&);
00120   //purposely not implemented
00121   void operator=(const ConformalFlatteningMeshFilter&);
00122 
00123   typedef vnl_vector< CoordRepType >       VectorCoordType;
00124   typedef vnl_sparse_matrix<CoordRepType>  SparseMatrixCoordType;
00125 
00128   unsigned int m_PolarCellIdentifier;
00129 
00131   bool    m_MapToSphere;
00132 
00135   double  m_MapScale;
00136 };
00137 
00138 } // end namespace itk
00139 
00140 #ifndef ITK_MANUAL_INSTANTIATION
00141 #include "itkConformalFlatteningMeshFilter.txx"
00142 #endif
00143 
00144 #endif
00145 

Generated at Thu May 28 09:40:30 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000