8#ifndef META_OCEAN_CV_SYNTHESIS_CREATOR_INPAINTING_CONTENT_I_1_H
9#define META_OCEAN_CV_SYNTHESIS_CREATOR_INPAINTING_CONTENT_I_1_H
55 void createSubset(
const unsigned int firstColumn,
const unsigned int numberColumns,
const unsigned int firstRow,
const unsigned int numberRows)
const override;
66 template <
unsigned int tChannels>
67 void createSubsetChannels(
const unsigned int firstColumn,
const unsigned int numberColumns,
const unsigned int firstRow,
const unsigned int numberRows)
const;
80template <
unsigned int tChannels>
83 ocean_assert(firstColumn + numberColumns <=
layerI_.width());
84 ocean_assert(firstRow + numberRows <=
layerI_.height());
88 const uint8_t* targetData =
target_.data<uint8_t>();
90 const unsigned int targetStrideElements =
target_.strideElements();
92 for (
unsigned int y = firstRow; y < firstRow + numberRows; ++y)
94 PixelType* targetRow =
target_.row<PixelType>(y);
96 const uint8_t* maskRow =
layerI_.mask().constrow<uint8_t>(y);
99 for (
unsigned int x = firstColumn; x < firstColumn + numberColumns; ++x)
101 if (maskRow[x] != 0xFFu)
106 ocean_assert(
layerI_.mask().constpixel<uint8_t>(mapping.
x(), mapping.
y())[0] == 0xFFu);
108 targetRow[x] = *((
const PixelType*)(targetData + mapping.
y() * targetStrideElements) + mapping.
x());
bool isValid() const
Returns whether this pixel position object holds two valid parameters.
T y() const
Returns the vertical coordinate position of this object.
Definition PixelPosition.h:468
T x() const
Returns the horizontal coordinate position of this object.
Definition PixelPosition.h:456
Creator1(const Layer &layer)
Creates a new creator object.
Definition Creator1.h:38
CreatorFrame(const Layer &layer, Frame &target)
Creates a new creator object.
Definition CreatorFrame.h:44
Frame & target_
Target frame of the creator.
Definition CreatorFrame.h:41
This class implements the base class for all creators.
Definition Creator.h:29
const LayerI & layerI_
Specialized layer reference.
Definition CreatorI.h:41
CreatorI(const LayerI &layer)
Creates a new creator object.
Definition CreatorI.h:44
void createSubsetChannels(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const
Specialization of the default function that creates a subset of the information.
Definition CreatorInpaintingContentI1.h:81
void createSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const override
Creates a subset of the information.
CreatorInpaintingContentI1(const LayerI1 &layer, Frame &target)
Creates a new creator object.
Definition CreatorInpaintingContentI1.h:70
CreatorSubset(const Layer &layer)
Creates a new creator object.
Definition CreatorSubset.h:55
This class implements a single layer for pixel synthesis within one frame and pixel accuracy.
Definition LayerI1.h:41
This class implements Ocean's image class.
Definition Frame.h:1969
PixelPositionT< unsigned int > PixelPosition
Definition of the default PixelPosition object with a data type allowing only positive coordinate val...
Definition PixelPosition.h:32
Namespace of the CV Synthesis library.
Definition Constraint.h:25
Namespace of the CV library.
Definition Advanced.h:17
The namespace covering the entire Ocean framework.
Definition Accessor.h:15
Default definition of a type with tBytes bytes.
Definition DataType.h:32