00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkQuadEdgeMeshSmoothing_h
00019 #define __itkQuadEdgeMeshSmoothing_h
00020
00021 #include <itkQuadEdgeMeshToQuadEdgeMeshFilter.h>
00022 #include "itkQuadEdgeMeshDelaunayConformingFilter.h"
00023 #include "itkQuadEdgeMeshParamMatrixCoefficients.h"
00024
00025 namespace itk
00026 {
00031 template< class TInputMesh, class TOutputMesh >
00032 class QuadEdgeMeshSmoothing :
00033 public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
00034 {
00035 public:
00036 typedef QuadEdgeMeshSmoothing Self;
00037 typedef SmartPointer< Self > Pointer;
00038 typedef SmartPointer< const Self > ConstPointer;
00039 typedef QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
00040 Superclass;
00041
00043 itkTypeMacro( QuadEdgeMeshSmoothing, QuadEdgeMeshToQuadEdgeMeshFilter );
00044
00046 itkNewMacro( Self );
00047
00048 typedef TInputMesh InputMeshType;
00049 typedef typename InputMeshType::Pointer InputMeshPointer;
00050
00051 typedef TOutputMesh OutputMeshType;
00052 typedef typename OutputMeshType::Pointer OutputMeshPointer;
00053 typedef typename OutputMeshType::EdgeCellType OutputEdgeCellType;
00054 typedef typename OutputMeshType::PolygonCellType OutputPolygonCellType;
00055 typedef typename OutputMeshType::QEType OutputQEType;
00056 typedef typename OutputMeshType::PointIdentifier OutputPointIdentifier;
00057 typedef typename OutputMeshType::PointType OutputPointType;
00058 typedef typename OutputPointType::VectorType OutputVectorType;
00059 typedef typename OutputPointType::CoordRepType OutputCoordType;
00060 typedef typename OutputMeshType::PointsContainer OutputPointsContainer;
00061 typedef typename OutputMeshType::PointsContainerPointer
00062 OutputPointsContainerPointer;
00063 typedef typename OutputMeshType::PointsContainerIterator
00064 OutputPointsContainerIterator;
00065 typedef typename OutputMeshType::CellsContainerPointer
00066 OutputCellsContainerPointer;
00067 typedef typename OutputMeshType::CellsContainerIterator
00068 OutputCellsContainerIterator;
00069
00070 itkStaticConstMacro( PointDimension, unsigned int,
00071 OutputMeshType::PointDimension );
00072
00073 typedef QuadEdgeMeshDelaunayConformingFilter< InputMeshType, OutputMeshType >
00074 InputOutputDelaunayConformingType;
00075 typedef typename InputOutputDelaunayConformingType::Pointer
00076 InputOutputDelaunayConformingPointer;
00077
00078 typedef QuadEdgeMeshDelaunayConformingFilter< OutputMeshType, OutputMeshType >
00079 OutputDelaunayConformingType;
00080 typedef typename OutputDelaunayConformingType::Pointer
00081 OutputDelaunayConformingPointer;
00082
00083 typedef MatrixCoefficients< OutputMeshType > CoefficientsComputation;
00084
00085 void SetCoefficientsMethod( CoefficientsComputation* iMethod )
00086 { m_CoefficientsMethod = iMethod; }
00087
00088 itkSetMacro( NumberOfIterations, unsigned int );
00089 itkGetConstMacro( NumberOfIterations, unsigned int );
00090
00091 itkSetMacro( DelaunayConforming, bool );
00092 itkGetConstMacro( DelaunayConforming, bool );
00093
00094 itkSetMacro( RelaxationFactor, OutputCoordType );
00095 itkGetConstMacro( RelaxationFactor, OutputCoordType );
00096
00097 protected:
00098 QuadEdgeMeshSmoothing();
00099 ~QuadEdgeMeshSmoothing();
00100
00101 CoefficientsComputation* m_CoefficientsMethod;
00102 InputOutputDelaunayConformingPointer m_InputDelaunayFilter;
00103 OutputDelaunayConformingPointer m_OutputDelaunayFilter;
00104 bool m_DelaunayConforming;
00105 unsigned int m_NumberOfIterations;
00106 OutputCoordType m_RelaxationFactor;
00107
00108 void GenerateData();
00109
00110 private:
00111 QuadEdgeMeshSmoothing( const Self& );
00112 void operator = ( const Self& );
00113 };
00114 }
00115
00116 #include "itkQuadEdgeMeshSmoothing.txx"
00117 #endif
00118