18 #ifndef itkSimplexMeshAdaptTopologyFilter_h
19 #define itkSimplexMeshAdaptTopologyFilter_h
28 #include "vxl_version.h"
29 #if VXL_VERSION_DATE_FULL > 20040406
30 #include "vnl/vnl_cross.h"
31 #define itk_cross_3d vnl_cross_3d
33 #define itk_cross_3d cross_3d
49 template<
typename TInputMesh,
typename TOutputMesh >
132 typename InputPolygonType::PointIdIterator it = poly->
PointIdsBegin();
134 double meanCurvature = 0;
136 double val =
mesh->GetMeanCurvature(*it++);
137 meanCurvature += std::abs(val);
140 val =
mesh->GetMeanCurvature(*it++);
141 meanCurvature += std::abs(val);
154 val =
mesh->GetMeanCurvature(*it);
155 meanCurvature += std::abs(val);
160 meanCurvature /= (double)cnt;
164 areaMap->InsertElement(cellId, area);
181 mesh->GetPoint(p1, &v1);
182 mesh->GetPoint(p2, &v2);
183 mesh->GetPoint(p3, &v3);
184 return std::abs (
itk_cross_3d( ( v2 - v1 ).GetVnlVector(), ( v3 - v1 ).GetVnlVector() ).two_norm() / 2.0);
239 itkSetMacro(Threshold,
double);
240 itkGetConstMacro(Threshold,
double);
242 itkSetMacro(SelectionMethod,
int);
243 itkGetConstMacro(SelectionMethod,
int);
245 itkGetConstMacro(ModifiedCount,
int);
318 #ifndef ITK_MANUAL_INSTANTIATION
319 #include "itkSimplexMeshAdaptTopologyFilter.hxx"
322 #endif // itkSimplexMeshAdaptTopologyFilter_h
double GetMinimumCurvature()
Light weight base class for most itk classes.
CovariantVector< typename InputVectorType::ValueType, 3 > CovariantVectorType
A template class used to implement a visitor object.
CellIdentifier m_IdOffset
DoubleValueMapType::Pointer curvatureMap
void CopyInputMeshToOutputMeshGeometryData()
InputCellType::PointIdIterator InputCellPointIdIterator
A wrapper of the STL "map" container.
virtual void GenerateData() override
InputMeshType::CellIdentifier CellIdentifier
InputMeshType::PointType InputPointType
InputCellType::MultiVisitor CellMultiVisitorType
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
itk::MapContainer< CellIdentifier, double > DoubleValueMapType
DoubleValueMapType::Iterator DoubleContainerIterator
double GetMaximumCellSize()
virtual PointIdIterator PointIdsEnd(void) override
double GetTotalMeanCurvature()
This filter changes the topology of a 2-simplex mesh.
CellMultiVisitorType::Pointer CellMultiVisitorPointer
SimplexMeshAdaptTopologyFilter(const Self &)
InputCellAutoPointer m_NewSimplexCellPointer
void Visit(CellIdentifier cellId, InputPolygonType *poly)
visits all polygon cells and computes the area, NOTE: works for convex polygons only!!! ...
SmartPointer< const Self > ConstPointer
void operator=(const Self &)
SimplexMeshAdaptTopologyFilter()
The non-const iterator type for the map.
SmartPointer< Self > Pointer
DoubleValueMapType::Pointer areaMap
InputMeshType::CellAutoPointer CellAutoPointer
InputMeshType::VectorType InputVectorType
SimplexVisitorInterfaceType::Pointer SimplexVisitorInterfacePointer
double ComputeArea(PointIdentifier p1, PointIdentifier p2, PointIdentifier p3)
virtual PointIdIterator PointIdsBegin(void) override
DoubleValueMapType::Pointer GetAreaMap()
InputPolygonType::PointIdIterator InputPolygonPointIdIterator
void ComputeCellParameters()
Represents a polygon in a Mesh.
OutputMeshPointer m_Output
member for accessing the filter result during creation
void ModifyNeighborCells(CellIdentifier id1, CellIdentifier id2, PointIdentifier insertPointId)
InputMeshType::PixelType InputPixelType
InputMeshType::Pointer InputMeshPointer
InputMeshType::CellType InputCellType
itk::CellInterfaceVisitorImplementation< InputPixelType, InputCellTraitsType, InputPolygonType, SimplexCellVisitor > SimplexVisitorInterfaceType
OutputMeshType::Pointer OutputMeshPointer
InputMeshType::PointIdentifier PointIdentifier
SimplexMeshAdaptTopologyFilter Self
OutputMeshType::Pointer OutputMeshPointer
InputMeshType::MeshTraits::CellTraits InputCellTraitsType
~SimplexMeshAdaptTopologyFilter()
itk::PolygonCell< InputCellType > InputPolygonType
double GetMinimumCellSize()
Control indentation during Print() invocation.
InputPointType ComputeCellCenter(InputCellAutoPointer &simplexCell)
itk::PolygonCell< OutputCellType > OutputPolygonType
InputMeshType::Pointer InputMeshPointer
double GetTotalMeshArea()
void PrintSelf(std::ostream &os, Indent indent) const override
OutputMeshType::CellType OutputCellType
A templated class holding a n-Dimensional covariant vector.
MeshToMeshFilter< TInputMesh, TOutputMesh > Superclass
DoubleValueMapType::Pointer GetCurvatureMap()
double GetMaximumCurvature()
InputCellType::CellAutoPointer InputCellAutoPointer
TOutputMesh OutputMeshType