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