HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ImfMultiPartInputFile.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 IMFMULTIPARTINPUTFILE_H_
7
#define IMFMULTIPARTINPUTFILE_H_
8
9
#include "
ImfForward.h
"
10
11
#include "
ImfThreading.h
"
12
13
#include "
ImfContext.h
"
14
15
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
16
17
/// \brief
18
///
19
/// TODO: Document this
20
class
IMF_EXPORT_TYPE
MultiPartInputFile
21
{
22
public
:
23
IMF_EXPORT
24
MultiPartInputFile
(
25
const
char
fileName[],
26
int
numThreads =
globalThreadCount
(),
27
bool
reconstructChunkOffsetTable =
true
);
28
29
IMF_EXPORT
30
MultiPartInputFile
(
31
IStream
& is,
32
int
numThreads =
globalThreadCount
(),
33
bool
reconstructChunkOffsetTable =
true
);
34
35
//-----------------------------------------------------------
36
// A constructor that opens the file with the specified name
37
// and context initialization routines
38
// Destroying the InputFile object will close the file.
39
//-----------------------------------------------------------
40
IMF_EXPORT
41
MultiPartInputFile
(
42
const
char
*
filename
,
43
const
ContextInitializer
& ctxtinit,
44
int
numThreads =
globalThreadCount
(),
45
bool
autoAddType =
true
);
46
47
//------------------------
48
// Access to the file name
49
//------------------------
50
51
IMF_EXPORT
52
const
char
* fileName ()
const
;
53
54
//----------------------------------
55
// Access to the file format version
56
//----------------------------------
57
58
IMF_EXPORT
59
int
version
()
const
;
60
61
// ----------------------
62
// Count of number of parts in file
63
// ---------------------
64
IMF_EXPORT
65
int
parts ()
const
;
66
67
//----------------------
68
// Access to the headers
69
//----------------------
70
71
IMF_EXPORT
72
const
Header
& header (
int
partNumber)
const
;
73
74
// =----------------------------------------
75
// Check whether the entire chunk offset
76
// table for the part is written correctly
77
// -----------------------------------------
78
IMF_EXPORT
79
bool
partComplete (
int
partNumber)
const
;
80
81
// ----------------------------------------
82
// Flush internal part cache
83
// Invalidates all 'Part' types previously
84
// constructed from this file
85
// Intended for test purposes, but can be
86
// used to temporarily reduce memory overhead,
87
// or to switch between types (e.g. TiledInputPart
88
// or DeepScanLineInputPart to InputPart)
89
// ----------------------------------------
90
91
IMF_EXPORT
92
void
flushPartCache ();
93
94
private
:
95
Context
_ctxt;
96
struct
Data;
97
std::shared_ptr<Data> _data;
98
99
//
100
// used internally by 'Part' types to access individual parts of the multipart file
101
//
102
// TODO: change these to value / reference semantics (smart ptr)
103
template
<
class
T>
IMF_HIDDEN
T
* getInputPart (
int
partNumber);
104
IMF_HIDDEN
InputPartData* getPart (
int
)
const
;
105
106
IMF_HIDDEN
void
initialize
();
107
108
friend
class
InputPart
;
109
friend
class
ScanLineInputPart;
110
friend
class
TiledInputPart
;
111
friend
class
DeepScanLineInputPart
;
112
friend
class
DeepTiledInputPart
;
113
114
//
115
// For backward compatibility.
116
//
117
118
friend
class
InputFile
;
119
friend
class
TiledInputFile
;
120
friend
class
ScanLineInputFile
;
121
friend
class
DeepScanLineInputFile
;
122
friend
class
DeepTiledInputFile
;
123
};
124
125
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
126
127
#endif
/* IMFMULTIPARTINPUTFILE_H_ */
IStream
Definition:
ImfIO.h:26
GT_Names::filename
GT_API const UT_StringHolder filename
DeepScanLineInputFile
Definition:
ImfDeepScanLineInputFile.h:25
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition:
ImfNamespace.h:83
ImfThreading.h
MultiPartInputFile
class IMF_EXPORT_TYPE MultiPartInputFile
Definition:
ImfForward.h:51
TiledInputPart
Definition:
ImfTiledInputPart.h:22
TiledInputFile
Definition:
ImfTiledInputFile.h:26
ImfContext.h
DeepScanLineInputPart
Definition:
ImfDeepScanLineInputPart.h:15
DeepTiledInputPart
Definition:
ImfDeepTiledInputPart.h:18
InputFile
Provides generic access to read an image from an EXR file.
Definition:
ImfInputFile.h:64
IMF_HIDDEN
#define IMF_HIDDEN
Definition:
ImfExport.h:55
DeepTiledInputFile
Definition:
ImfDeepTiledInputFile.h:27
ContextInitializer
ContextInitializer provides a basic type to initialize a Context with.
Definition:
ImfContextInit.h:20
MultiPartInputFile
TODO: Document this.
Definition:
ImfMultiPartInputFile.h:20
InputPart
Definition:
ImfInputPart.h:19
IMF_EXPORT
#define IMF_EXPORT
Definition:
ImfExport.h:54
openvdb::OPENVDB_VERSION_NAME::initialize
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
Definition:
logging.h:294
ImfForward.h
OBJ_MatchTransform::T
GT_Names::version
GT_API const UT_StringHolder version
globalThreadCount
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT int globalThreadCount()
Context
Context provides a wrapper around the Core library context object.
Definition:
ImfContext.h:30
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition:
ImfNamespace.h:80
Header
Definition:
ImfHeader.h:36
ScanLineInputFile
class IMF_EXPORT_TYPE ScanLineInputFile
Definition:
ImfForward.h:35
IMF_EXPORT_TYPE
#define IMF_EXPORT_TYPE
Definition:
ImfExport.h:57
OpenEXR
ImfMultiPartInputFile.h
Generated on Wed Aug 27 2025 03:06:53 for HDK by
1.8.6