ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDeformableSimplexMesh3DFilter.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#ifndef itkDeformableSimplexMesh3DFilter_h
29#define itkDeformableSimplexMesh3DFilter_h
30
31#include "itkMeshToMeshFilter.h"
32#include "itkSimplexMesh.h"
37#include "itkArray.h"
38
39#include <set>
40
41namespace itk
42{
76template <typename TInputMesh, typename TOutputMesh>
77class ITK_TEMPLATE_EXPORT DeformableSimplexMesh3DFilter : public MeshToMeshFilter<TInputMesh, TOutputMesh>
78{
79public:
81
84
87
91
94
97
99 using InputMeshType = TInputMesh;
100 using OutputMeshType = TOutputMesh;
101
102 using InputPointsContainerPointer = typename InputMeshType::PointsContainerPointer;
103 using InputPointsContainer = typename InputMeshType::PointsContainer;
104 using InputPointsContainerConstIterator = typename InputMeshType::PointsContainer::ConstIterator;
105
108 using VectorType = typename PointType::VectorType;
110 using PixelType = typename InputMeshType::PixelType;
111
117
121 using GradientIndexValueType = typename GradientIndexType::IndexValueType;
123
124 /* Mesh pointer definition. */
125 using InputMeshPointer = typename InputMeshType::Pointer;
126 using OutputMeshPointer = typename OutputMeshType::Pointer;
127
128 using MeshPointType = typename InputMeshType::PointType;
129 using CellsContainerPointer = typename InputMeshType::CellsContainerPointer;
130 using CellsContainerIterator = typename InputMeshType::CellsContainer::Iterator;
131 using InputNeighbors = typename InputMeshType::NeighborListType;
132 using InputNeighborsIterator = typename InputMeshType::NeighborListType::iterator;
133
134 using NeighborSetType = std::set<IdentifierType>;
135 using IndexSetType = std::set<IdentifierType>;
137 using NeighborSetIterator = typename NeighborSetType::iterator;
138 using IndexSetIterator = typename IndexSetType::iterator;
139
140 using GeometryMapType = typename InputMeshType::GeometryMapType;
141 using GeometryMapPointer = typename GeometryMapType::Pointer;
142 using GeometryMapIterator = typename GeometryMapType::Iterator;
143
144
146 void
147 SetGradient(const GradientImageType * gradientImage);
148 const GradientImageType *
149 GetGradient() const;
151
153 itkSetMacro(Iterations, int);
154 itkGetConstMacro(Iterations, int);
156
158 itkSetMacro(Alpha, double);
159 itkGetConstMacro(Alpha, double);
161
163 itkSetMacro(Beta, double);
164 itkGetConstMacro(Beta, double);
166
168 itkSetMacro(Gamma, double);
169 itkGetConstMacro(Gamma, double);
171
173 itkSetMacro(Damping, double);
174 itkGetConstMacro(Damping, double);
176
178 itkSetMacro(Rigidity, unsigned int);
179 itkGetConstMacro(Rigidity, unsigned int);
181
184
186 itkGetConstMacro(ImageWidth, int);
187 itkGetConstMacro(ImageHeight, int);
188 itkGetConstMacro(ImageDepth, int);
190
193
194protected:
196 ~DeformableSimplexMesh3DFilter() override = default;
197 void
198 PrintSelf(std::ostream & os, Indent indent) const override;
199
201 void
202 GenerateData() override;
203
209 virtual void
211
217 virtual void
219
225 virtual void
227
231 virtual void
233
239 virtual void
241
246 virtual void
248
252 virtual void
254
258 bool
259 L_Func(const double r, const double d, const double phi, double & output);
260
266
268
274 double m_Alpha{};
275
282 double m_Beta{};
283
290 double m_Gamma{};
291 double m_Damping{};
292
299 unsigned int m_Rigidity{};
300
301 // definition of internal parameters
303 int m_Step{};
304
307
310
313
316
321
322}; // end of class
323} // end namespace itk
324
325#ifndef ITK_MANUAL_INSTANTIATION
326# include "itkDeformableSimplexMesh3DFilter.hxx"
327#endif
328
329#endif // itkDeformableSimplexMesh3DFilter_h
A templated class holding a n-Dimensional covariant vector.
virtual void ComputeExternalForce(SimplexMeshGeometry *data, const GradientImageType *gradientImage)
typename GeometryMapType::Iterator GeometryMapIterator
typename GradientImageType::PixelType GradientPixelType
typename InputMeshType::PointType MeshPointType
MeshToMeshFilter< TInputMesh, TOutputMesh > Superclass
void SetGradient(const GradientImageType *gradientImage)
typename InputMeshType::PointsContainerPointer InputPointsContainerPointer
PointType ComputeBarycentricCoordinates(PointType p, SimplexMeshGeometry *data)
typename GradientImageType::IndexType GradientIndexType
ITK_DISALLOW_COPY_AND_MOVE(DeformableSimplexMesh3DFilter)
typename InputMeshType::PointsContainer InputPointsContainer
virtual void ComputeInternalForce(SimplexMeshGeometry *data)
itkSetMacro(Rigidity, unsigned int)
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputMeshType::PointsContainer::ConstIterator InputPointsContainerConstIterator
const GradientImageType * GetGradient() const
itkSetObjectMacro(Data, GeometryMapType)
itkGetModifiableObjectMacro(Data, GeometryMapType)
typename OutputMeshType::Pointer OutputMeshPointer
typename GradientImageType::Pointer GradientImagePointer
typename InputMeshType::GeometryMapType GeometryMapType
typename SimplexMeshGeometry::PointType PointType
typename GradientIndexType::IndexValueType GradientIndexValueType
typename InputMeshType::CellsContainerPointer CellsContainerPointer
typename InputMeshType::NeighborListType::iterator InputNeighborsIterator
CovariantVector< typename VectorType::ValueType, 3 > CovariantVectorType
typename InputMeshType::NeighborListType InputNeighbors
typename GradientImageType::SizeType GradientImageSizeType
typename InputMeshType::CellsContainer::Iterator CellsContainerIterator
~DeformableSimplexMesh3DFilter() override=default
bool L_Func(const double r, const double d, const double phi, double &output)
itk::MapContainer< IdentifierType, NeighborSetType > VertexNeighborListType
itkGetConstMacro(Rigidity, unsigned int)
typename GeometryMapType::Pointer GeometryMapPointer
itkOverrideGetNameOfClassMacro(DeformableSimplexMesh3DFilter)
typename NeighborSetType::iterator NeighborSetIterator
Templated n-dimensional image class.
Definition itkImage.h:89
Size< VImageDimension > SizeType
SmartPointer< Self > Pointer
Definition itkImage.h:96
Index< VImageDimension > IndexType
Control indentation during Print() invocation.
Definition itkIndent.h:50
A wrapper of the STL "map" container.
handle geometric properties for vertices of a simplex mesh
itk::Point< double, 3 > PointType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....