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"
28 #include "itkImageToImageFilter.h"
29 #include "itkNodePair.h"
30 
31 namespace itk
32 {
45 template <typename TInputDomain, typename TNode, typename TOutputDomain, typename TSuperclass>
47 {
48 public:
50  using InputDomainType = TInputDomain;
53 
55  using NodeType = TNode;
56 
58  using OutputDomainType = TOutputDomain;
61 
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 
78  enum LabelType
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 
109 template <typename TInput, typename TOutput>
111 {};
112 
113 template <unsigned int VDimension,
114  typename TInputPixel,
115  typename TOutputPixel> // = TInputPixel >
116 class 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 {
122 public:
123  static constexpr unsigned int ImageDimension = VDimension;
124 };
125 
126 
127 template <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  >
133 class 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 {
142 public:
143  static constexpr unsigned int PointDimension = VDimension;
144 };
145 
146 } // namespace itk
147 #endif // itkFastMarchingTraits_h
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::Index
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:68
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:639
itk::detail::VectorContainer::Pointer
SmartPointer< Self > Pointer
Definition: itkVectorContainer.h:59
itk::detail::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:51
itk::FastMarchingTraitsBase::Alive
Definition: itkFastMarchingTraits.h:85
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::OutputDomainPointer
typename OutputDomainType::Pointer OutputDomainPointer
Definition: itkFastMarchingTraits.h:59
itk::detail::VectorContainer::ConstIterator
friend class ConstIterator
Definition: itkVectorContainer.h:147
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::NodePairContainerConstIterator
typename NodePairContainerType::ConstIterator NodePairContainerConstIterator
Definition: itkFastMarchingTraits.h:66
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::NodePairContainerPointer
typename NodePairContainerType::Pointer NodePairContainerPointer
Definition: itkFastMarchingTraits.h:64
itkConceptChecking.h
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::LabelType
LabelType
Definition: itkFastMarchingTraits.h:78
itkImage.h
itkQuadEdgeMeshToQuadEdgeMeshFilter.h
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::InputDomainPointer
typename InputDomainType::Pointer InputDomainPointer
Definition: itkFastMarchingTraits.h:51
itk::NodePair
Represents a Node and its associated value (front value)
Definition: itkNodePair.h:33
itk::QuadEdgeMesh
Mesh class for 2D manifolds embedded in ND space.
Definition: itkQuadEdgeMesh.h:53
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::InputPixelType
typename InputDomainType::PixelType InputPixelType
Definition: itkFastMarchingTraits.h:52
itk::FastMarchingTraits
Base class traits to be used by the FastMarchingBase.
Definition: itkFastMarchingTraits.h:110
itkImageToImageFilter.h
itkNodePair.h
itkIntTypes.h
itk::Image::PixelType
TPixel PixelType
Definition: itkImage.h:108
itkQuadEdgeMesh.h
itkVectorContainer.h
itk::detail::VectorContainer::Iterator
friend class Iterator
Definition: itkVectorContainer.h:146
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::FastMarchingTraitsBase::Trial
Definition: itkFastMarchingTraits.h:88
itk::Concept::Convertible
Definition: itkConceptChecking.h:217
itk::FastMarchingTraitsBase::Forbidden
Definition: itkFastMarchingTraits.h:94
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::OutputPixelType
typename OutputDomainType::PixelType OutputPixelType
Definition: itkFastMarchingTraits.h:60
itk::FastMarchingTraitsBase::Topology
Definition: itkFastMarchingTraits.h:98
itk::FastMarchingTraitsBase
Definition: itkFastMarchingTraits.h:46
itk::FastMarchingTraitsBase< Image< TInputPixel, VDimension >, Index< VDimension >, Image< TOutputPixel, VDimension >, ImageToImageFilter< Image< TInputPixel, VDimension >, Image< TOutputPixel, VDimension > > >::NodePairContainerIterator
typename NodePairContainerType::Iterator NodePairContainerIterator
Definition: itkFastMarchingTraits.h:65
itk::FastMarchingTraitsBase::InitialTrial
Definition: itkFastMarchingTraits.h:91
itk::FastMarchingTraitsBase::Far
Definition: itkFastMarchingTraits.h:82