farm-ng-core
sophus::MutDynImageView< TPredicate > Class Template Reference

#include <mut_dyn_image_view.h>

Inheritance diagram for sophus::MutDynImageView< TPredicate >:
Collaboration diagram for sophus::MutDynImageView< TPredicate >:

Public Member Functions

template<class TPixel >
 MutDynImageView (MutImageView< TPixel > const &image)
 Create type-erased image view from ImageView. More...
 
template<class TPixel >
auto has () const noexcept -> bool
 Return true is this contains data of type TPixel. More...
 
auto rawMutRowPtr (int v) const -> uint8_t *
 Returns v-th row pointer. More...
 
auto rawMutPtr () const -> uint8_t *
 
auto mutSubview (Eigen::Vector2i uv, sophus::ImageSize size) const -> MutDynImageView
 Returns subview with shared ownership semantics of whole image. More...
 
template<class TPixel >
auto mutImageView () const noexcept -> MutImageView< TPixel >
 Returns typed image view. More...
 
void copyDataFrom (DynImageView< TPredicate > view) const
 Copies data from view into this. More...
 
- Public Member Functions inherited from sophus::DynImageView< AnyImagePredicate >
 DynImageView (ImageView< TPixel > const &image)
 Create type-erased image view from ImageView. More...
 
auto has () const noexcept -> bool
 
auto rawRowPtr (int v) const -> uint8_t const *
 Returns v-th row pointer. More...
 
auto rawPtr () const -> uint8_t const *
 
auto layout () const -> ImageLayout const &
 
auto imageSize () const -> ImageSize const &
 
auto area () const -> size_t
 
auto width () const -> int
 
auto height () const -> int
 
auto pitchBytes () const -> size_t
 
auto sizeBytes () const -> size_t
 
auto isEmpty () const -> bool
 
auto pixelFormat () const -> PixelFormat
 
auto numChannels () const -> int
 
auto subview (Eigen::Vector2i uv, sophus::ImageSize size) const -> DynImageView
 Returns subview with shared ownership semantics of whole image. More...
 
auto imageView () const noexcept -> ImageView< TPixel >
 Returns typed image. More...
 
void setViewToEmpty ()
 

Protected Member Functions

 MutDynImageView (ImageLayout const &layout, PixelFormat const &pixel_format, void const *ptr)
 
 MutDynImageView ()=default
 
- Protected Member Functions inherited from sophus::DynImageView< AnyImagePredicate >
 DynImageView ()=default
 
 DynImageView (ImageLayout const &layout, PixelFormat const &pixel_format, void const *ptr)
 

Additional Inherited Members

- Static Public Member Functions inherited from sophus::DynImageView< AnyImagePredicate >
static DynImageView unsafeWrapAndPromiseProperAlignment (ImageLayout const &layout, PixelFormat const &pixel_format, void const *ptr)
 
- Protected Attributes inherited from sophus::DynImageView< AnyImagePredicate >
ImageLayout layout_
 
PixelFormat pixel_format_
 
uint8_t const * ptr_
 

Constructor & Destructor Documentation

◆ MutDynImageView() [1/3]

template<class TPredicate = AnyImagePredicate>
template<class TPixel >
sophus::MutDynImageView< TPredicate >::MutDynImageView ( MutImageView< TPixel > const &  image)
inline

Create type-erased image view from ImageView.

By design not "explicit".

◆ MutDynImageView() [2/3]

template<class TPredicate = AnyImagePredicate>
sophus::MutDynImageView< TPredicate >::MutDynImageView ( ImageLayout const &  layout,
PixelFormat const &  pixel_format,
void const *  ptr 
)
inlineprotected

◆ MutDynImageView() [3/3]

template<class TPredicate = AnyImagePredicate>
sophus::MutDynImageView< TPredicate >::MutDynImageView ( )
protecteddefault

Member Function Documentation

◆ copyDataFrom()

template<class TPredicate = AnyImagePredicate>
void sophus::MutDynImageView< TPredicate >::copyDataFrom ( DynImageView< TPredicate >  view) const
inline

Copies data from view into this.

Preconditions:

  • this->isEmpty() == view.isEmpty()
  • this->size() == view.size()

No-op if view is empty.

◆ has()

template<class TPredicate = AnyImagePredicate>
template<class TPixel >
auto sophus::MutDynImageView< TPredicate >::has ( ) const -> bool
inlinenoexcept

Return true is this contains data of type TPixel.

◆ mutImageView()

template<class TPredicate = AnyImagePredicate>
template<class TPixel >
auto sophus::MutDynImageView< TPredicate >::mutImageView ( ) const -> MutImageView<TPixel>
inlinenoexcept

Returns typed image view.

Precondition: this->has<TPixel>()

◆ mutSubview()

template<class TPredicate = AnyImagePredicate>
auto sophus::MutDynImageView< TPredicate >::mutSubview ( Eigen::Vector2i  uv,
sophus::ImageSize  size 
) const -> MutDynImageView
inline

Returns subview with shared ownership semantics of whole image.

◆ rawMutPtr()

template<class TPredicate = AnyImagePredicate>
auto sophus::MutDynImageView< TPredicate >::rawMutPtr ( ) const -> uint8_t*
inline

◆ rawMutRowPtr()

template<class TPredicate = AnyImagePredicate>
auto sophus::MutDynImageView< TPredicate >::rawMutRowPtr ( int  v) const -> uint8_t*
inline

Returns v-th row pointer.

Precondition: v must be in [0, height).


The documentation for this class was generated from the following file: