HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImfMultiPartOutputFile.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright (c) Contributors to the OpenEXR Project.
4 //
5 
6 #ifndef MULTIPARTOUTPUTFILE_H_
7 #define MULTIPARTOUTPUTFILE_H_
8 
9 #include "ImfForward.h"
10 
11 #include "ImfGenericOutputFile.h"
12 #include "ImfThreading.h"
13 
15 
16 
17 //
18 // Class responsible for handling the writing of multipart images.
19 //
20 // Note: Certain attributes are 'common' to all parts. Notably:
21 // * Display Window
22 // * Pixel Aspect Ratio
23 // * Time Code
24 // * Chromaticities
25 // The first header forms the basis for the set of attributes that are shared
26 // across the constituent parts.
27 //
28 // Parameters
29 // headers - pointer to array of headers; one for each part of the image file
30 // parts - count of number of parts
31 // overrideSharedAttributes - toggle for the handling of shared attributes.
32 // set false to check for inconsistencies, true
33 // to copy the values over from the first header.
34 // numThreads - number of threads that should be used in encoding the data.
35 //
36 
38 {
39  public:
41  MultiPartOutputFile(const char fileName[],
42  const Header * headers,
43  int parts,
44  bool overrideSharedAttributes = false,
45  int numThreads = globalThreadCount());
46 
49  const Header * headers,
50  int parts,
51  bool overrideSharedAttributes = false,
52  int numThreads = globalThreadCount());
53 
54  //
55  // return number of parts in file
56  //
58  int parts() const;
59 
60  //
61  // return header for part n
62  // (note: may have additional attributes compared to that passed to constructor)
63  //
65  const Header & header(int n) const;
66 
68  ~MultiPartOutputFile();
69 
70  MultiPartOutputFile(const MultiPartOutputFile& other) = delete;
71  MultiPartOutputFile& operator = (const MultiPartOutputFile& other) = delete;
72  MultiPartOutputFile(MultiPartOutputFile&& other) = delete;
73  MultiPartOutputFile& operator = (MultiPartOutputFile&& other) = delete;
74 
75  struct IMF_HIDDEN Data;
76 
77  private:
78  Data* _data;
79 
80  template<class T> IMF_HIDDEN T* getOutputPart(int partNumber);
81 
82 
83  friend class OutputPart;
84  friend class TiledOutputPart;
85  friend class DeepScanLineOutputPart;
86  friend class DeepTiledOutputPart;
87 };
88 
89 
91 
92 #endif /* MULTIPARTOUTPUTFILE_H_ */
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:80
#define IMF_HIDDEN
Definition: ImfExport.h:55
Definition: ImfIO.h:125
GLdouble n
Definition: glcorearb.h:2008
class IMF_EXPORT_TYPE MultiPartOutputFile
Definition: ImfForward.h:53
#define IMF_EXPORT
Definition: ImfExport.h:54
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT int globalThreadCount()
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:79
#define IMF_EXPORT_TYPE
Definition: ImfExport.h:57