ITK  4.11.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 {
49 template< typename TInput, typename TOutput >
51  public FastMarchingImageFilterBase< TInput, TOutput >
52 {
53 public:
59  typedef typename Superclass::Traits Traits;
60 
62  itkNewMacro(Self);
63 
67 
69  itkStaticConstMacro(ImageDimension, unsigned int,
70  Superclass::ImageDimension );
71 
72  typedef typename Superclass::NodeType NodeType;
73  typedef typename Superclass::OutputImageType OutputImageType;
74  typedef typename Superclass::OutputPixelType OutputPixelType;
75  typedef typename Superclass::OutputSpacingType OutputSpacingType;
76 
79  ImageDimension > GradientPixelType;
80 
82  typedef Image< GradientPixelType,
83  ImageDimension > GradientImageType;
84 
87 
89  GradientImageType* GetGradientImage();
90 
91 protected:
94 
95  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
96 
97  virtual void InitializeOutput( OutputImageType* oImage ) ITK_OVERRIDE;
98 
99  virtual void UpdateNeighbors( OutputImageType* oImage,
100  const NodeType& iNode ) ITK_OVERRIDE;
101 
102  virtual void ComputeGradient(OutputImageType* oImage,
103  const NodeType& iNode );
104 
105 private:
106  ITK_DISALLOW_COPY_AND_ASSIGN(FastMarchingUpwindGradientImageFilterBase);
107 };
108 
109 /* this class was made in the case where isotropic and anisotropic fast
110  marching would be implemented in this effort. As of now, we focus only
111  in the isotropic case. Let's keep it for reference (just as a reminder).
112 */
113 //template< unsigned int VDimension,
114 // typename TInputPixel,
115 // typename TOutputPixel >
116 //class IsotropicFastMarchingUpwindGradientImageFilterBase:
117 // public FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
118 // TOutputPixel,
119 // FastMarchingImageFilterBase< VDimension, TInputPixel, TOutputPixel >
120 // >
121 // {
122 //public:
123 // typedef FastMarchingImageFilterBase< VDimension, TInputPixel,
124 // TOutputPixel > GrandParentClassType;
125 
127 // typedef IsotropicFastMarchingUpwindGradientImageFilterBase Self;
128 // typedef FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
129 // TOutputPixel, GrandParentClassType > Superclass;
130 // typedef SmartPointer< Self > Pointer;
131 // typedef SmartPointer< const Self > ConstPointer;
132 
134 // itkNewMacro(Self);
135 
137 // itkTypeMacro(IsotropicFastMarchingUpwindGradientImageFilterBase,
138 // FastMarchingUpwindGradientImageFilterBase );
139 
141 // itkStaticConstMacro(ImageDimension, unsigned int,
142 // Superclass::ImageDimension );
143 
144 // typedef typename Superclass::NodeType NodeType;
145 // typedef typename Superclass::OutputImageType OutputImageType;
146 // typedef typename Superclass::OutputPixelType OutputPixelType;
147 // typedef typename Superclass::OutputSpacingType OutputSpacingType;
148 
150 // typedef CovariantVector< OutputPixelType,
151 // ImageDimension > GradientPixelType;
152 
154 // typedef Image< GradientPixelType,
155 // ImageDimension > GradientImageType;
156 
158 // typedef typename GradientImageType::Pointer GradientImagePointer;
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
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