NTrace
GPU ray tracing framework
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
ImageBinaryIO.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009-2011, NVIDIA Corporation
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
* * Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* * Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
* * Neither the name of NVIDIA Corporation nor the
13
* names of its contributors may be used to endorse or promote products
14
* derived from this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
20
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#pragma once
29
#include "
base/Defs.hpp
"
30
31
namespace
FW
32
{
33
//------------------------------------------------------------------------
34
35
class
Image;
36
class
InputStream;
37
class
OutputStream;
38
39
//------------------------------------------------------------------------
40
41
Image*
importBinaryImage
(InputStream& stream);
42
void
exportBinaryImage
(OutputStream& stream,
const
Image*
image
);
43
44
//------------------------------------------------------------------------
45
/*
46
47
Binary image file format v1
48
---------------------------
49
50
- the basic units of data are 32-bit little-endian ints and floats
51
52
BinaryImage
53
0 7 struct ImageHeader
54
3 n*6 struct array of ImageChannel (ImageHeader.numChannels)
55
? ? struct image data (ImageHeader.width * ImageHeader.height * ImageHeader.bpp)
56
?
57
58
ImageHeader
59
0 2 bytes formatID (must be "BinImage")
60
2 1 int formatVersion (must be 1)
61
3 1 int width
62
4 1 int height
63
5 1 int bpp
64
6 1 int numChannels
65
7
66
67
ImageChannel
68
0 1 int type (see ImageFormat::ChannelType)
69
1 1 int format (see ImageFormat::ChannelFormat)
70
2 1 int wordOfs
71
3 1 int wordSize
72
4 1 int fieldOfs
73
5 1 int fieldSize
74
6
75
76
*/
77
//------------------------------------------------------------------------
78
}
FW::importBinaryImage
Image * importBinaryImage(InputStream &stream)
Definition:
ImageBinaryIO.cpp:36
Defs.hpp
FW::exportBinaryImage
void exportBinaryImage(OutputStream &stream, const Image *image)
Definition:
ImageBinaryIO.cpp:110
image
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void * image
Definition:
DLLImports.inl:60
src
framework
io
ImageBinaryIO.hpp
Generated on Wed Dec 10 2014 14:36:49 for NTrace by
1.8.6