Ocean
Loading...
Searching...
No Matches
LayerI.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_CV_SYNTHESIS_LAYER_I_H
9#define META_OCEAN_CV_SYNTHESIS_LAYER_I_H
10
14
15namespace Ocean
16{
17
18namespace CV
19{
20
21namespace Synthesis
22{
23
24/**
25 * This class implements the base class for all synthesis layers with integer accuracy.
26 * @ingroup cvsynthesis
27 */
28class LayerI : public Layer
29{
30 public:
31
32 /**
33 * Returns the mapping of this synthesis layer.
34 * @return Synthesis mapping
35 */
36 virtual const MappingI& mapping() const = 0;
37
38 /**
39 * Returns the mapping of this synthesis layer.
40 * @return Synthesis mapping
41 */
42 virtual MappingI& mapping() = 0;
43
44 protected:
45
46 /**
47 * Creates an empty layer object.
48 */
49 inline LayerI();
50
51 /**
52 * Copy constructor.
53 * @param layer The layer to be copied
54 */
55 inline LayerI(const LayerI& layer);
56
57 /**
58 * Move constructor.
59 * @param layer The layer to be moved
60 */
61 inline LayerI(LayerI&& layer) noexcept;
62
63 /**
64 * Creates a new inpainting layer by a given frame and corresponding mask.
65 * @param frame Inpainting frame for this layer
66 * @param mask Inpainting mask of this layer
67 * @param boundingBox Optional inpainting bounding box covering all mask pixels, if defined
68 */
70
71 /**
72 * Assign operator.
73 * @param layer The layer to be copied
74 * @return The reference to this layer
75 */
76 inline LayerI& operator=(const LayerI& layer);
77
78 /**
79 * Move operator.
80 * @param layer The layer to be moved
81 * @return The reference to this layer
82 */
83 inline LayerI& operator=(LayerI&& layer) noexcept;
84};
85
87 Layer()
88{
89 // nothing to do here
90}
91
92inline LayerI::LayerI(const LayerI& layer) :
93 Layer(std::move(layer))
94{
95 // nothing to do here
96}
97
98inline LayerI::LayerI(LayerI&& layer) noexcept :
99 Layer(std::move(layer))
100{
101 // nothing to do here
102}
103
104inline LayerI::LayerI(Frame& frame, const Frame& mask, const PixelBoundingBox& boundingBox) :
105 Layer(frame, mask, boundingBox)
106{
107 // nothing to do here
108}
109
110inline LayerI& LayerI::operator=(const LayerI& layer)
111{
112 Layer::operator=(layer);
113 return *this;
114}
115
116inline LayerI& LayerI::operator=(LayerI&& layer) noexcept
117{
118 if (this != &layer)
119 {
120 Layer::operator=(std::move(layer));
121 }
122
123 return *this;
124}
125
126}
127
128}
129
130}
131
132#endif // META_OCEAN_CV_SYNTHESIS_LAYER_I_H
This class implements the base class for all inpainting layers.
Definition Layer.h:35
const Frame & mask() const
Returns the mask of this layer.
Definition Layer.h:184
Layer & operator=(const Layer &layer)
Assign operator.
const Frame & frame() const
Returns the frame of this layer.
Definition Layer.h:174
const PixelBoundingBox & boundingBox() const
Returns the optional bounding box of this layer.
Definition Layer.h:194
This class implements the base class for all synthesis layers with integer accuracy.
Definition LayerI.h:29
LayerI()
Creates an empty layer object.
Definition LayerI.h:86
virtual MappingI & mapping()=0
Returns the mapping of this synthesis layer.
LayerI & operator=(const LayerI &layer)
Assign operator.
Definition LayerI.h:110
virtual const MappingI & mapping() const =0
Returns the mapping of this synthesis layer.
This class implements a mapping with integer accuracy.
Definition MappingI.h:30
This class implements Ocean's image class.
Definition Frame.h:1808
PixelBoundingBoxT< unsigned int > PixelBoundingBox
Definition of the default PixelBoundingBox object with data type allowing only positive coordinate va...
Definition PixelBoundingBox.h:28
The namespace covering the entire Ocean framework.
Definition Accessor.h:15