Ocean
InitializerConvertMappingF1.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_INITIALIZER_CONVERT_MAPPING_F_1_H
9 #define META_OCEAN_CV_SYNTHESIS_INITIALIZER_CONVERT_MAPPING_F_1_H
10 
17 
18 namespace Ocean
19 {
20 
21 namespace CV
22 {
23 
24 namespace Synthesis
25 {
26 
27 /**
28  * This class implements an initializer that converts the mapping of a layer with integer mapping to a layer with float mapping.
29  * @ingroup cvsynthesis
30  */
31 class OCEAN_CV_SYNTHESIS_EXPORT InitializerConvertMappingF1 :
32  virtual public InitializerF,
33  virtual public InitializerSubset,
34  virtual public Initializer1
35 {
36  public:
37 
38  /**
39  * Creates a new initializer object.
40  * @param layer The layer for that the initial mapping has to be provided
41  * @param sourceLayer Layer with existing mapping that will be converted (must have the same dimension as the layer that receives the mapping)
42  */
43  inline InitializerConvertMappingF1(LayerF1& layer, const LayerI1& sourceLayer);
44 
45  /**
46  * Creates a new initializer object.
47  * @param layer The layer for that the initial mapping has to be provided
48  * @param sourceMapping Existing mapping that will be converted (must have the same dimension as the layer that receives the mapping)
49  */
50  inline InitializerConvertMappingF1(LayerF1& layer, const MappingI1& sourceMapping);
51 
52  private:
53 
54  /**
55  * Initializes a subset of the entire mapping area.
56  * @see InitializerSubset::initializeSubset().
57  */
58  void initializeSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const override;
59 
60  private:
61 
62  /// Source mapping that will be converted.
64 };
65 
67  Initializer(layer),
68  InitializerF(layer),
69  InitializerSubset(layer),
70  Initializer1(layer),
71  sourceMapping_(sourceLayer.mapping())
72 {
73  // nothing to do here
74 }
75 
77  Initializer(layer),
78  InitializerF(layer),
79  InitializerSubset(layer),
80  Initializer1(layer),
81  sourceMapping_(mapping)
82 {
83  // nothing to do here
84 }
85 
86 }
87 
88 }
89 
90 }
91 
92 #endif // META_OCEAN_CV_SYNTHESIS_INITIALIZER_CONVERT_MAPPING_F_1_H
This class is the base class for all initializers that are provided for a single frame only.
Definition: Initializer1.h:29
This class implements an initializer that converts the mapping of a layer with integer mapping to a l...
Definition: InitializerConvertMappingF1.h:35
const MappingI1 & sourceMapping_
Source mapping that will be converted.
Definition: InitializerConvertMappingF1.h:63
void initializeSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const override
Initializes a subset of the entire mapping area.
InitializerConvertMappingF1(LayerF1 &layer, const LayerI1 &sourceLayer)
Creates a new initializer object.
Definition: InitializerConvertMappingF1.h:66
This class implements the base class for all initializer objects that are applied for mappings with f...
Definition: InitializerF.h:30
This class implements the base class for all synthesis initializers.
Definition: Initializer.h:34
This class is the base class for all initializer objects that can separate the initialization process...
Definition: InitializerSubset.h:29
This class implements a single layer for pixel synthesis within one frame and sub-pixel accuracy.
Definition: LayerF1.h:44
This class implements a single layer for pixel synthesis within one frame and pixel accuracy.
Definition: LayerI1.h:41
This class implements the pixel mapping between source and target frames.
Definition: MappingI1.h:49
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15