diff --git a/Code/IO/otbVectorImage.h b/Code/IO/otbVectorImage.h index d9304be9ecc0d9ce37c1f3c40275035f7c01161d..fbba3e59137b7b484e1a2e0feeec24e17ced3225 100644 --- a/Code/IO/otbVectorImage.h +++ b/Code/IO/otbVectorImage.h @@ -49,6 +49,7 @@ public: typedef itk::VectorImage<TPixel, VImageDimension> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; + typedef itk::WeakPointer<const Self> ConstWeakPointer; typedef ImageBase::VectorType VectorType; typedef ImageBase::ImageKeywordlistType ImageKeywordlistType; @@ -154,6 +155,22 @@ public: void PrintSelf(std::ostream& os, itk::Indent indent) const; + /** Return the Pixel Accessor object */ + AccessorType GetPixelAccessor( void ) + { return AccessorType( this->GetNumberOfComponentsPerPixel() ); } + + /** Return the Pixel Accesor object */ + const AccessorType GetPixelAccessor( void ) const + { return AccessorType( this->GetNumberOfComponentsPerPixel() ); } + + /** Return the NeighborhoodAccessor functor */ + NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() + { return NeighborhoodAccessorFunctorType( this->GetNumberOfComponentsPerPixel() ); } + + /** Return the NeighborhoodAccessor functor */ + const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const + { return NeighborhoodAccessorFunctorType(this->GetNumberOfComponentsPerPixel()); } + protected: VectorImage(); virtual ~VectorImage(){};