Ocean
InitializerSubset.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_SUBSET_H
9 #define META_OCEAN_CV_SYNTHESIS_INITIALIZER_SUBSET_H
10 
14 
15 namespace Ocean
16 {
17 
18 namespace CV
19 {
20 
21 namespace Synthesis
22 {
23 
24 /**
25  * This class is the base class for all initializer objects that can separate the initialization process into individual subsets (of the mapping area).
26  * @ingroup cvsynthesis
27  */
28 class OCEAN_CV_SYNTHESIS_EXPORT InitializerSubset : virtual public Initializer
29 {
30  public:
31 
32  /**
33  * Creates a new initializer object.
34  * @param layer The layer for that the initial mapping has to be provided
35  */
36  inline InitializerSubset(Layer& layer);
37 
38  /**
39  * Invokes the initialization process.
40  * @see Initializer::invoke().
41  */
42  bool invoke(Worker* worker = nullptr) const override;
43 
44  protected:
45 
46  /**
47  * Initializes a subset of the entire mapping area.
48  * This function has to be implemented in derived classes that support a subset initialization process.<br>
49  * @param firstColumn First column of the mapping area to be initialized
50  * @param numberColumns Number of columns of the mapping area to be handled
51  * @param firstRow First row of the mapping area to be initialized
52  * @param numberRows Number of rows of the mapping area to be handled
53  */
54  virtual void initializeSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const = 0;
55 };
56 
58  Initializer(layer)
59 {
60  // nothing to do here
61 }
62 
63 }
64 
65 }
66 
67 }
68 
69 #endif // META_OCEAN_CV_SYNTHESIS_INITIALIZER_SUBSET_H
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
InitializerSubset(Layer &layer)
Creates a new initializer object.
Definition: InitializerSubset.h:57
virtual void initializeSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const =0
Initializes a subset of the entire mapping area.
bool invoke(Worker *worker=nullptr) const override
Invokes the initialization process.
This class implements the base class for all inpainting layers.
Definition: Layer.h:35
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15