Ocean
Ocean::CV::Synthesis::Layer Class Referenceabstract

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

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

Public Member Functions

unsigned int width () const
 Returns the width of this layer. More...
 
unsigned int height () const
 Returns the height of this layer. More...
 
const Frameframe () const
 Returns the frame of this layer. More...
 
Frameframe ()
 Returns the frame of this layer. More...
 
const Framemask () const
 Returns the mask of this layer. More...
 
Framemask ()
 Returns the mask of this layer. More...
 
const PixelBoundingBoxboundingBox () const
 Returns the optional bounding box of this layer. More...
 
virtual const Mappingmapping () const =0
 Returns the mapping of this synthesis layer. More...
 
virtual Mappingmapping ()=0
 Returns the mapping of this synthesis layer. More...
 
 operator bool () const
 Returns whether this layer holds at least one pixel. More...
 

Protected Member Functions

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

Protected Attributes

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

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::LayerI1, Ocean::CV::Synthesis::LayerF1, Ocean::CV::Synthesis::LayerI, and Ocean::CV::Synthesis::LayerF.

◆ 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::LayerI, Ocean::CV::Synthesis::LayerF, Ocean::CV::Synthesis::LayerI1, and Ocean::CV::Synthesis::LayerF1.

◆ 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: