ITK  4.13.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:
62  typedef typename Superclass::Traits Traits;
63 
65  itkNewMacro(Self);
66 
70 
72  itkStaticConstMacro(ImageDimension, unsigned int,
73  Superclass::ImageDimension );
74 
75  typedef typename Superclass::NodeType NodeType;
76  typedef typename Superclass::OutputImageType OutputImageType;
77  typedef typename Superclass::OutputPixelType OutputPixelType;
78  typedef typename Superclass::OutputSpacingType OutputSpacingType;
79 
82  ImageDimension > GradientPixelType;
83 
85  typedef Image< GradientPixelType,
86  ImageDimension > GradientImageType;
87 
90 
92  GradientImageType* GetGradientImage();
93 
94 protected:
97 
98  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
99 
100  virtual void InitializeOutput( OutputImageType* oImage ) ITK_OVERRIDE;
101 
102  virtual void UpdateNeighbors( OutputImageType* oImage,
103  const NodeType& iNode ) ITK_OVERRIDE;
104 
105  virtual void ComputeGradient(OutputImageType* oImage,
106  const NodeType& iNode );
107 
108 private:
109  ITK_DISALLOW_COPY_AND_ASSIGN(FastMarchingUpwindGradientImageFilterBase);
110 };
111 
112 /* this class was made in the case where isotropic and anisotropic fast
113  marching would be implemented in this effort. As of now, we focus only
114  in the isotropic case. Let's keep it for reference (just as a reminder).
115 */
116 //template< unsigned int VDimension,
117 // typename TInputPixel,
118 // typename TOutputPixel >
119 //class IsotropicFastMarchingUpwindGradientImageFilterBase:
120 // public FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
121 // TOutputPixel,
122 // FastMarchingImageFilterBase< VDimension, TInputPixel, TOutputPixel >
123 // >
124 // {
125 //public:
126 // typedef FastMarchingImageFilterBase< VDimension, TInputPixel,
127 // TOutputPixel > GrandParentClassType;
128 
130 // typedef IsotropicFastMarchingUpwindGradientImageFilterBase Self;
131 // typedef FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
132 // TOutputPixel, GrandParentClassType > Superclass;
133 // typedef SmartPointer< Self > Pointer;
134 // typedef SmartPointer< const Self > ConstPointer;
135 
137 // itkNewMacro(Self);
138 
140 // itkTypeMacro(IsotropicFastMarchingUpwindGradientImageFilterBase,
141 // FastMarchingUpwindGradientImageFilterBase );
142 
144 // itkStaticConstMacro(ImageDimension, unsigned int,
145 // Superclass::ImageDimension );
146 
147 // typedef typename Superclass::NodeType NodeType;
148 // typedef typename Superclass::OutputImageType OutputImageType;
149 // typedef typename Superclass::OutputPixelType OutputPixelType;
150 // typedef typename Superclass::OutputSpacingType OutputSpacingType;
151 
153 // typedef CovariantVector< OutputPixelType,
154 // ImageDimension > GradientPixelType;
155 
157 // typedef Image< GradientPixelType,
158 // ImageDimension > GradientImageType;
159 
161 // typedef typename GradientImageType::Pointer GradientImagePointer;
162 
163 //protected:
164 // IsotropicFastMarchingUpwindGradientImageFilterBase() : Superclass() {}
165 // ~IsotropicFastMarchingUpwindGradientImageFilterBase() {}
166 
167 //private:
168 // void operator = ( const Self& );
169 // IsotropicFastMarchingUpwindGradientImageFilterBase( const Self& );
170 // };
171 } // namespace itk
172 
173 #ifndef ITK_MANUAL_INSTANTIATION
174 #include "itkFastMarchingUpwindGradientImageFilterBase.hxx"
175 #endif
176 
177 #endif
Apply the Fast Marching method to solve an Eikonal equation on an image.
Abstract class to solve an Eikonal based-equation using Fast Marching Method.
Generates the upwind gradient field of fast marching arrival times.
Traits::OutputPixelType OutputPixelType
CovariantVector< OutputPixelType, ImageDimension > GradientPixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
A templated class holding a n-Dimensional covariant vector.
Templated n-dimensional image class.
Definition: itkImage.h:75