ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkFastMarchingTraits.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 itkFastMarchingTraits_h
20#define itkFastMarchingTraits_h
21
22#include "itkIntTypes.h"
23#include "itkVectorContainer.h"
24#include "itkConceptChecking.h"
25#include "itkImage.h"
26#include "itkQuadEdgeMesh.h"
29#include "itkNodePair.h"
30
31namespace itk
32{
45template <typename TInputDomain, typename TNode, typename TOutputDomain, typename TSuperclass>
47{
48public:
50 using InputDomainType = TInputDomain;
51 using InputDomainPointer = typename InputDomainType::Pointer;
52 using InputPixelType = typename InputDomainType::PixelType;
53
55 using NodeType = TNode;
56
58 using OutputDomainType = TOutputDomain;
59 using OutputDomainPointer = typename OutputDomainType::Pointer;
60 using OutputPixelType = typename OutputDomainType::PixelType;
61
65 using NodePairContainerIterator = typename NodePairContainerType::Iterator;
66 using NodePairContainerConstIterator = typename NodePairContainerType::ConstIterator;
67
68 /*
69 using NodeContainerType = VectorContainer<NodeType>;
70 using NodeContainerPointer = typename NodeContainerType::Pointer;
71 using NodeContainerIterator = typename NodeContainerType::Iterator;
72 using NodeContainerConstIterator = typename NodeContainerType::ConstIterator;
73 */
74
75 using SuperclassType = TSuperclass;
76
79 {
80
82 Far = 0,
83
86
89
92
95
99 };
100
101 itkConceptMacro(DoubleConvertibleOutputCheck, (Concept::Convertible<double, OutputPixelType>));
102
103 itkConceptMacro(OutputOStreamWritableCheck, (Concept::OStreamWritable<OutputPixelType>));
104};
105
106
107template <typename TInput, typename TOutput>
110
111template <unsigned int VDimension,
112 typename TInputPixel,
113 typename TOutputPixel> // = TInputPixel >
114class FastMarchingTraits<Image<TInputPixel, VDimension>, Image<TOutputPixel, VDimension>>
115 : public FastMarchingTraitsBase<Image<TInputPixel, VDimension>,
116 Index<VDimension>,
117 Image<TOutputPixel, VDimension>,
118 ImageToImageFilter<Image<TInputPixel, VDimension>, Image<TOutputPixel, VDimension>>>
119{
120public:
121 static constexpr unsigned int ImageDimension = VDimension;
122};
123
124
125template <unsigned int VDimension,
126 typename TInputPixel,
127 typename TInputMeshTraits, //= QuadEdgeMeshTraits< TInputPixel, VDimension, bool, bool >,
128 typename TOutputPixel, //= TInputPixel,
129 class TOutputMeshTraits //= QuadEdgeMeshTraits< TOutputPixel, VDimension, bool, bool >
130 >
131class FastMarchingTraits<QuadEdgeMesh<TInputPixel, VDimension, TInputMeshTraits>,
132 QuadEdgeMesh<TOutputPixel, VDimension, TOutputMeshTraits>>
133 : public FastMarchingTraitsBase<
134 QuadEdgeMesh<TInputPixel, VDimension, TInputMeshTraits>,
135 typename TInputMeshTraits::PointIdentifier,
136 QuadEdgeMesh<TOutputPixel, VDimension, TOutputMeshTraits>,
137 QuadEdgeMeshToQuadEdgeMeshFilter<QuadEdgeMesh<TInputPixel, VDimension, TInputMeshTraits>,
138 QuadEdgeMesh<TOutputPixel, VDimension, TOutputMeshTraits>>>
139{
140public:
141 static constexpr unsigned int PointDimension = VDimension;
142};
143
144} // namespace itk
145#endif // itkFastMarchingTraits_h
typename InputDomainType::Pointer InputDomainPointer
NodePair< NodeType, OutputPixelType > NodePairType
VectorContainer< NodePairType > NodePairContainerType
typename OutputDomainType::Pointer OutputDomainPointer
typename OutputDomainType::PixelType OutputPixelType
typename InputDomainType::PixelType InputPixelType
typename NodePairContainerType::Iterator NodePairContainerIterator
typename NodePairContainerType::ConstIterator NodePairContainerConstIterator
typename NodePairContainerType::Pointer NodePairContainerPointer
Base class traits to be used by the FastMarchingBase.
Templated n-dimensional image class.
Definition itkImage.h:89
Represents a Node and its associated value (front value)
Definition itkNodePair.h:34
Mesh class for 2D manifolds embedded in ND space.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer