ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFastMarchingUpwindGradientImageFilterBase.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 #ifndef itkFastMarchingUpwindGradientImageFilterBase_h
19 #define itkFastMarchingUpwindGradientImageFilterBase_h
20 
22 #include "itkImage.h"
23 
24 namespace itk
25 {
52 template< typename TInput, typename TOutput >
54  public FastMarchingImageFilterBase< TInput, TOutput >
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(FastMarchingUpwindGradientImageFilterBase);
58 
64  using Traits = typename Superclass::Traits;
65 
67  itkNewMacro(Self);
68 
72 
74  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
75 
76  using NodeType = typename Superclass::NodeType;
77  using OutputImageType = typename Superclass::OutputImageType;
78  using OutputPixelType = typename Superclass::OutputPixelType;
79  using OutputSpacingType = typename Superclass::OutputSpacingType;
80 
83  ImageDimension >;
84 
87  ImageDimension >;
88 
91 
93  GradientImageType* GetGradientImage();
94 
95 protected:
97  ~FastMarchingUpwindGradientImageFilterBase() override = default;
98 
99  void PrintSelf(std::ostream & os, Indent indent) const override;
100 
101  void InitializeOutput( OutputImageType* oImage ) override;
102 
103  void UpdateNeighbors( OutputImageType* oImage,
104  const NodeType& iNode ) override;
105 
106  virtual void ComputeGradient(OutputImageType* oImage,
107  const NodeType& iNode );
108 };
109 
110 /* this class was made in the case where isotropic and anisotropic fast
111  marching would be implemented in this effort. As of now, we focus only
112  in the isotropic case. Let's keep it for reference (just as a reminder).
113 */
114 //template< unsigned int VDimension,
115 // typename TInputPixel,
116 // typename TOutputPixel >
117 //class IsotropicFastMarchingUpwindGradientImageFilterBase:
118 // public FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
119 // TOutputPixel,
120 // FastMarchingImageFilterBase< VDimension, TInputPixel, TOutputPixel >
121 // >
122 // {
123 //public:
124 // using GrandParentClassType = FastMarchingImageFilterBase< VDimension, TInputPixel,
125 // TOutputPixel >;
126 
128 // using Self = IsotropicFastMarchingUpwindGradientImageFilterBase;
129 // using Superclass = FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
130 // TOutputPixel, GrandParentClassType >;
131 // using Pointer = SmartPointer< Self >;
132 // using ConstPointer = SmartPointer< const Self >;
133 
135 // itkNewMacro(Self);
136 
138 // itkTypeMacro(IsotropicFastMarchingUpwindGradientImageFilterBase,
139 // FastMarchingUpwindGradientImageFilterBase );
140 
142 // static constexpr unsigned int ImageDimension = // Superclass::ImageDimension;
143 
144 // using NodeType = typename Superclass::NodeType;
145 // using OutputImageType = typename Superclass::OutputImageType;
146 // using OutputPixelType = typename Superclass::OutputPixelType;
147 // using OutputSpacingType = typename Superclass::OutputSpacingType;
148 
150 // using GradientPixelType = CovariantVector< OutputPixelType,
151 // ImageDimension >;
152 
154 // using GradientImageType = Image< GradientPixelType,
155 // ImageDimension >;
156 
158 // using GradientImagePointer = typename GradientImageType::Pointer;
159 
160 //protected:
161 // IsotropicFastMarchingUpwindGradientImageFilterBase() : Superclass() {}
162 // ~IsotropicFastMarchingUpwindGradientImageFilterBase() {}
163 
164 //private:
165 // void operator = ( const Self& );
166 // IsotropicFastMarchingUpwindGradientImageFilterBase( const Self& );
167 // };
168 } // namespace itk
169 
170 #ifndef ITK_MANUAL_INSTANTIATION
171 #include "itkFastMarchingUpwindGradientImageFilterBase.hxx"
172 #endif
173 
174 #endif
typename Superclass::OutputDomainType OutputImageType
typename Traits::NodeType NodeType
Apply the Fast Marching method to solve an Eikonal equation on an image.
typename Traits::OutputPixelType OutputPixelType
typename OutputImageType::SpacingType OutputSpacingType
Abstract class to solve an Eikonal based-equation using Fast Marching Method.
typename FastMarchingTraits< TInput, TOutput >::SuperclassType Superclass
Generates the upwind gradient field of fast marching arrival times.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class traits to be used by the FastMarchingBase.
A templated class holding a n-Dimensional covariant vector.
Templated n-dimensional image class.
Definition: itkImage.h:75