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 
36 #include "ImfDeepTiledInputPart.h"
37 #include "ImfMultiPartInputFile.h"
38 #include "ImfNamespace.h"
39 
40 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
41 
DeepTiledInputPart(MultiPartInputFile & multiPartFile,int partNumber)42 DeepTiledInputPart::DeepTiledInputPart(MultiPartInputFile& multiPartFile, int partNumber)
43 {
44     file = multiPartFile.getInputPart<DeepTiledInputFile>(partNumber);
45 }
46 
47 
48 const char *
fileName() const49 DeepTiledInputPart::fileName () const
50 {
51     return file->fileName();
52 }
53 
54 
55 const Header &
header() const56 DeepTiledInputPart::header () const
57 {
58     return file->header();
59 }
60 
61 
62 int
version() const63 DeepTiledInputPart::version () const
64 {
65     return file->version();
66 }
67 
68 
69 void
setFrameBuffer(const DeepFrameBuffer & frameBuffer)70 DeepTiledInputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer)
71 {
72     file->setFrameBuffer(frameBuffer);
73 }
74 
75 
76 const DeepFrameBuffer &
frameBuffer() const77 DeepTiledInputPart::frameBuffer () const
78 {
79     return file->frameBuffer();
80 }
81 
82 
83 bool
isComplete() const84 DeepTiledInputPart::isComplete () const
85 {
86     return file->isComplete();
87 }
88 
89 
90 unsigned int
tileXSize() const91 DeepTiledInputPart::tileXSize () const
92 {
93     return file->isComplete();
94 }
95 
96 
97 unsigned int
tileYSize() const98 DeepTiledInputPart::tileYSize () const
99 {
100     return file->tileYSize();
101 }
102 
103 
104 LevelMode
levelMode() const105 DeepTiledInputPart::levelMode () const
106 {
107     return file->levelMode();
108 }
109 
110 
111 LevelRoundingMode
levelRoundingMode() const112 DeepTiledInputPart::levelRoundingMode () const
113 {
114     return file->levelRoundingMode();
115 }
116 
117 
118 int
numLevels() const119 DeepTiledInputPart::numLevels () const
120 {
121     return file->numLevels();
122 }
123 
124 
125 int
numXLevels() const126 DeepTiledInputPart::numXLevels () const
127 {
128     return file->numXLevels();
129 }
130 
131 
132 int
numYLevels() const133 DeepTiledInputPart::numYLevels () const
134 {
135     return file->numYLevels();
136 }
137 
138 
139 bool
isValidLevel(int lx,int ly) const140 DeepTiledInputPart::isValidLevel (int lx, int ly) const
141 {
142     return file->isValidLevel(lx, ly);
143 }
144 
145 
146 int
levelWidth(int lx) const147 DeepTiledInputPart::levelWidth  (int lx) const
148 {
149     return file->levelWidth(lx);
150 }
151 
152 
153 int
levelHeight(int ly) const154 DeepTiledInputPart::levelHeight (int ly) const
155 {
156     return file->levelHeight(ly);
157 }
158 
159 
160 int
numXTiles(int lx) const161 DeepTiledInputPart::numXTiles (int lx) const
162 {
163     return file->numXTiles(lx);
164 }
165 
166 
167 int
numYTiles(int ly) const168 DeepTiledInputPart::numYTiles (int ly) const
169 {
170     return file->numYTiles(ly);
171 }
172 
173 
174 IMATH_NAMESPACE::Box2i
dataWindowForLevel(int l) const175 DeepTiledInputPart::dataWindowForLevel (int l) const
176 {
177     return file->dataWindowForLevel(l);
178 }
179 
180 IMATH_NAMESPACE::Box2i
dataWindowForLevel(int lx,int ly) const181 DeepTiledInputPart::dataWindowForLevel (int lx, int ly) const
182 {
183     return file->dataWindowForLevel(lx, ly);
184 }
185 
186 
187 IMATH_NAMESPACE::Box2i
dataWindowForTile(int dx,int dy,int l) const188 DeepTiledInputPart::dataWindowForTile (int dx, int dy, int l) const
189 {
190     return file->dataWindowForTile(dx, dy, l);
191 }
192 
193 
194 IMATH_NAMESPACE::Box2i
dataWindowForTile(int dx,int dy,int lx,int ly) const195 DeepTiledInputPart::dataWindowForTile (int dx, int dy,
196                                        int lx, int ly) const
197 {
198     return file->dataWindowForTile(dx, dy, lx, ly);
199 }
200 
201 
202 void
readTile(int dx,int dy,int l)203 DeepTiledInputPart::readTile  (int dx, int dy, int l)
204 {
205     file->readTile(dx, dy, l);
206 }
207 
208 
209 void
readTile(int dx,int dy,int lx,int ly)210 DeepTiledInputPart::readTile  (int dx, int dy, int lx, int ly)
211 {
212     file->readTile(dx, dy, lx, ly);
213 }
214 
215 
216 void
readTiles(int dx1,int dx2,int dy1,int dy2,int lx,int ly)217 DeepTiledInputPart::readTiles (int dx1, int dx2, int dy1, int dy2,
218                                int lx, int ly)
219 {
220     file->readTiles(dx1, dx2, dy1, dy2, lx, ly);
221 }
222 
223 
224 void
readTiles(int dx1,int dx2,int dy1,int dy2,int l)225 DeepTiledInputPart::readTiles (int dx1, int dx2, int dy1, int dy2,
226                                int l)
227 {
228     file->readTiles(dx1, dx2, dy1, dy2, l);
229 }
230 
231 
232 void
rawTileData(int & dx,int & dy,int & lx,int & ly,char * pixelData,Int64 & dataSize) const233 DeepTiledInputPart::rawTileData (int &dx, int &dy,
234                                  int &lx, int &ly,
235                                  char * pixelData,
236                                  Int64 & dataSize) const
237 {
238     file->rawTileData(dx, dy, lx, ly, pixelData, dataSize );
239 }
240 
241 
242 void
readPixelSampleCount(int dx,int dy,int l)243 DeepTiledInputPart::readPixelSampleCount  (int dx, int dy, int l)
244 {
245     file->readPixelSampleCount(dx, dy, l);
246 }
247 
248 
249 void
readPixelSampleCount(int dx,int dy,int lx,int ly)250 DeepTiledInputPart::readPixelSampleCount  (int dx, int dy, int lx, int ly)
251 {
252     file->readPixelSampleCount(dx, dy, lx, ly);
253 }
254 
255 
256 void
readPixelSampleCounts(int dx1,int dx2,int dy1,int dy2,int lx,int ly)257 DeepTiledInputPart::readPixelSampleCounts (int dx1, int dx2,
258                                           int dy1, int dy2,
259                                           int lx, int ly)
260 {
261     file->readPixelSampleCounts(dx1, dx2, dy1, dy2, lx, ly);
262 }
263 
264 void
readPixelSampleCounts(int dx1,int dx2,int dy1,int dy2,int l)265 DeepTiledInputPart::readPixelSampleCounts (int dx1, int dx2,
266                                           int dy1, int dy2,
267                                           int l)
268 {
269     file->readPixelSampleCounts(dx1, dx2, dy1, dy2, l);
270 }
271 
272 
273 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT
274