ITK  4.4.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< class TInput, class 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;
96 
97  virtual void InitializeOutput( OutputImageType* oImage );
98 
99  virtual void UpdateNeighbors( OutputImageType* oImage,
100  const NodeType& iNode );
101 
102  virtual void ComputeGradient(OutputImageType* oImage,
103  const NodeType& iNode );
104 
105 private:
106  FastMarchingUpwindGradientImageFilterBase(const Self &); //purposely not
107  // implemented
108  void operator=(const Self &); //purposely not
109  // implemented
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 ITK_EXPORT 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
178