ITK  6.0.0
Insight Toolkit
itkFastMarchingQuadEdgeMeshFilterBase.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#ifndef itkFastMarchingQuadEdgeMeshFilterBase_h
20#define itkFastMarchingQuadEdgeMeshFilterBase_h
21
22#include "itkFastMarchingBase.h"
24
25namespace itk
26{
44template <typename TInput, typename TOutput>
45class ITK_TEMPLATE_EXPORT FastMarchingQuadEdgeMeshFilterBase : public FastMarchingBase<TInput, TOutput>
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(FastMarchingQuadEdgeMeshFilterBase);
49
54 using typename Superclass::Traits;
55
57 itkNewMacro(Self);
58
60 itkOverrideGetNameOfClassMacro(FastMarchingQuadEdgeMeshFilterBase);
61
62 using InputMeshType = typename Superclass::InputDomainType;
63 using InputMeshPointer = typename Superclass::InputDomainPointer;
64 using typename Superclass::InputPixelType;
66 using InputPointIdentifierType = typename InputMeshType::PointIdentifier;
67
68 using OutputMeshType = typename Superclass::OutputDomainType;
69 using OutputMeshPointer = typename Superclass::OutputDomainPointer;
70 using typename Superclass::OutputPixelType;
73 using OutputVectorRealType = typename OutputVectorType::RealValueType;
74 using OutputQEType = typename OutputMeshType::QEType;
75 using OutputPointIdentifierType = typename OutputMeshType::PointIdentifier;
76 using OutputPointsContainer = typename OutputMeshType::PointsContainer;
78 using OutputPointsContainerIterator = typename OutputPointsContainer::Iterator;
79 using OutputPointDataContainer = typename OutputMeshType::PointDataContainer;
81
82 using OutputCellsContainer = typename OutputMeshType::CellsContainer;
84 using OutputCellsContainerConstIterator = typename OutputCellsContainer::ConstIterator;
85 using OutputCellType = typename OutputMeshType::CellType;
86
87
88 using NodeType = typename Traits::NodeType;
89 using NodePairType = typename Traits::NodePairType;
90 using NodePairContainerType = typename Traits::NodePairContainerType;
91 using NodePairContainerPointer = typename Traits::NodePairContainerPointer;
92 using NodePairContainerConstIterator = typename Traits::NodePairContainerConstIterator;
93
94 // using NodeContainerType = typename Traits::NodeContainerType;
95 // using NodeContainerPointer = typename Traits::NodeContainerPointer;
96 // using NodeContainerConstIterator = typename Traits::NodeContainerConstIterator;
97
98 using typename Superclass::LabelType;
99
100 using NodeLabelMapType = std::map<NodeType, LabelType>;
101 using NodeLabelMapIterator = typename NodeLabelMapType::iterator;
102 using NodeLabelMapConstIterator = typename NodeLabelMapType::const_iterator;
103
104protected:
107
109
111 GetTotalNumberOfNodes() const override;
112
113 void
114 SetOutputValue(OutputMeshType * oMesh, const NodeType & iNode, const OutputPixelType & iValue) override;
115
116 const OutputPixelType
117 GetOutputValue(OutputMeshType * oMesh, const NodeType & iNode) const override;
118
119 unsigned char
120 GetLabelValueForGivenNode(const NodeType & iNode) const override;
121
122 void
123 SetLabelValueForGivenNode(const NodeType & iNode, const LabelType & iLabel) override;
124
125 void
126 UpdateNeighbors(OutputMeshType * oMesh, const NodeType & iNode) override;
127
128 void
129 UpdateValue(OutputMeshType * oMesh, const NodeType & iNode) override;
130
133 const NodeType & iId,
134 const OutputPointType & iCurrentPoint,
135 const OutputVectorRealType & iF,
136 const NodeType & iId1,
137 const OutputPointType & iP1,
138 const bool iIsFar1,
139 const OutputVectorRealType iVal1,
140 const NodeType & iId2,
141 const OutputPointType & iP2,
142 const bool iIsFar2,
143 const OutputVectorRealType & iVal2) const;
144
145
148 const OutputVectorRealType & iVal2,
149 const OutputVectorRealType & iNorm1,
150 const OutputVectorRealType & iSqNorm1,
151 const OutputVectorRealType & iNorm2,
152 const OutputVectorRealType & iSqNorm2,
153 const OutputVectorRealType & iDot,
154 const OutputVectorRealType & iF) const;
155
156 bool
158 const OutputPointIdentifierType & iId,
159 const OutputPointType & iP,
160 const OutputPointIdentifierType & iId1,
161 const OutputPointType & iP1,
162 const OutputPointIdentifierType & iId2,
163 const OutputPointType & iP2,
164 OutputVectorRealType & oNorm,
165 OutputVectorRealType & oSqNorm,
166 OutputVectorRealType & oDot1,
167 OutputVectorRealType & oDot2,
168 OutputPointIdentifierType & oId) const;
169
170 bool
171 CheckTopology(OutputMeshType * oMesh, const NodeType & iNode) override;
172
173 void
175
176private:
177 const InputMeshType * m_InputMesh{};
178};
179} // namespace itk
180
181#ifndef ITK_MANUAL_INSTANTIATION
182# include "itkFastMarchingQuadEdgeMeshFilterBase.hxx"
183#endif
184
185#endif // itkFastMarchingQuadEdgeMeshFilterBase_h
Abstract class to solve an Eikonal based-equation using Fast Marching Method.
typename FastMarchingTraits< TInput, TOutput >::SuperclassType Superclass
typename Traits::NodePairContainerType NodePairContainerType
typename Traits::NodePairContainerPointer NodePairContainerPointer
typename Traits::NodeType NodeType
typename Traits::NodePairType NodePairType
typename Traits::OutputPixelType OutputPixelType
typename Traits::LabelType LabelType
typename Traits::NodePairContainerConstIterator NodePairContainerConstIterator
void InitializeOutput(OutputMeshType *oMesh) override
~FastMarchingQuadEdgeMeshFilterBase() override=default
bool CheckTopology(OutputMeshType *oMesh, const NodeType &iNode) override
void SetOutputValue(OutputMeshType *oMesh, const NodeType &iNode, const OutputPixelType &iValue) override
typename InputMeshType::PointIdentifier InputPointIdentifierType
bool UnfoldTriangle(OutputMeshType *oMesh, const OutputPointIdentifierType &iId, const OutputPointType &iP, const OutputPointIdentifierType &iId1, const OutputPointType &iP1, const OutputPointIdentifierType &iId2, const OutputPointType &iP2, OutputVectorRealType &oNorm, OutputVectorRealType &oSqNorm, OutputVectorRealType &oDot1, OutputVectorRealType &oDot2, OutputPointIdentifierType &oId) const
typename Superclass::OutputDomainPointer OutputMeshPointer
typename OutputMeshType::PointDataContainer OutputPointDataContainer
typename Superclass::InputDomainPointer InputMeshPointer
typename OutputMeshType::CellsContainer OutputCellsContainer
typename OutputCellsContainer::ConstIterator OutputCellsContainerConstIterator
typename OutputPointsContainer::Pointer OutputPointsContainerPointer
const OutputVectorRealType ComputeUpdate(const OutputVectorRealType &iVal1, const OutputVectorRealType &iVal2, const OutputVectorRealType &iNorm1, const OutputVectorRealType &iSqNorm1, const OutputVectorRealType &iNorm2, const OutputVectorRealType &iSqNorm2, const OutputVectorRealType &iDot, const OutputVectorRealType &iF) const
const OutputVectorRealType Solve(OutputMeshType *oMesh, const NodeType &iId, const OutputPointType &iCurrentPoint, const OutputVectorRealType &iF, const NodeType &iId1, const OutputPointType &iP1, const bool iIsFar1, const OutputVectorRealType iVal1, const NodeType &iId2, const OutputPointType &iP2, const bool iIsFar2, const OutputVectorRealType &iVal2) const
typename OutputCellsContainer::Pointer OutputCellsContainerPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifierType
IdentifierType GetTotalNumberOfNodes() const override
Get the total number of nodes in the domain.
void UpdateNeighbors(OutputMeshType *oMesh, const NodeType &iNode) override
typename OutputPointDataContainer::Pointer OutputPointDataContainerPointer
void SetLabelValueForGivenNode(const NodeType &iNode, const LabelType &iLabel) override
Set the Label Value for a given node.
typename OutputVectorType::RealValueType OutputVectorRealType
typename NodeLabelMapType::const_iterator NodeLabelMapConstIterator
void UpdateValue(OutputMeshType *oMesh, const NodeType &iNode) override
typename OutputMeshType::PointsContainer OutputPointsContainer
typename OutputPointsContainer::Iterator OutputPointsContainerIterator
unsigned char GetLabelValueForGivenNode(const NodeType &iNode) const override
Get the LabelEnum Value for a given node.
const OutputPixelType GetOutputValue(OutputMeshType *oMesh, const NodeType &iNode) const override
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
Definition: itkIntTypes.h:90