ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFastMarchingUpwindGradientImageFilterBase.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkFastMarchingUpwindGradientImageFilterBase_h
00019 #define __itkFastMarchingUpwindGradientImageFilterBase_h
00020 
00021 #include "itkFastMarchingImageFilterBase.h"
00022 #include "itkImage.h"
00023 
00024 namespace itk
00025 {
00049 template< class TInput, class TOutput >
00050 class ITK_EXPORT FastMarchingUpwindGradientImageFilterBase:
00051   public FastMarchingImageFilterBase< TInput, TOutput >
00052 {
00053 public:
00055   typedef FastMarchingUpwindGradientImageFilterBase       Self;
00056   typedef FastMarchingImageFilterBase< TInput, TOutput >  Superclass;
00057   typedef SmartPointer< Self >                            Pointer;
00058   typedef SmartPointer< const Self >                      ConstPointer;
00059   typedef typename Superclass::Traits                     Traits;
00060 
00062   itkNewMacro(Self);
00063 
00065   itkTypeMacro(FastMarchingUpwindGradientImageFilterBase,
00066                FastMarchingImageFilterBase);
00067 
00069   itkStaticConstMacro(ImageDimension, unsigned int,
00070                       Superclass::ImageDimension );
00071 
00072   typedef typename Superclass::NodeType           NodeType;
00073   typedef typename Superclass::OutputImageType    OutputImageType;
00074   typedef typename Superclass::OutputPixelType    OutputPixelType;
00075   typedef typename Superclass::OutputSpacingType  OutputSpacingType;
00076 
00078   typedef CovariantVector< OutputPixelType,
00079                            ImageDimension > GradientPixelType;
00080 
00082   typedef Image< GradientPixelType,
00083                  ImageDimension > GradientImageType;
00084 
00086   typedef typename GradientImageType::Pointer GradientImagePointer;
00087 
00089   GradientImageType* GetGradientImage();
00090 
00091 protected:
00092   FastMarchingUpwindGradientImageFilterBase();
00093   ~FastMarchingUpwindGradientImageFilterBase(){}
00094 
00095   void PrintSelf(std::ostream & os, Indent indent) const;
00096 
00097   virtual void InitializeOutput( OutputImageType* oImage );
00098 
00099   virtual void UpdateNeighbors( OutputImageType* oImage,
00100                                const NodeType& iNode );
00101 
00102   virtual void ComputeGradient(OutputImageType* oImage,
00103                                const NodeType& iNode );
00104 
00105 private:
00106   FastMarchingUpwindGradientImageFilterBase(const Self &); //purposely not
00107                                                        // implemented
00108   void operator=(const Self &);                        //purposely not
00109                                                        // implemented
00110 };
00111 
00112 /* this class was made in the case where isotropic and anisotropic fast
00113     marching would be implemented in this effort. As of now, we focus only
00114     in the isotropic case. Let's keep it for reference (just as a reminder).
00115 */
00116 //template< unsigned int VDimension,
00117 //         typename TInputPixel,
00118 //         typename TOutputPixel >
00119 //class ITK_EXPORT IsotropicFastMarchingUpwindGradientImageFilterBase:
00120 //    public FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
00121 //    TOutputPixel,
00122 //    FastMarchingImageFilterBase< VDimension, TInputPixel, TOutputPixel >
00123 //    >
00124 //  {
00125 //public:
00126 //  typedef FastMarchingImageFilterBase< VDimension, TInputPixel,
00127 //    TOutputPixel > GrandParentClassType;
00128 
00130 //  typedef IsotropicFastMarchingUpwindGradientImageFilterBase             Self;
00131 //  typedef FastMarchingUpwindGradientImageFilterBase< VDimension, TInputPixel,
00132 //    TOutputPixel, GrandParentClassType > Superclass;
00133 //  typedef SmartPointer< Self >                              Pointer;
00134 //  typedef SmartPointer< const Self >                        ConstPointer;
00135 
00137 //  itkNewMacro(Self);
00138 
00140 //  itkTypeMacro(IsotropicFastMarchingUpwindGradientImageFilterBase,
00141 //               FastMarchingUpwindGradientImageFilterBase );
00142 
00144 //  itkStaticConstMacro(ImageDimension, unsigned int,
00145 //                      Superclass::ImageDimension );
00146 
00147 //  typedef typename Superclass::NodeType        NodeType;
00148 //  typedef typename Superclass::OutputImageType OutputImageType;
00149 //  typedef typename Superclass::OutputPixelType OutputPixelType;
00150 //  typedef typename Superclass::OutputSpacingType OutputSpacingType;
00151 
00153 //  typedef CovariantVector< OutputPixelType,
00154 //                           ImageDimension > GradientPixelType;
00155 
00157 //  typedef Image< GradientPixelType,
00158 //                 ImageDimension > GradientImageType;
00159 
00161 //  typedef typename GradientImageType::Pointer GradientImagePointer;
00162 
00163 //protected:
00164 //  IsotropicFastMarchingUpwindGradientImageFilterBase() : Superclass() {}
00165 //  ~IsotropicFastMarchingUpwindGradientImageFilterBase() {}
00166 
00167 //private:
00168 //  void operator = ( const Self& );
00169 //  IsotropicFastMarchingUpwindGradientImageFilterBase( const Self& );
00170 //  };
00171 } // namespace itk
00172 
00173 #ifndef ITK_MANUAL_INSTANTIATION
00174 #include "itkFastMarchingUpwindGradientImageFilterBase.hxx"
00175 #endif
00176 
00177 #endif
00178