00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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)> AuxVarType;
00084 typedef typename AuxVarType::AuxValueType AuxValueType;
00085 typedef typename AuxVarType::AuxValueVectorType AuxValueVectorType;
00086 typedef typename AuxVarType::AuxValueContainer AuxValueContainer;
00087 typedef typename AuxVarType::AuxImageType AuxImageType;
00088 typedef typename AuxVarType::AuxImagePointer AuxImagePointer;
00089 typedef typename AuxVarType::AuxImageConstPointer AuxImageConstPointer;
00090
00092 itkStaticConstMacro(AuxDimension, unsigned int,VAuxDimension);
00093
00095 void SetInputVelocityImage(const AuxImageType * ptr, unsigned int idx = 0);
00096 const AuxImageType * GetInputVelocityImage(unsigned int idx = 0);
00098
00100 AuxImageType * GetOutputVelocityImage( unsigned int idx = 0 );
00101
00102 #ifdef ITK_USE_CONCEPT_CHECKING
00103
00104 itkConceptMacro(AuxValueHasNumericTraitsCheck,
00105 (Concept::HasNumericTraits<TAuxValue>));
00106 itkConceptMacro(LevelSetOStreamWritableCheck,
00107 (Concept::OStreamWritable<PixelType>));
00108
00110 #endif
00111
00112 protected:
00113 ExtensionVelocitiesImageFilter();
00114 ~ExtensionVelocitiesImageFilter(){};
00115
00116 virtual void GenerateDataFull();
00117 virtual void GenerateDataNarrowBand();
00118 virtual void AllocateOutput();
00119
00120 virtual void EnlargeOutputRequestedRegion( DataObject * );
00121
00122 private:
00123 ExtensionVelocitiesImageFilter(const Self&);
00124 void operator=(const Self&);
00125
00129 typedef Image<float, itkGetStaticConstMacro(SetDimension) > SpeedImageType;
00130 typedef LevelSetVelocityNeighborhoodExtractor<TLevelSet,TAuxValue,VAuxDimension>
00131 LocatorType;
00132 typedef FastMarchingExtensionImageFilter<TLevelSet,TAuxValue,VAuxDimension,SpeedImageType>
00133 FastMarchingImageFilterType;
00134
00135 typename LocatorType::Pointer m_Locator;
00136 typename FastMarchingImageFilterType::Pointer m_Marcher;
00137
00138 };
00139
00140 }
00141
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkExtensionVelocitiesImageFilter.txx"
00144 #endif
00145
00146 #endif
00147