Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkLevelSetVelocityNeighborhoodExtractor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLevelSetVelocityNeighborhoodExtractor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-01-24 20:02:58 $
00007   Version:   $Revision: 1.23 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkLevelSetVelocityNeighborhoodExtractor_h
00018 #define __itkLevelSetVelocityNeighborhoodExtractor_h
00019 
00020 #include "itkLevelSetNeighborhoodExtractor.h"
00021 #include "itkLevelSet.h"
00022 #include "itkIndex.h"
00023 
00024 namespace itk
00025 {
00026 
00054 template <
00055   class TLevelSet,
00056   class TAuxValue,
00057   unsigned int VAuxDimension = 1
00058   >
00059 class ITK_EXPORT LevelSetVelocityNeighborhoodExtractor :
00060     public LevelSetNeighborhoodExtractor<TLevelSet>
00061 {
00062 public:
00064   typedef LevelSetVelocityNeighborhoodExtractor    Self;
00065   typedef LevelSetNeighborhoodExtractor<TLevelSet> Superclass;
00066   typedef SmartPointer<Self>                       Pointer;
00067   typedef SmartPointer<const Self>                 ConstPointer;
00068 
00070   itkNewMacro(Self);
00071 
00073   itkTypeMacro(LevelSetVelocityNeighborhoodExtractor, 
00074                LevelSetNeighborhoodExtractor);
00075 
00077   typedef LevelSetTypeDefault<TLevelSet>  LevelSetType;
00078 
00080   itkStaticConstMacro(SetDimension, unsigned int,
00081                       LevelSetType::SetDimension);
00082 
00084   typedef ::itk::Index<itkGetStaticConstMacro(SetDimension)> Index;
00085 
00087   typedef AuxVarTypeDefault<TAuxValue,VAuxDimension,itkGetStaticConstMacro(SetDimension)>
00088                                                     AuxVarType;
00089   typedef typename AuxVarType::AuxValueType         AuxValueType;
00090   typedef typename AuxVarType::AuxValueVectorType   AuxValueVectorType;
00091   typedef typename AuxVarType::AuxValueContainer    AuxValueContainer;
00092   typedef typename AuxVarType::AuxImageType         AuxImageType;
00093   typedef typename AuxVarType::AuxImagePointer      AuxImagePointer;
00094   typedef typename AuxVarType::AuxImageConstPointer AuxImageConstPointer;
00095 
00097   void SetAuxImage( const AuxImageType * ptr, unsigned int idx = 0 )
00098     { 
00099     if ( idx < VAuxDimension && m_AuxImage[idx] != ptr )
00100       {
00101       m_AuxImage[idx] = ptr;
00102       }
00103     this->Modified();
00104     }
00106 
00108   AuxImageConstPointer GetAuxImage( unsigned int idx = 0 )
00109     {
00110     if ( idx >= VAuxDimension ) 
00111       { 
00112       return NULL; 
00113       }
00114     else 
00115       { 
00116       return m_AuxImage[idx]; 
00117       }
00118     }
00120 
00123   itkGetObjectMacro( AuxInsideValues, AuxValueContainer );
00124 
00127   itkGetObjectMacro( AuxOutsideValues, AuxValueContainer );
00128 
00129 protected:
00130   LevelSetVelocityNeighborhoodExtractor();
00131   ~LevelSetVelocityNeighborhoodExtractor(){};
00132   void PrintSelf( std::ostream& os, Indent indent ) const;
00133 
00134   virtual void Initialize();
00135   virtual double CalculateDistance( Index & index );
00136 
00137 private:
00138   LevelSetVelocityNeighborhoodExtractor(const Self&); //purposely not implemented
00139   void operator=(const Self&); //purposely not implemented
00140 
00141   typename AuxValueContainer::Pointer    m_AuxInsideValues;
00142   typename AuxValueContainer::Pointer    m_AuxOutsideValues;
00143   AuxImageConstPointer                   m_AuxImage[VAuxDimension];
00144 
00145 };
00146 
00147 } // namespace itk
00148 
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkLevelSetVelocityNeighborhoodExtractor.txx"
00151 #endif
00152 
00153 #endif
00154 

Generated at Thu May 28 10:40:38 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000