ITK  6.0.0
Insight Toolkit
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:
80 ITK_DISALLOW_COPY_AND_MOVE(DeformableSimplexMesh3DFilter);
81
84
87
91
93 itkNewMacro(Self);
94
96 itkOverrideGetNameOfClassMacro(DeformableSimplexMesh3DFilter);
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
110 using PixelType = typename InputMeshType::PixelType;
111
117
123
124 /* Mesh pointer definition. */
127
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;
142 using GeometryMapIterator = typename GeometryMapType::Iterator;
143
144
146 void
147 SetGradient(const GradientImageType * gradientImage);
148 const GradientImageType *
149 GetGradient() const;
153 itkSetMacro(Iterations, int);
154 itkGetConstMacro(Iterations, int);
158 itkSetMacro(Alpha, double);
159 itkGetConstMacro(Alpha, double);
163 itkSetMacro(Beta, double);
164 itkGetConstMacro(Beta, double);
168 itkSetMacro(Gamma, double);
169 itkGetConstMacro(Gamma, double);
173 itkSetMacro(Damping, double);
174 itkGetConstMacro(Damping, double);
178 itkSetMacro(Rigidity, unsigned int);
179 itkGetConstMacro(Rigidity, unsigned int);
182 itkSetObjectMacro(Data, GeometryMapType);
183 itkGetModifiableObjectMacro(Data, GeometryMapType);
184
186 itkGetConstMacro(ImageWidth, int);
187 itkGetConstMacro(ImageHeight, int);
188 itkGetConstMacro(ImageDepth, int);
192 itkGetConstMacro(Step, int);
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
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
306 int m_ImageWidth{};
307
309 int m_ImageHeight{};
310
312 int m_ImageDepth{};
313
315 int m_Iterations{};
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.
Three-dimensional deformable model for image segmentation.
virtual void ComputeExternalForce(SimplexMeshGeometry *data, const GradientImageType *gradientImage)
typename GeometryMapType::Iterator GeometryMapIterator
typename GradientImageType::PixelType GradientPixelType
typename InputMeshType::PointType MeshPointType
void SetGradient(const GradientImageType *gradientImage)
typename InputMeshType::PointsContainerPointer InputPointsContainerPointer
PointType ComputeBarycentricCoordinates(PointType p, SimplexMeshGeometry *data)
typename GradientImageType::IndexType GradientIndexType
typename InputMeshType::PointsContainer InputPointsContainer
virtual void ComputeInternalForce(SimplexMeshGeometry *data)
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputMeshType::PointsContainer::ConstIterator InputPointsContainerConstIterator
const GradientImageType * GetGradient() const
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
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)
typename IndexSetType::iterator IndexSetIterator
typename GeometryMapType::Pointer GeometryMapPointer
typename NeighborSetType::iterator NeighborSetIterator
Templated n-dimensional image class.
Definition: itkImage.h:89
TPixel PixelType
Definition: itkImage.h:108
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A wrapper of the STL "map" container.
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
MeshToMeshFilter is the base class for all process objects that output mesh data, and require mesh da...
typename InputMeshType::Pointer InputMeshPointer
handle geometric properties for vertices of a simplex mesh
itk::Point< double, 3 > PointType
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
long IndexValueType
Definition: itkIntTypes.h:93