HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImfTiledInputPart.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 IMFTILEDINPUTPART_H_
7 #define IMFTILEDINPUTPART_H_
8 
9 #include "ImfForward.h"
10 
11 #include "ImfTileDescription.h"
12 #include <ImathBox.h>
13 
15 
16 //-----------------------------------------------------------------------------
17 // class TiledInputPart:
18 //
19 // Same interface as TiledInputFile. Please have a reference to TiledInputFile.
20 //-----------------------------------------------------------------------------
21 
23 {
24 public:
26  TiledInputPart (MultiPartInputFile& multiPartFile, int partNumber);
27 
29  const char* fileName () const;
31  const Header& header () const;
33  int version () const;
35  void setFrameBuffer (const FrameBuffer& frameBuffer);
37  const FrameBuffer& frameBuffer () const;
39  bool isComplete () const;
41  unsigned int tileXSize () const;
43  unsigned int tileYSize () const;
45  LevelMode levelMode () const;
47  LevelRoundingMode levelRoundingMode () const;
49  int numLevels () const;
51  int numXLevels () const;
53  int numYLevels () const;
55  bool isValidLevel (int lx, int ly) const;
57  int levelWidth (int lx) const;
59  int levelHeight (int ly) const;
61  int numXTiles (int lx = 0) const;
63  int numYTiles (int ly = 0) const;
65  IMATH_NAMESPACE::Box2i dataWindowForLevel (int l = 0) const;
67  IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const;
69  IMATH_NAMESPACE::Box2i dataWindowForTile (int dx, int dy, int l = 0) const;
72  dataWindowForTile (int dx, int dy, int lx, int ly) const;
74  void readTile (int dx, int dy, int l = 0);
76  void readTile (int dx, int dy, int lx, int ly);
78  void readTiles (int dx1, int dx2, int dy1, int dy2, int lx, int ly);
80  void readTiles (int dx1, int dx2, int dy1, int dy2, int l = 0);
82  void rawTileData (
83  int& dx,
84  int& dy,
85  int& lx,
86  int& ly,
87  const char*& pixelData,
88  int& pixelDataSize);
89 
90 private:
91  TiledInputFile* file;
92  // for internal use - allow TiledOutputFile access to file for copyPixels
93  friend class TiledOutputFile;
94 };
95 
97 
98 #endif /* IMFTILEDINPUTPART_H_ */
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:83
enum IMF_EXPORT_ENUM LevelRoundingMode
Box< V2i > Box2i
2D box of base type int.
Definition: ImathBox.h:143
#define IMF_EXPORT
Definition: ImfExport.h:54
GT_API const UT_StringHolder version
class IMF_EXPORT_TYPE TiledInputPart
Definition: ImfForward.h:44
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:80
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER enum IMF_EXPORT_ENUM LevelMode
#define IMF_EXPORT_TYPE
Definition: ImfExport.h:57