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 // Class responsible for handling the writing of multipart images.
18 //
19 // Note: Certain attributes are 'common' to all parts. Notably:
20 // * Display Window
21 // * Pixel Aspect Ratio
22 // * Time Code
23 // * Chromaticities
24 // The first header forms the basis for the set of attributes that are shared
25 // across the constituent parts.
26 //
27 // Parameters
28 // headers - pointer to array of headers; one for each part of the image file
29 // parts - count of number of parts
30 // overrideSharedAttributes - toggle for the handling of shared attributes.
31 // set false to check for inconsistencies, true
32 // to copy the values over from the first header.
33 // numThreads - number of threads that should be used in encoding the data.
34 //
35 
37 {
38 public:
41  const char fileName[],
42  const Header* headers,
43  int parts,
44  bool overrideSharedAttributes = false,
45  int numThreads = globalThreadCount ());
46 
49  OStream& os,
50  const Header* headers,
51  int parts,
52  bool overrideSharedAttributes = false,
53  int numThreads = globalThreadCount ());
54 
55  //
56  // return number of parts in file
57  //
59  int parts () const;
60 
61  //
62  // return header for part n
63  // (note: may have additional attributes compared to that passed to constructor)
64  //
66  const Header& header (int n) const;
67 
69  ~MultiPartOutputFile ();
70 
71  MultiPartOutputFile (const MultiPartOutputFile& other) = delete;
72  MultiPartOutputFile& operator= (const MultiPartOutputFile& other) = delete;
73  MultiPartOutputFile (MultiPartOutputFile&& other) = delete;
74  MultiPartOutputFile& operator= (MultiPartOutputFile&& other) = delete;
75 
76  struct IMF_HIDDEN Data;
77 
78 private:
79  Data* _data;
80 
81  template <class T> IMF_HIDDEN T* getOutputPart (int partNumber);
82 
83  friend class OutputPart;
84  friend class TiledOutputPart;
85  friend class DeepScanLineOutputPart;
86  friend class DeepTiledOutputPart;
87 };
88 
90 
91 #endif /* MULTIPARTOUTPUTFILE_H_ */
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:83
#define IMF_HIDDEN
Definition: ImfExport.h:55
Definition: ImfIO.h:114
GLdouble n
Definition: glcorearb.h:2008
class IMF_EXPORT_TYPE MultiPartOutputFile
Definition: ImfForward.h:52
#define IMF_EXPORT
Definition: ImfExport.h:54
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT int globalThreadCount()
LeafData & operator=(const LeafData &)=delete
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:80
#define IMF_EXPORT_TYPE
Definition: ImfExport.h:57