Ocean
LayerI1.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_1_H
9 #define META_OCEAN_CV_SYNTHESIS_LAYER_I_1_H
10 
14 
15 #include <vector>
16 
17 namespace Ocean
18 {
19 
20 namespace CV
21 {
22 
23 namespace Synthesis
24 {
25 
26 // Forward declaration.
27 class LayerI1;
28 
29 /**
30  * Definition of a vector holding one-frame pixel layer objects.
31  * @see LayerI1.
32  * @ingroup cvsynthesis
33  */
34 typedef std::vector<LayerI1> LayersI1;
35 
36 /**
37  * This class implements a single layer for pixel synthesis within one frame and pixel accuracy.
38  * @ingroup cvsynthesis
39  */
40 class OCEAN_CV_SYNTHESIS_EXPORT LayerI1 : public LayerI
41 {
42  public:
43 
44  /**
45  * Creates an empty pixel layer.
46  */
48 
49  /**
50  * Copy constructor.
51  * @param layer The layer to be copied
52  */
53  LayerI1(const LayerI1& layer);
54 
55  /**
56  * Move constructor.
57  * @param layer The layer to be moved
58  */
59  LayerI1(LayerI1&& layer) noexcept;
60 
61  /**
62  * Creates a new pixel layer for a given frame and inpainting mask.
63  * @param frame Inpainting frame
64  * @param mask Inpainting mask with same frame type as the given inpainting frame
65  * @param boundingBox Optional inpainting bounding box to speed up the process
66  */
67  LayerI1(Frame& frame, const Frame& mask, const PixelBoundingBox& boundingBox = PixelBoundingBox());
68 
69  /**
70  * Returns the mapping of this synthesis layer.
71  * @see Layer::mapping().
72  */
73  MappingI1& mapping() override;
74 
75  /**
76  * Returns the mapping of this layer.
77  * @see Layer::mapping().
78  */
79  const MappingI1& mapping() const override;
80 
81  /**
82  * Returns the mapping of this layer.
83  * @return Layer mapping
84  */
85  inline const MappingI1& mappingI1() const;
86 
87  /**
88  * Returns the mapping of this layer.
89  * @return Layer mapping
90  */
91  inline MappingI1& mappingI1();
92 
93  /**
94  * Assign operator.
95  * @param layer The layer to be copied
96  * @return The reference to this layer
97  */
98  LayerI1& operator=(const LayerI1& layer);
99 
100  /**
101  * Move operator.
102  * @param layer The layer to be moved
103  * @return The reference to this layer
104  */
105  LayerI1& operator=(LayerI1&& layer) noexcept;
106 
107  private:
108 
109  /// Pixel mapping associated with this synthesis layer.
111 };
112 
113 inline const MappingI1& LayerI1::mappingI1() const
114 {
115  return mapping_;
116 }
117 
119 {
120  return mapping_;
121 }
122 
123 }
124 
125 }
126 
127 }
128 
129 #endif // META_OCEAN_CV_SYNTHESIS_LAYER_I_1_H
This class implements a single layer for pixel synthesis within one frame and pixel accuracy.
Definition: LayerI1.h:41
MappingI1 & mapping() override
Returns the mapping of this synthesis layer.
const MappingI1 & mapping() const override
Returns the mapping of this layer.
LayerI1(const LayerI1 &layer)
Copy constructor.
LayerI1()
Creates an empty pixel layer.
LayerI1 & operator=(const LayerI1 &layer)
Assign operator.
LayerI1(Frame &frame, const Frame &mask, const PixelBoundingBox &boundingBox=PixelBoundingBox())
Creates a new pixel layer for a given frame and inpainting mask.
LayerI1 & operator=(LayerI1 &&layer) noexcept
Move operator.
MappingI1 mapping_
Pixel mapping associated with this synthesis layer.
Definition: LayerI1.h:110
LayerI1(LayerI1 &&layer) noexcept
Move constructor.
const MappingI1 & mappingI1() const
Returns the mapping of this layer.
Definition: LayerI1.h:113
This class implements the base class for all synthesis layers with integer accuracy.
Definition: LayerI.h:29
This class implements the pixel mapping between source and target frames.
Definition: MappingI1.h:49
This class implements Ocean's image class.
Definition: Frame.h:1760
PixelBoundingBoxT< unsigned int > PixelBoundingBox
Definition of the default PixelBoundingBox object with data type allowing only positive coordinate va...
Definition: PixelBoundingBox.h:21
std::vector< LayerI1 > LayersI1
Definition of a vector holding one-frame pixel layer objects.
Definition: LayerI1.h:27
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15