/src/freeimage-svn/FreeImage/trunk/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /////////////////////////////////////////////////////////////////////////// |
2 | | // |
3 | | // Copyright (c) 2004, 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 "ImfDeepScanLineInputPart.h" |
37 | | #include "ImfNamespace.h" |
38 | | |
39 | | OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER |
40 | | |
41 | | DeepScanLineInputPart::DeepScanLineInputPart(MultiPartInputFile& multiPartFile, int partNumber) |
42 | 0 | { |
43 | 0 | file = multiPartFile.getInputPart<DeepScanLineInputFile>(partNumber); |
44 | 0 | } |
45 | | |
46 | | |
47 | | const char * |
48 | | DeepScanLineInputPart::fileName () const |
49 | 0 | { |
50 | 0 | return file->fileName(); |
51 | 0 | } |
52 | | |
53 | | |
54 | | const Header & |
55 | | DeepScanLineInputPart::header () const |
56 | 0 | { |
57 | 0 | return file->header(); |
58 | 0 | } |
59 | | |
60 | | |
61 | | int |
62 | | DeepScanLineInputPart::version () const |
63 | 0 | { |
64 | 0 | return file->version(); |
65 | 0 | } |
66 | | |
67 | | |
68 | | void |
69 | | DeepScanLineInputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer) |
70 | 0 | { |
71 | 0 | file->setFrameBuffer(frameBuffer); |
72 | 0 | } |
73 | | |
74 | | |
75 | | const DeepFrameBuffer & |
76 | | DeepScanLineInputPart::frameBuffer () const |
77 | 0 | { |
78 | 0 | return file->frameBuffer(); |
79 | 0 | } |
80 | | |
81 | | |
82 | | bool |
83 | | DeepScanLineInputPart::isComplete () const |
84 | 0 | { |
85 | 0 | return file->isComplete(); |
86 | 0 | } |
87 | | |
88 | | |
89 | | void |
90 | | DeepScanLineInputPart::readPixels (int scanLine1, int scanLine2) |
91 | 0 | { |
92 | 0 | file->readPixels(scanLine1, scanLine2); |
93 | 0 | } |
94 | | |
95 | | |
96 | | void |
97 | | DeepScanLineInputPart::readPixels (int scanLine) |
98 | 0 | { |
99 | 0 | file->readPixels(scanLine); |
100 | 0 | } |
101 | | |
102 | | |
103 | | void |
104 | | DeepScanLineInputPart::rawPixelData (int firstScanLine, |
105 | | char *pixelData, |
106 | | Int64 &pixelDataSize) |
107 | 0 | { |
108 | 0 | file->rawPixelData(firstScanLine, pixelData, pixelDataSize); |
109 | 0 | } |
110 | | |
111 | | |
112 | | void |
113 | | DeepScanLineInputPart::readPixelSampleCounts(int scanline1, |
114 | | int scanline2) |
115 | 0 | { |
116 | 0 | file->readPixelSampleCounts(scanline1, scanline2); |
117 | 0 | } |
118 | | |
119 | | |
120 | | void |
121 | | DeepScanLineInputPart::readPixelSampleCounts(int scanline) |
122 | 0 | { |
123 | 0 | file->readPixelSampleCounts(scanline); |
124 | 0 | } |
125 | | |
126 | | int |
127 | | DeepScanLineInputPart::firstScanLineInChunk(int y) const |
128 | 0 | { |
129 | 0 | return file->firstScanLineInChunk(y); |
130 | 0 | } |
131 | | |
132 | | int |
133 | | DeepScanLineInputPart::lastScanLineInChunk(int y) const |
134 | 0 | { |
135 | 0 | return file->lastScanLineInChunk(y); |
136 | 0 | } |
137 | | |
138 | | void |
139 | | DeepScanLineInputPart::readPixels(const char* rawPixelData, const DeepFrameBuffer& frameBuffer, int scanLine1, int scanLine2) const |
140 | 0 | { |
141 | 0 | return file->readPixels(rawPixelData,frameBuffer,scanLine1,scanLine2); |
142 | 0 | } |
143 | | void |
144 | | DeepScanLineInputPart::readPixelSampleCounts(const char* rawdata, const DeepFrameBuffer& frameBuffer, int scanLine1, int scanLine2) const |
145 | 0 | { |
146 | 0 | return file->readPixelSampleCounts(rawdata,frameBuffer,scanLine1,scanLine2); |
147 | 0 | } |
148 | | |
149 | | OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT |