ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFastMarchingQuadEdgeMeshFilterBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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"
23 #include "itkFastMarchingTraits.h"
24 
25 namespace itk
26 {
43 template< typename TInput, typename TOutput >
45  public FastMarchingBase< TInput, TOutput >
46 {
47 public:
52  typedef typename Superclass::Traits Traits;
53 
55  itkNewMacro(Self);
56 
59 
63  typedef typename InputMeshType::PointType InputPointType;
64  typedef typename InputMeshType::PointIdentifier InputPointIdentifierType;
65 
69  typedef typename OutputMeshType::PointType OutputPointType;
70  typedef typename OutputPointType::VectorType OutputVectorType;
71  typedef typename OutputVectorType::RealValueType OutputVectorRealType;
72  typedef typename OutputMeshType::QEType OutputQEType;
73  typedef typename OutputMeshType::PointIdentifier OutputPointIdentifierType;
74  typedef typename OutputMeshType::PointsContainer OutputPointsContainer;
75  typedef typename OutputPointsContainer::Pointer OutputPointsContainerPointer;
76  typedef typename OutputPointsContainer::Iterator OutputPointsContainerIterator;
77  typedef typename OutputMeshType::PointDataContainer
79  typedef typename OutputPointDataContainer::Pointer
81 
82  typedef typename OutputMeshType::CellsContainer OutputCellsContainer;
83  typedef typename OutputCellsContainer::Pointer OutputCellsContainerPointer;
84  typedef typename OutputCellsContainer::ConstIterator
86  typedef typename OutputMeshType::CellType OutputCellType;
87 
88 
89  typedef typename Traits::NodeType NodeType;
90  typedef typename Traits::NodePairType NodePairType;
91  typedef typename Traits::NodePairContainerType NodePairContainerType;
92  typedef typename Traits::NodePairContainerPointer NodePairContainerPointer;
93  typedef typename Traits::NodePairContainerConstIterator
95 
96 // typedef typename Traits::NodeContainerType NodeContainerType;
97 // typedef typename Traits::NodeContainerPointer NodeContainerPointer;
98 // typedef typename Traits::NodeContainerConstIterator
99 // NodeContainerConstIterator;
100 
102 
103  typedef std::map< NodeType, LabelType > NodeLabelMapType;
104  typedef typename NodeLabelMapType::iterator NodeLabelMapIterator;
105  typedef typename NodeLabelMapType::const_iterator NodeLabelMapConstIterator;
106 
107 protected:
108 
111 
113 
114  IdentifierType GetTotalNumberOfNodes() const ITK_OVERRIDE;
115 
116  void SetOutputValue( OutputMeshType* oMesh,
117  const NodeType& iNode,
118  const OutputPixelType& iValue ) ITK_OVERRIDE;
119 
121  const NodeType& iNode ) const ITK_OVERRIDE;
122 
123  unsigned char GetLabelValueForGivenNode( const NodeType& iNode ) const ITK_OVERRIDE;
124 
125  void SetLabelValueForGivenNode( const NodeType& iNode,
126  const LabelType& iLabel ) ITK_OVERRIDE;
127 
128  void UpdateNeighbors( OutputMeshType* oMesh,
129  const NodeType& iNode ) ITK_OVERRIDE;
130 
131  void UpdateValue( OutputMeshType* oMesh,
132  const NodeType& iNode ) ITK_OVERRIDE;
133 
135  Solve( OutputMeshType* oMesh,
136  const NodeType& iId, const OutputPointType& iCurrentPoint,
137  const OutputVectorRealType& iF,
138  const NodeType& iId1, const OutputPointType& iP1,
139  const bool& iIsFar1, const OutputVectorRealType iVal1,
140  const NodeType& iId2, const OutputPointType& iP2,
141  const bool& iIsFar2, const OutputVectorRealType& iVal2 )
142  const;
143 
144 
147  const OutputVectorRealType& iVal1, const OutputVectorRealType& iVal2,
148  const OutputVectorRealType& iNorm1, const OutputVectorRealType& iSqNorm1,
149  const OutputVectorRealType& iNorm2, const OutputVectorRealType& iSqNorm2,
150  const OutputVectorRealType& iDot, const OutputVectorRealType& iF )
151  const;
152 
153  bool UnfoldTriangle(
154  OutputMeshType* oMesh,
155  const OutputPointIdentifierType& iId, const OutputPointType& iP,
156  const OutputPointIdentifierType& iId1, const OutputPointType& iP1,
157  const OutputPointIdentifierType& iId2, const OutputPointType &iP2,
160  OutputPointIdentifierType& oId ) const;
161 
162  bool CheckTopology( OutputMeshType* oMesh,
163  const NodeType& iNode ) ITK_OVERRIDE;
164 
165  void InitializeOutput( OutputMeshType* oMesh ) ITK_OVERRIDE;
166 
167 private:
169  void operator = ( const Self& );
171 };
172 }
173 
174 #include "itkFastMarchingQuadEdgeMeshFilterBase.hxx"
175 #endif // itkFastMarchingQuadEdgeMeshFilterBase_h
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
void UpdateNeighbors(OutputMeshType *oMesh, const NodeType &iNode) override
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
void UpdateValue(OutputMeshType *oMesh, const NodeType &iNode) override
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
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
void InitializeOutput(OutputMeshType *oMesh) override
void SetLabelValueForGivenNode(const NodeType &iNode, const LabelType &iLabel) override
Set the Label Value for a given node.
const OutputPixelType GetOutputValue(OutputMeshType *oMesh, const NodeType &iNode) const override
Abstract class to solve an Eikonal based-equation using Fast Marching Method.
Traits::OutputDomainPointer OutputDomainPointer
void SetOutputValue(OutputMeshType *oMesh, const NodeType &iNode, const OutputPixelType &iValue) override
Traits::InputDomainType InputDomainType
Traits::InputPixelType InputPixelType
Traits::OutputPixelType OutputPixelType
FastMarchingTraits< TInput, TOutput > Traits
IdentifierType GetTotalNumberOfNodes() const override
Get the total number of nodes in the domain.
bool CheckTopology(OutputMeshType *oMesh, const NodeType &iNode) override
OutputPointDataContainer::Pointer OutputPointDataContainerPointer
Traits::NodePairContainerConstIterator NodePairContainerConstIterator
unsigned char GetLabelValueForGivenNode(const NodeType &iNode) const override
Get the LabelType Value for a given node.
Traits::LabelType LabelType
Traits::OutputDomainType OutputDomainType
Traits::InputDomainPointer InputDomainPointer
OutputCellsContainer::ConstIterator OutputCellsContainerConstIterator