ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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{
42template <typename TInput, typename TOutput>
43class ITK_TEMPLATE_EXPORT FastMarchingQuadEdgeMeshFilterBase : public FastMarchingBase<TInput, TOutput>
44{
45public:
46 ITK_DISALLOW_COPY_AND_MOVE(FastMarchingQuadEdgeMeshFilterBase);
47
52 using typename Superclass::Traits;
53
55 itkNewMacro(Self);
56
58 itkOverrideGetNameOfClassMacro(FastMarchingQuadEdgeMeshFilterBase);
59
62 using typename Superclass::InputPixelType;
63 using InputPointType = typename InputMeshType::PointType;
64 using InputPointIdentifierType = typename InputMeshType::PointIdentifier;
65
68 using typename Superclass::OutputPixelType;
69 using OutputPointType = typename OutputMeshType::PointType;
70 using OutputVectorType = typename OutputPointType::VectorType;
71 using OutputVectorRealType = typename OutputVectorType::RealValueType;
72 using OutputQEType = typename OutputMeshType::QEType;
73 using OutputPointIdentifierType = typename OutputMeshType::PointIdentifier;
74 using OutputPointsContainer = typename OutputMeshType::PointsContainer;
75 using OutputPointsContainerPointer = typename OutputPointsContainer::Pointer;
76 using OutputPointsContainerIterator = typename OutputPointsContainer::Iterator;
77 using OutputPointDataContainer = typename OutputMeshType::PointDataContainer;
78 using OutputPointDataContainerPointer = typename OutputPointDataContainer::Pointer;
79
80 using OutputCellsContainer = typename OutputMeshType::CellsContainer;
81 using OutputCellsContainerPointer = typename OutputCellsContainer::Pointer;
82 using OutputCellsContainerConstIterator = typename OutputCellsContainer::ConstIterator;
83 using OutputCellType = typename OutputMeshType::CellType;
84
85
86 using NodeType = typename Traits::NodeType;
87 using NodePairType = typename Traits::NodePairType;
88 using NodePairContainerType = typename Traits::NodePairContainerType;
89 using NodePairContainerPointer = typename Traits::NodePairContainerPointer;
90 using NodePairContainerConstIterator = typename Traits::NodePairContainerConstIterator;
91
92 // using NodeContainerType = typename Traits::NodeContainerType;
93 // using NodeContainerPointer = typename Traits::NodeContainerPointer;
94 // using NodeContainerConstIterator = typename Traits::NodeContainerConstIterator;
95
96 using typename Superclass::LabelType;
97
98 using NodeLabelMapType = std::map<NodeType, LabelType>;
99 using NodeLabelMapIterator = typename NodeLabelMapType::iterator;
100 using NodeLabelMapConstIterator = typename NodeLabelMapType::const_iterator;
101
102protected:
105
107
109 GetTotalNumberOfNodes() const override;
110
111 void
112 SetOutputValue(OutputMeshType * oMesh, const NodeType & iNode, const OutputPixelType & iValue) override;
113
114 const OutputPixelType
115 GetOutputValue(OutputMeshType * oMesh, const NodeType & iNode) const override;
116
117 unsigned char
118 GetLabelValueForGivenNode(const NodeType & iNode) const override;
119
120 void
121 SetLabelValueForGivenNode(const NodeType & iNode, const LabelType & iLabel) override;
122
123 void
124 UpdateNeighbors(OutputMeshType * oMesh, const NodeType & iNode) override;
125
126 void
127 UpdateValue(OutputMeshType * oMesh, const NodeType & iNode) override;
128
131 const NodeType & iId,
132 const OutputPointType & iCurrentPoint,
133 const OutputVectorRealType & iF,
134 const NodeType & iId1,
135 const OutputPointType & iP1,
136 const bool iIsFar1,
137 const OutputVectorRealType iVal1,
138 const NodeType & iId2,
139 const OutputPointType & iP2,
140 const bool iIsFar2,
141 const OutputVectorRealType & iVal2) const;
142
143
146 const OutputVectorRealType & iVal2,
147 const OutputVectorRealType & iNorm1,
148 const OutputVectorRealType & iSqNorm1,
149 const OutputVectorRealType & iNorm2,
150 const OutputVectorRealType & iSqNorm2,
151 const OutputVectorRealType & iDot,
152 const OutputVectorRealType & iF) const;
153
154 bool
156 const OutputPointIdentifierType & iId,
157 const OutputPointType & iP,
158 const OutputPointIdentifierType & iId1,
159 const OutputPointType & iP1,
160 const OutputPointIdentifierType & iId2,
161 const OutputPointType & iP2,
162 OutputVectorRealType & oNorm,
163 OutputVectorRealType & oSqNorm,
164 OutputVectorRealType & oDot1,
165 OutputVectorRealType & oDot2,
166 OutputPointIdentifierType & oId) const;
167
168 bool
169 CheckTopology(OutputMeshType * oMesh, const NodeType & iNode) override;
170
171 void
173
174private:
176};
177} // namespace itk
178
179#ifndef ITK_MANUAL_INSTANTIATION
180# include "itkFastMarchingQuadEdgeMeshFilterBase.hxx"
181#endif
182
183#endif // itkFastMarchingQuadEdgeMeshFilterBase_h
FastMarchingTraits< TInput, TOutput > Traits
typename Traits::InputPixelType InputPixelType
typename Traits::OutputDomainPointer OutputDomainPointer
typename Traits::InputDomainType InputDomainType
typename Traits::OutputDomainType OutputDomainType
typename Traits::InputDomainPointer InputDomainPointer
FastMarchingBase()
Constructor.
typename Traits::OutputPixelType OutputPixelType
typename Traits::LabelType LabelType
void InitializeOutput(OutputMeshType *oMesh) override
~FastMarchingQuadEdgeMeshFilterBase() override=default
bool CheckTopology(OutputMeshType *oMesh, const NodeType &iNode) override
Check if the current node violate topological criterion.
void SetOutputValue(OutputMeshType *oMesh, const NodeType &iNode, const OutputPixelType &iValue) override
Set the output value (front value) for a given node.
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 Traits::NodePairContainerType NodePairContainerType
typename Superclass::InputDomainPointer InputMeshPointer
typename OutputMeshType::CellsContainer OutputCellsContainer
typename Traits::NodePairContainerPointer NodePairContainerPointer
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
Update neighbors to a given node.
typename OutputPointDataContainer::Pointer OutputPointDataContainerPointer
void SetLabelValueForGivenNode(const NodeType &iNode, const LabelType &iLabel) override
Set the Label Value for a given node.
typename Traits::NodePairContainerConstIterator NodePairContainerConstIterator
typename OutputVectorType::RealValueType OutputVectorRealType
typename NodeLabelMapType::const_iterator NodeLabelMapConstIterator
void UpdateValue(OutputMeshType *oMesh, const NodeType &iNode) override
Update value for a given node.
typename OutputMeshType::PointsContainer OutputPointsContainer
typename OutputPointsContainer::Iterator OutputPointsContainerIterator
unsigned char GetLabelValueForGivenNode(const NodeType &iNode) const override
Get the LabelEnum Value for a given node.
typename Traits::OutputPixelType OutputPixelType
const OutputPixelType GetOutputValue(OutputMeshType *oMesh, const NodeType &iNode) const override
Get the output value (front value) for a given node.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
Definition itkIntTypes.h:90