ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkSmoothingQuadEdgeMeshFilter_h 00019 #define __itkSmoothingQuadEdgeMeshFilter_h 00020 00021 #include "itkDelaunayConformingQuadEdgeMeshFilter.h" 00022 #include "itkQuadEdgeMeshParamMatrixCoefficients.h" 00023 00024 namespace itk 00025 { 00031 template< class TInputMesh, class TOutputMesh=TInputMesh > 00032 class ITK_EXPORT SmoothingQuadEdgeMeshFilter: 00033 public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh > 00034 { 00035 public: 00036 typedef SmoothingQuadEdgeMeshFilter Self; 00037 typedef SmartPointer< Self > Pointer; 00038 typedef SmartPointer< const Self > ConstPointer; 00039 typedef QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh > Superclass; 00040 00042 itkTypeMacro(SmoothingQuadEdgeMeshFilter, QuadEdgeMeshToQuadEdgeMeshFilter); 00043 00045 itkNewMacro(Self); 00046 00047 typedef TInputMesh InputMeshType; 00048 typedef typename InputMeshType::Pointer InputMeshPointer; 00049 00050 typedef TOutputMesh OutputMeshType; 00051 typedef typename OutputMeshType::Pointer OutputMeshPointer; 00052 typedef typename OutputMeshType::EdgeCellType OutputEdgeCellType; 00053 typedef typename OutputMeshType::PolygonCellType OutputPolygonCellType; 00054 typedef typename OutputMeshType::QEType OutputQEType; 00055 typedef typename OutputMeshType::PointIdentifier OutputPointIdentifier; 00056 typedef typename OutputMeshType::PointType OutputPointType; 00057 typedef typename OutputPointType::VectorType OutputVectorType; 00058 typedef typename OutputPointType::CoordRepType OutputCoordType; 00059 typedef typename OutputMeshType::PointsContainer OutputPointsContainer; 00060 typedef typename OutputMeshType::PointsContainerPointer OutputPointsContainerPointer; 00061 typedef typename OutputMeshType::PointsContainerIterator OutputPointsContainerIterator; 00062 typedef typename OutputMeshType::CellsContainerPointer OutputCellsContainerPointer; 00063 typedef typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator; 00064 00065 itkStaticConstMacro(PointDimension, unsigned int, OutputMeshType::PointDimension); 00066 00067 typedef DelaunayConformingQuadEdgeMeshFilter< InputMeshType, OutputMeshType > InputOutputDelaunayConformingType; 00068 typedef typename InputOutputDelaunayConformingType::Pointer InputOutputDelaunayConformingPointer; 00069 00070 typedef DelaunayConformingQuadEdgeMeshFilter< OutputMeshType, OutputMeshType > OutputDelaunayConformingType; 00071 typedef typename OutputDelaunayConformingType::Pointer OutputDelaunayConformingPointer; 00072 00073 typedef MatrixCoefficients< OutputMeshType > CoefficientsComputation; 00074 00075 void SetCoefficientsMethod(CoefficientsComputation *iMethod) 00076 { m_CoefficientsMethod = iMethod; } 00077 00078 itkSetMacro(NumberOfIterations, unsigned int); 00079 itkGetConstMacro(NumberOfIterations, unsigned int); 00080 00081 itkSetMacro(DelaunayConforming, bool); 00082 itkGetConstMacro(DelaunayConforming, bool); 00083 00084 itkSetMacro(RelaxationFactor, OutputCoordType); 00085 itkGetConstMacro(RelaxationFactor, OutputCoordType); 00086 protected: 00087 SmoothingQuadEdgeMeshFilter(); 00088 ~SmoothingQuadEdgeMeshFilter(); 00089 void PrintSelf(std::ostream & os, Indent indent) const; 00090 00091 CoefficientsComputation *m_CoefficientsMethod; 00092 00093 InputOutputDelaunayConformingPointer m_InputDelaunayFilter; 00094 00095 OutputDelaunayConformingPointer m_OutputDelaunayFilter; 00096 00097 bool m_DelaunayConforming; 00098 00099 unsigned int m_NumberOfIterations; 00100 00101 OutputCoordType m_RelaxationFactor; 00102 00103 void GenerateData(); 00104 00105 private: 00106 SmoothingQuadEdgeMeshFilter(const Self &); 00107 void operator=(const Self &); 00108 }; 00109 } 00110 00111 #include "itkSmoothingQuadEdgeMeshFilter.hxx" 00112 #endif 00113