ITK  6.0.0
Insight Toolkit
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;
52 using InputPixelType = typename InputDomainType::PixelType;
53
55 using NodeType = TNode;
56
58 using OutputDomainType = TOutputDomain;
60 using OutputPixelType = typename OutputDomainType::PixelType;
61
67
68 /*
69 using NodeContainerType = VectorContainer< IdentifierType, 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#ifdef ITK_USE_CONCEPT_CHECKING
102 itkConceptMacro(DoubleConvertibleOutputCheck, (Concept::Convertible<double, OutputPixelType>));
103
104 itkConceptMacro(OutputOStreamWritableCheck, (Concept::OStreamWritable<OutputPixelType>));
105#endif
106};
107
108
109template <typename TInput, typename TOutput>
111{};
112
113template <unsigned int VDimension,
114 typename TInputPixel,
115 typename TOutputPixel> // = TInputPixel >
116class FastMarchingTraits<Image<TInputPixel, VDimension>, Image<TOutputPixel, VDimension>>
117 : public FastMarchingTraitsBase<Image<TInputPixel, VDimension>,
118 Index<VDimension>,
119 Image<TOutputPixel, VDimension>,
120 ImageToImageFilter<Image<TInputPixel, VDimension>, Image<TOutputPixel, VDimension>>>
121{
122public:
123 static constexpr unsigned int ImageDimension = VDimension;
124};
125
126
127template <unsigned int VDimension,
128 typename TInputPixel,
129 typename TInputMeshTraits, //= QuadEdgeMeshTraits< TInputPixel, VDimension, bool, bool >,
130 typename TOutputPixel, //= TInputPixel,
131 class TOutputMeshTraits //= QuadEdgeMeshTraits< TOutputPixel, VDimension, bool, bool >
132 >
133class FastMarchingTraits<QuadEdgeMesh<TInputPixel, VDimension, TInputMeshTraits>,
134 QuadEdgeMesh<TOutputPixel, VDimension, TOutputMeshTraits>>
135 : public FastMarchingTraitsBase<
136 QuadEdgeMesh<TInputPixel, VDimension, TInputMeshTraits>,
137 typename TInputMeshTraits::PointIdentifier,
138 QuadEdgeMesh<TOutputPixel, VDimension, TOutputMeshTraits>,
139 QuadEdgeMeshToQuadEdgeMeshFilter<QuadEdgeMesh<TInputPixel, VDimension, TInputMeshTraits>,
140 QuadEdgeMesh<TOutputPixel, VDimension, TOutputMeshTraits>>>
141{
142public:
143 static constexpr unsigned int PointDimension = VDimension;
144};
145
146} // namespace itk
147#endif // itkFastMarchingTraits_h
typename InputDomainType::Pointer InputDomainPointer
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 a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SmartPointer< Self > Pointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....