ITK  6.0.0
Insight Toolkit
itkTriangleMeshCurvatureCalculator.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18/*=========================================================================
19 *
20 * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21 *
22 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23 *
24 * For complete copyright, license and disclaimer of warranty information
25 * please refer to the NOTICE file at the top of the ITK source tree.
26 *
27 *=========================================================================*/
28
29#ifndef itkTriangleMeshCurvatureCalculator_h
30#define itkTriangleMeshCurvatureCalculator_h
31
32#include <iostream>
33#include "itkMesh.h"
34#include "itkTriangleCell.h"
35#include "itkVectorContainer.h"
36
37namespace itk
38{
45{
46public:
47 enum class Curvatures : uint8_t
48 {
49 GaussCurvature,
50 MeanCurvature,
51 MinCurvature,
52 MaxCurvature
53 };
54};
55
56extern ITKMesh_EXPORT std::ostream &
57 operator<<(std::ostream & out, const TriangleMeshCurvatureCalculatorEnums::Curvatures value);
58
67template <typename TInputMesh>
68class ITK_TEMPLATE_EXPORT TriangleMeshCurvatureCalculator : public Object
69{
70public:
71 ITK_DISALLOW_COPY_AND_MOVE(TriangleMeshCurvatureCalculator);
72
75
78
82
84 itkNewMacro(Self);
85
87 itkOverrideGetNameOfClassMacro(TriangleMeshCurvatureCalculator);
88
90 using InputMeshType = TInputMesh;
91 using PointIdentifier = typename InputMeshType::PointIdentifier;
94 using MeshPointIdConstIterator = typename InputMeshType::CellTraits::PointIdConstIterator;
95 using MeshPointsContainerConstPointer = typename InputMeshType::PointsContainerConstPointer;
96 using CellsContainerConstPointer = typename InputMeshType::CellsContainerConstPointer;
97 using CellsContainerConstIterator = typename InputMeshType::CellsContainer::ConstIterator;
98 using CellType = typename InputMeshType::CellType;
103
106 itkGetConstMacro(CurvatureType, TriangleMeshCurvatureCalculatorEnums::Curvatures);
110 itkSetObjectMacro(TriangleMesh, InputMeshType);
111
113 itkGetConstObjectMacro(GaussCurvatureData, DoubleVectorContainer);
114
116 void
118 {
120 }
121
123 void
125
126protected:
129
130 void
131 PrintSelf(std::ostream & os, Indent indent) const override;
132
134 void
136
137private:
138 CurvaturesEnum m_CurvatureType = CurvaturesEnum::GaussCurvature;
139 DoubleVectorContainerPointer m_GaussCurvatureData{};
140 MeshConstPointer m_TriangleMesh{};
141};
142
143} // namespace itk
144#ifndef ITK_MANUAL_INSTANTIATION
145# include "itkTriangleMeshCurvatureCalculator.hxx"
146#endif
147
148#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
Calculator to compute curvature of a triangle mesh. Set the input triangle mesh and the required curv...
void ComputeGaussCurvature(const InputMeshType *input)
typename itk::VectorContainer< PointIdentifier, double > DoubleVectorContainer
typename DoubleVectorContainer::Pointer DoubleVectorContainerPointer
~TriangleMeshCurvatureCalculator() override=default
typename InputMeshType::CellsContainer::ConstIterator CellsContainerConstIterator
typename InputMeshType::PointsContainerConstPointer MeshPointsContainerConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputMeshType::CellTraits::PointIdConstIterator MeshPointIdConstIterator
typename InputMeshType::ConstPointer MeshConstPointer
typename InputMeshType::CellsContainerConstPointer CellsContainerConstPointer
typename InputMeshType::PointIdentifier PointIdentifier
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)