|
ITK
5.3.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkSimplexMeshAdaptTopologyFilter_h
19 #define itkSimplexMeshAdaptTopologyFilter_h
28 #include "vxl_version.h"
29 #include "vnl/vnl_cross.h"
44 template <
typename TInputMesh,
typename TOutputMesh>
130 typename InputPolygonType::PointIdIterator it = poly->
PointIdsBegin();
132 double meanCurvature = 0;
134 double val = mesh->GetMeanCurvature(*it++);
138 val = mesh->GetMeanCurvature(*it++);
150 area += ComputeArea(refPoint, id1, id2);
152 val = mesh->GetMeanCurvature(*it);
158 meanCurvature /= static_cast<double>(cnt);
160 totalCurvature += meanCurvature;
162 areaMap->InsertElement(cellId, area);
163 curvatureMap->InsertElement(cellId, meanCurvature);
165 if (area > maxCellSize)
169 if (area < minCellSize)
173 if (meanCurvature > maxCurvature)
175 maxCurvature = meanCurvature;
177 if (meanCurvature < minCurvature)
179 minCurvature = meanCurvature;
192 mesh->GetPoint(p1, &v1);
193 mesh->GetPoint(p2, &v2);
194 mesh->GetPoint(p3, &v3);
195 return itk::Math::abs(vnl_cross_3d((v2 - v1).GetVnlVector(), (v3 - v1).GetVnlVector()).two_norm() / 2.0);
219 return totalCurvature / (curvatureMap->Size());
248 using SimplexVisitorInterfaceType =
255 itkSetMacro(Threshold,
double);
256 itkGetConstMacro(Threshold,
double);
258 itkSetMacro(SelectionMethod,
int);
259 itkGetConstMacro(SelectionMethod,
int);
261 itkGetConstMacro(ModifiedCount,
int);
268 PrintSelf(std::ostream & os,
Indent indent)
const override;
271 GenerateData()
override;
285 ComputeCellParameters();
289 CopyInputMeshToOutputMeshGeometryData();
314 double m_Threshold{ 0.5 };
319 int m_SelectionMethod{ 0 };
325 int m_ModifiedCount{ 0 };
337 #ifndef ITK_MANUAL_INSTANTIATION
338 # include "itkSimplexMeshAdaptTopologyFilter.hxx"
341 #endif // itkSimplexMeshAdaptTopologyFilter_h
SmartPointer< Self > Pointer
double GetMaximumCellSize()
void Visit(CellIdentifier cellId, InputPolygonType *poly)
visits all polygon cells and computes the area, NOTE: works for convex polygons only!...
double GetMaximumCurvature()
typename OutputMeshType::Pointer OutputMeshPointer
typename OutputMeshType::CellType OutputCellType
This filter changes the topology of a 2-simplex mesh.
typename InputMeshType::CellIdentifier CellIdentifier
OutputMeshPointer m_Output
member for accessing the filter result during creation
typename InputMeshType::Pointer InputMeshPointer
ImageBaseType::SpacingType VectorType
ImageBaseType::PointType PointType
typename InputCellType::CellAutoPointer InputCellAutoPointer
typename DoubleValueMapType::Iterator DoubleContainerIterator
double ComputeArea(PointIdentifier p1, PointIdentifier p2, PointIdentifier p3)
typename InputMeshType::CellType InputCellType
DoubleValueMapType::Pointer GetAreaMap()
CellIdentifier m_IdOffset
Represents a polygon in a Mesh.
Control indentation during Print() invocation.
DoubleValueMapType::Pointer areaMap
double GetTotalMeanCurvature()
A wrapper of the STL "map" container.
Light weight base class for most itk classes.
double GetTotalMeshArea()
typename InputMeshType::PointIdentifier PointIdentifier
A template class used to implement a visitor object.
typename CellMultiVisitorType::Pointer CellMultiVisitorPointer
PointIdIterator PointIdsEnd() override
DoubleValueMapType::Pointer GetCurvatureMap()
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
typename InputMeshType::MeshTraits::CellTraits InputCellTraitsType
typename itk::MapContainer< CellIdentifier, double > DoubleValueMapType
typename InputMeshType::PointType InputPointType
typename SimplexVisitorInterfaceType::Pointer SimplexVisitorInterfacePointer
double GetMinimumCurvature()
A templated class holding a n-Dimensional covariant vector.
static constexpr T max(const T &)
typename InputMeshType::CellAutoPointer CellAutoPointer
typename InputMeshType::VectorType InputVectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
typename InputMeshType::PixelType InputPixelType
double GetMinimumCellSize()
TOutputMesh OutputMeshType
PointIdIterator PointIdsBegin() override
InputCellAutoPointer m_NewSimplexCellPointer
DoubleValueMapType::Pointer curvatureMap
typename InputPolygonType::PointIdIterator InputPolygonPointIdIterator
typename InputCellType::MultiVisitor CellMultiVisitorType
typename InputCellType::PointIdIterator InputCellPointIdIterator