Ocean
Loading...
Searching...
No Matches
Ocean::CV::Synthesis::Layer Class Referenceabstract

This class implements the base class for all inpainting layers. More...

#include <Layer.h>

Inheritance diagram for Ocean::CV::Synthesis::Layer:

Public Member Functions

unsigned int width () const
 Returns the width of this layer.
 
unsigned int height () const
 Returns the height of this layer.
 
const Frame & frame () const
 Returns the frame of this layer.
 
Frame & frame ()
 Returns the frame of this layer.
 
const Frame & mask () const
 Returns the mask of this layer.
 
Frame & mask ()
 Returns the mask of this layer.
 
const PixelBoundingBox & boundingBox () const
 Returns the optional bounding box of this layer.
 
virtual const Mapping & mapping () const =0
 Returns the mapping of this synthesis layer.
 
virtual Mapping & mapping ()=0
 Returns the mapping of this synthesis layer.
 
 operator bool () const
 Returns whether this layer holds at least one pixel.
 

Protected Member Functions

 Layer ()=default
 Creates an empty inpainting layer.
 
 Layer (const Layer &layer)
 Copy constructor.
 
 Layer (Layer &&layer) noexcept
 Move constructor.
 
 Layer (Frame &frame, const Frame &mask, const PixelBoundingBox &boundingBox=PixelBoundingBox())
 Creates a new inpainting layer by a given frame and corresponding mask.
 
virtual ~Layer ()
 Destructs the inpainting layer.
 
Layer & operator= (const Layer &layer)
 Assign operator.
 
Layer & operator= (Layer &&layer) noexcept
 Move operator.
 

Protected Attributes

unsigned int width_ = 0u
 Width of this synthesis layer in pixel, with range [0, infinity)
 
unsigned int height_ = 0u
 Height of this synthesis layer in pixel, with range [0, infinity)
 
Frame frame_
 Frame of the inpainting layer, never owning the memory.
 
Frame mask_
 Mask of the inpainting layer, with same dimension and pixel origin as the defined frame, always owning the memory.
 
PixelBoundingBox boundingBox_
 Optional bounding box covering all mask pixels, if defined.
 

Detailed Description

This class implements the base class for all inpainting layers.

The inpainting layer holds one inpainting frame with a corresponding inpainting mask.
Frame and mask must have the same frame dimensions and pixel origins.
Optional, each layer can hold a bounding box enclosing the inpainting area to speedup the computation.

Constructor & Destructor Documentation

◆ Layer() [1/4]

Ocean::CV::Synthesis::Layer::Layer ( )
protecteddefault

Creates an empty inpainting layer.

◆ Layer() [2/4]

Ocean::CV::Synthesis::Layer::Layer ( const Layer &  layer)
protected

Copy constructor.

The resulting layer will hold a copy of the underlying image data.

Parameters
layerThe layer to be copied

◆ Layer() [3/4]

Ocean::CV::Synthesis::Layer::Layer ( Layer &&  layer)
protectednoexcept

Move constructor.

Parameters
layerThe layer to be moved

◆ Layer() [4/4]

Ocean::CV::Synthesis::Layer::Layer ( Frame &  frame,
const Frame &  mask,
const PixelBoundingBox &  boundingBox = PixelBoundingBox() 
)
protected

Creates a new inpainting layer by a given frame and corresponding mask.

Parameters
frameInpainting frame for this layer
maskInpainting mask of this layer
boundingBoxOptional inpainting bounding box covering all mask pixels, if defined

◆ ~Layer()

virtual Ocean::CV::Synthesis::Layer::~Layer ( )
protectedvirtual

Destructs the inpainting layer.

Member Function Documentation

◆ boundingBox()

const PixelBoundingBox & Ocean::CV::Synthesis::Layer::boundingBox ( ) const
inline

Returns the optional bounding box of this layer.

Returns
Bounding box covering all mask pixels, if defined

◆ frame() [1/2]

Frame & Ocean::CV::Synthesis::Layer::frame ( )
inline

Returns the frame of this layer.

Returns
Layer frame

◆ frame() [2/2]

const Frame & Ocean::CV::Synthesis::Layer::frame ( ) const
inline

Returns the frame of this layer.

Returns
Layer frame

◆ height()

unsigned int Ocean::CV::Synthesis::Layer::height ( ) const
inline

Returns the height of this layer.

Returns
Layer height in pixel, with range [0, infinity)

◆ mapping() [1/2]

virtual const Mapping & Ocean::CV::Synthesis::Layer::mapping ( ) const
pure virtual

Returns the mapping of this synthesis layer.

Returns
Synthesis mapping

Implemented in Ocean::CV::Synthesis::LayerF, Ocean::CV::Synthesis::LayerI, Ocean::CV::Synthesis::LayerF1, and Ocean::CV::Synthesis::LayerI1.

◆ mapping() [2/2]

virtual Mapping & Ocean::CV::Synthesis::Layer::mapping ( )
pure virtual

Returns the mapping of this synthesis layer.

Returns
Synthesis mapping

Implemented in Ocean::CV::Synthesis::LayerF1, Ocean::CV::Synthesis::LayerI1, Ocean::CV::Synthesis::LayerF, and Ocean::CV::Synthesis::LayerI.

◆ mask() [1/2]

Frame & Ocean::CV::Synthesis::Layer::mask ( )
inline

Returns the mask of this layer.

Returns
Layer mask

◆ mask() [2/2]

const Frame & Ocean::CV::Synthesis::Layer::mask ( ) const
inline

Returns the mask of this layer.

Returns
Layer mask

◆ operator bool()

Ocean::CV::Synthesis::Layer::operator bool ( ) const
inlineexplicit

Returns whether this layer holds at least one pixel.

Returns
True, if so

◆ operator=() [1/2]

Layer & Ocean::CV::Synthesis::Layer::operator= ( const Layer &  layer)
protected

Assign operator.

Afterwards, this layer will hold a copy of the underlying image data.

Parameters
layerThe layer to be copied
Returns
Reference to this layer

◆ operator=() [2/2]

Layer & Ocean::CV::Synthesis::Layer::operator= ( Layer &&  layer)
protectednoexcept

Move operator.

Parameters
layerThe layer to be moved
Returns
Reference to this layer

◆ width()

unsigned int Ocean::CV::Synthesis::Layer::width ( ) const
inline

Returns the width of this layer.

Returns
Layer with in pixel, with range [0, infinity)

Field Documentation

◆ boundingBox_

PixelBoundingBox Ocean::CV::Synthesis::Layer::boundingBox_
protected

Optional bounding box covering all mask pixels, if defined.

◆ frame_

Frame Ocean::CV::Synthesis::Layer::frame_
protected

Frame of the inpainting layer, never owning the memory.

◆ height_

unsigned int Ocean::CV::Synthesis::Layer::height_ = 0u
protected

Height of this synthesis layer in pixel, with range [0, infinity)

◆ mask_

Frame Ocean::CV::Synthesis::Layer::mask_
protected

Mask of the inpainting layer, with same dimension and pixel origin as the defined frame, always owning the memory.

◆ width_

unsigned int Ocean::CV::Synthesis::Layer::width_ = 0u
protected

Width of this synthesis layer in pixel, with range [0, infinity)


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