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

itkExtensionVelocitiesImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExtensionVelocitiesImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-12-17 18:52:03 $
00007   Version:   $Revision: 1.26 $
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 __itkExtensionVelocitiesImageFilter_h
00018 #define __itkExtensionVelocitiesImageFilter_h
00019 
00020 #include "itkLevelSetVelocityNeighborhoodExtractor.h"
00021 #include "itkFastMarchingExtensionImageFilter.h"
00022 #include "itkReinitializeLevelSetImageFilter.h"
00023 
00024 namespace itk
00025 {
00047 template <
00048   class TLevelSet,
00049   class TAuxValue = float,
00050   unsigned int VAuxDimension = 1
00051   >
00052 class ITK_EXPORT ExtensionVelocitiesImageFilter :
00053     public ReinitializeLevelSetImageFilter<TLevelSet>
00054 {
00055 public:
00056 
00058   typedef ExtensionVelocitiesImageFilter             Self;
00059   typedef ReinitializeLevelSetImageFilter<TLevelSet> Superclass;
00060   typedef SmartPointer<Self>                         Pointer;
00061   typedef SmartPointer<const Self>                   ConstPointer;
00062 
00064   itkNewMacro(Self);
00065 
00067   itkTypeMacro(ExtensionVelocitiesImageFilter, ReinitializeLevelSetImageFilter);
00068 
00070   typedef LevelSetTypeDefault<TLevelSet>               LevelSetType;
00071   typedef typename LevelSetType::LevelSetPointer       LevelSetPointer;
00072   typedef typename LevelSetType::LevelSetConstPointer  LevelSetConstPointer;
00073   typedef typename LevelSetType::PixelType             PixelType;
00074   typedef typename LevelSetType::NodeType              NodeType;
00075   typedef typename LevelSetType::NodeContainer         NodeContainer;
00076   typedef typename LevelSetType::NodeContainerPointer  NodeContainerPointer;
00077 
00079   itkStaticConstMacro(SetDimension, unsigned int,LevelSetType::SetDimension);
00080 
00082   typedef AuxVarTypeDefault<TAuxValue,VAuxDimension,
00083                             itkGetStaticConstMacro(SetDimension)>
00084                                                      AuxVarType;
00085   typedef typename AuxVarType::AuxValueType          AuxValueType;
00086   typedef typename AuxVarType::AuxValueVectorType    AuxValueVectorType;
00087   typedef typename AuxVarType::AuxValueContainer     AuxValueContainer;
00088   typedef typename AuxVarType::AuxImageType          AuxImageType;
00089   typedef typename AuxVarType::AuxImagePointer       AuxImagePointer;
00090   typedef typename AuxVarType::AuxImageConstPointer  AuxImageConstPointer;
00091 
00093   itkStaticConstMacro(AuxDimension, unsigned int,VAuxDimension);
00094 
00096   void SetInputVelocityImage(const AuxImageType * ptr, unsigned int idx = 0);
00097   const AuxImageType * GetInputVelocityImage(unsigned int idx = 0);
00099 
00101   AuxImageType * GetOutputVelocityImage( unsigned int idx = 0 );
00102 
00103 #ifdef ITK_USE_CONCEPT_CHECKING
00104 
00105   itkConceptMacro(AuxValueHasNumericTraitsCheck,
00106     (Concept::HasNumericTraits<TAuxValue>));
00107   itkConceptMacro(LevelSetOStreamWritableCheck,
00108     (Concept::OStreamWritable<PixelType>));
00109 
00111 #endif
00112 
00113 protected:
00114   ExtensionVelocitiesImageFilter();
00115   ~ExtensionVelocitiesImageFilter(){};
00116 
00117   virtual void GenerateDataFull();
00118   virtual void GenerateDataNarrowBand();
00119   virtual void AllocateOutput();
00120 
00121   virtual void EnlargeOutputRequestedRegion( DataObject * );
00122 
00123 private:
00124   ExtensionVelocitiesImageFilter(const Self&); //purposely not implemented
00125   void operator=(const Self&); //purposely not implemented
00126 
00130   typedef Image<float, itkGetStaticConstMacro(SetDimension) > SpeedImageType;
00131 
00132   typedef LevelSetVelocityNeighborhoodExtractor<TLevelSet,TAuxValue,VAuxDimension> 
00133                                                   LocatorType;
00134   typedef FastMarchingExtensionImageFilter<TLevelSet,TAuxValue,VAuxDimension,SpeedImageType> 
00135                                                   FastMarchingImageFilterType;
00136 
00137   typename LocatorType::Pointer                    m_Locator;
00138   typename FastMarchingImageFilterType::Pointer    m_Marcher;
00139 
00140 };
00141 
00142 } // namespace itk
00143 
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "itkExtensionVelocitiesImageFilter.txx"
00146 #endif
00147 
00148 #endif
00149 

Generated at Mon Jul 12 2010 18:17:29 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000