HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImfTiledOutputPart.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2011, Industrial Light & Magic, a division of Lucas
4 // Digital Ltd. LLC
5 //
6 // All rights reserved.
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
11 // * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 // * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following disclaimer
15 // in the documentation and/or other materials provided with the
16 // distribution.
17 // * Neither the name of Industrial Light & Magic nor the names of
18 // its contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 //
33 ///////////////////////////////////////////////////////////////////////////
34 
35 #ifndef IMFTILEDOUTPUTPART_H_
36 #define IMFTILEDOUTPUTPART_H_
37 
38 #include "ImfMultiPartOutputFile.h"
39 #include "ImfTiledOutputFile.h"
40 #include "ImfForward.h"
41 #include "ImfExport.h"
42 #include "ImfNamespace.h"
43 
44 
46 
47 //-------------------------------------------------------------------------------
48 // class TiledOutputPart:
49 //
50 // Same interface as TiledOutputFile. Please have a reference to TiledOutputFile.
51 //-------------------------------------------------------------------------------
52 
54 {
55  public:
57  TiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber);
58 
60  const char * fileName () const;
62  const Header & header () const;
66  const FrameBuffer & frameBuffer () const;
68  unsigned int tileXSize () const;
70  unsigned int tileYSize () const;
72  LevelMode levelMode () const;
76  int numLevels () const;
78  int numXLevels () const;
80  int numYLevels () const;
82  bool isValidLevel (int lx, int ly) const;
84  int levelWidth (int lx) const;
86  int levelHeight (int ly) const;
88  int numXTiles (int lx = 0) const;
90  int numYTiles (int ly = 0) const;
94  IMATH_NAMESPACE::Box2i dataWindowForLevel (int lx, int ly) const;
97  int l = 0) const;
100  int lx, int ly) const;
101  IMF_EXPORT
102  void writeTile (int dx, int dy, int l = 0);
103  IMF_EXPORT
104  void writeTile (int dx, int dy, int lx, int ly);
105  IMF_EXPORT
106  void writeTiles (int dx1, int dx2, int dy1, int dy2,
107  int lx, int ly);
108  IMF_EXPORT
109  void writeTiles (int dx1, int dx2, int dy1, int dy2,
110  int l = 0);
111  IMF_EXPORT
112  void copyPixels (TiledInputFile &in);
113  IMF_EXPORT
114  void copyPixels (InputFile &in);
115  IMF_EXPORT
116  void copyPixels (TiledInputPart &in);
117  IMF_EXPORT
118  void copyPixels (InputPart &in);
119 
120 
121  IMF_EXPORT
122  void updatePreviewImage (const PreviewRgba newPixels[]);
123  IMF_EXPORT
124  void breakTile (int dx, int dy,
125  int lx, int ly,
126  int offset,
127  int length,
128  char c);
129 
130  private:
131  TiledOutputFile* file;
132 };
133 
135 
136 #endif /* IMFTILEDOUTPUTPART_H_ */
IMF_EXPORT int numYLevels() const
IMF_EXPORT int numYTiles(int ly=0) const
IMF_EXPORT LevelMode levelMode() const
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition: ImfNamespace.h:109
IMF_EXPORT void copyPixels(TiledInputFile &in)
IMF_EXPORT unsigned int tileYSize() const
IMF_EXPORT void setFrameBuffer(const FrameBuffer &frameBuffer)
const GLfloat * c
Definition: glew.h:16631
IMF_EXPORT void writeTile(int dx, int dy, int l=0)
IMF_EXPORT IMATH_NAMESPACE::Box2i dataWindowForLevel(int l=0) const
IMF_EXPORT int numXTiles(int lx=0) const
IMF_EXPORT void writeTiles(int dx1, int dx2, int dy1, int dy2, int lx, int ly)
IMF_EXPORT const FrameBuffer & frameBuffer() const
IMF_EXPORT int levelWidth(int lx) const
IMF_EXPORT const char * fileName() const
GLuint in
Definition: glew.h:11552
GLdouble l
Definition: glew.h:9164
IMF_EXPORT void breakTile(int dx, int dy, int lx, int ly, int offset, int length, char c)
IMF_EXPORT int levelHeight(int ly) const
Box< V2i > Box2i
Definition: ImathBox.h:133
IMF_EXPORT TiledOutputPart(MultiPartOutputFile &multiPartFile, int partNumber)
IMF_EXPORT bool isValidLevel(int lx, int ly) const
LevelRoundingMode
#define IMF_EXPORT
Definition: ImfExport.h:44
IMF_EXPORT void updatePreviewImage(const PreviewRgba newPixels[])
IMF_EXPORT int numXLevels() const
IMF_EXPORT int numLevels() const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition: ImfNamespace.h:108
IMF_EXPORT unsigned int tileXSize() const
IMF_EXPORT const Header & header() const
GLintptr offset
Definition: glcorearb.h:664
IMF_EXPORT LevelRoundingMode levelRoundingMode() const
IMF_EXPORT IMATH_NAMESPACE::Box2i dataWindowForTile(int dx, int dy, int l=0) const