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

itkQuadEdgeMeshParam.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkQuadEdgeMeshParam.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-03 22:03:41 $
00007   Version:   $Revision: 1.4 $
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 
00018 #ifndef __itkQuadEdgeMeshParam_h
00019 #define __itkQuadEdgeMeshParam_h
00020 
00021 #include "itkQuadEdgeMeshToQuadEdgeMeshFilter.h"
00022 #include "itkQuadEdgeMeshBorderTransform.h"
00023 #include "itkQuadEdgeMeshParamMatrixCoefficients.h"
00024 
00025 namespace itk
00026 {
00034 template< class TInputMesh, class TOutputMesh, class TSolverTraits >
00035 class QuadEdgeMeshParam :
00036         public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
00037 {
00038 public:
00039 
00041    typedef QuadEdgeMeshParam                         Self;
00042    typedef QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh,
00043      TOutputMesh >                                   Superclass;
00044    typedef SmartPointer< Self >                      Pointer;
00045    typedef SmartPointer< const Self >                ConstPointer;
00046 
00048    typedef TInputMesh                              InputMeshType;
00049    typedef typename InputMeshType::Pointer         InputMeshPointer;
00050    typedef typename InputMeshType::ConstPointer    InputMeshConstPointer;
00051    typedef typename InputMeshType::CoordRepType    InputCoordRepType;
00052    typedef typename InputMeshType::PointType       InputPointType;
00053    typedef typename InputPointType::VectorType     InputPointVectorType;
00054    typedef typename InputMeshType::PointIdentifier InputPointIdentifier;
00055    typedef typename InputMeshType::QEType          InputQEType;
00056    typedef typename InputMeshType::VectorType      InputVectorType;
00057    typedef typename InputMeshType::EdgeListType    InputEdgeListType;
00058    typedef typename InputMeshType::PixelType       InputPixelType;
00059    typedef typename InputMeshType::Traits          InputTraits;
00060 
00061    itkStaticConstMacro( InputVDimension, unsigned int,
00062        InputMeshType::PointDimension );
00063 
00064    typedef typename InputMeshType::PointsContainer InputPointsContainer;
00065    typedef typename InputMeshType::PointsContainerConstIterator
00066       InputPointsContainerConstIterator;
00067 
00068    typedef typename InputMeshType::CellsContainerConstIterator
00069       InputCellsContainerConstIterator;
00070    typedef typename InputMeshType::EdgeCellType    InputEdgeCellType;
00071    typedef typename InputMeshType::PolygonCellType InputPolygonCellType;
00072    typedef typename InputMeshType::PointIdList     InputPointIdList;
00073 
00074    typedef typename InputQEType::IteratorGeom InputQEIterator;
00075 
00076    typedef std::map< InputPointIdentifier, InputPointIdentifier >
00077       InputMapPointIdentifier;
00078    typedef typename InputMapPointIdentifier::iterator
00079       InputMapPoinIdentifierIterator;
00080 
00082    typedef TOutputMesh                               OutputMeshType;
00083    typedef typename OutputMeshType::Pointer          OutputMeshPointer;
00084    typedef typename OutputMeshType::ConstPointer     OutputMeshConstPointer;
00085    typedef typename OutputMeshType::CoordRepType     OutputCoordRepType;
00086    typedef typename OutputMeshType::PointType        OutputPointType;
00087    typedef typename OutputMeshType::PointIdentifier  OutputPointIdentifier;
00088    typedef typename OutputMeshType::QEType           OutputQEType;
00089    typedef typename OutputMeshType::VectorType       OutputVectorType;
00090    typedef typename OutputQEType::IteratorGeom       OutputQEIterator;
00091    typedef typename OutputMeshType::PointsContainerIterator
00092      OutputPointsContainerIterator;
00093 
00094    itkStaticConstMacro( OutputVDimension, unsigned int,
00095      OutputMeshType::PointDimension );
00096 
00097    typedef TSolverTraits                             SolverTraits;
00098    typedef typename SolverTraits::ValueType          ValueType;
00099    typedef typename SolverTraits::MatrixType         MatrixType;
00100    typedef typename SolverTraits::VectorType         VectorType;
00101 
00102    typedef QuadEdgeMeshBorderTransform< 
00103     InputMeshType, InputMeshType >                   MeshBorderTransform;
00104    typedef typename MeshBorderTransform::Pointer     MeshBorderTransformPointer;
00105 
00106    typedef MatrixCoefficients< InputMeshType >       CoefficientsComputation;
00107 
00108 public:
00109 
00110   void SetCoefficientsMethod( CoefficientsComputation* iMethod )
00111     { 
00112     this->m_CoefficientsMethod = iMethod;
00113     }
00114 
00115   itkNewMacro( Self );
00116   itkTypeMacro( MeshParam, QuadEdgeMeshToQuadEdgeMeshFilter );
00117 
00118   itkSetObjectMacro( BorderTransform, MeshBorderTransform );
00119   itkGetObjectMacro( BorderTransform, MeshBorderTransform );
00120 
00121 protected:
00122 
00123   QuadEdgeMeshParam( );
00124   virtual ~QuadEdgeMeshParam( ) {};
00125 
00126   CoefficientsComputation * m_CoefficientsMethod;
00127 
00128   MeshBorderTransformPointer m_BorderTransform;
00129 
00130   // first is the id of the input mesh and second is the corresponding id
00131   // in m_BoundaryPtMap
00132   InputMapPointIdentifier m_BoundaryPtMap;
00133 
00134   // first is the id of the input mesh and second is the corresponding id
00135   // in m_InternalPtList
00136   InputMapPointIdentifier m_InternalPtMap;
00137 
00138   std::vector< OutputPointType > m_Border;
00139 
00140   void CopyToOutputBorder( );
00141 
00151   void ComputeListOfInteriorVertices( );
00152 
00160   void FillMatrix( MatrixType& iM, VectorType& ioBx, VectorType& ioBy );
00161 
00172   void SolveLinearSystems( const MatrixType& iM,
00173                             const VectorType& iBx,
00174                             const VectorType& iBy,
00175                             VectorType& oX,
00176                             VectorType& oY );
00177 
00178   void GenerateData( );
00179 
00180 private:
00181 
00182   QuadEdgeMeshParam( const Self& ); // purposely not implemented
00183   void operator=( const Self& );  // purposely not implemented
00184 
00185 };
00186 
00187 } // end namespace itk
00188 
00189 #include "itkQuadEdgeMeshParam.txx"
00190 
00191 #endif
00192 

Generated at Tue Sep 15 04:28:18 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000