1vpStoreRawVolume(3) Library Functions Manual vpStoreRawVolume(3)
2
3
4
6 vpStoreRawVolume, vpStoreMinMaxOctree, vpStoreClassifiedVolume,
7 vpStoreContext - store volume data structures to a file
8
10 #include <volpack.h>
11
12 vpResult
13 vpStoreRawVolume(vpc, fd)
14 vpContext *vpc;
15 int fd;
16
17 vpResult
18 vpStoreMinMaxOctree(vpc, fd)
19 vpContext *vpc;
20 int fd;
21
22 vpResult
23 vpStoreClassifiedVolume(vpc, fd)
24 vpContext *vpc;
25 int fd;
26
27 vpResult
28 vpStoreContext(vpc, fd)
29 vpContext *vpc;
30 int fd;
31
33 vpc VolPack context from vpCreateContext.
34
35 fd File descriptor from open(2), open for writing.
36
38 These functions are used to store volume data structures from a renderā
39 ing context into files in the format read by the VolPack file reading
40 routines (see vpLoadRawVolume(3)).
41
42 vpStoreRawVolume creates a 3D voxel array file. The file includes
43 information about the size of the volume and the layout of the voxels
44 as well as the volume data itself.
45
46 vpStoreMinMaxOctree creates a min-max octree file. The file includes
47 information about the size of the volume and the layout of the voxels
48 as well as the octree itself.
49
50 vpStoreClassifiedVolume creates a preclassified volume data file. The
51 file includes information about the size of the volume and the layout
52 of the voxels as well as the volume data itself.
53
54 vpStoreContext creates a rendering context file. The file includes all
55 rendering parameters except volume data and callback functions. The
56 contents of any lookup tables for shading and classification are also
57 stored.
58
59 The function used to write data to the files can be set by calling
60 vpSetCallback with the VP_WRITE_FUNC option. This could be used to
61 implement a file-compression system, for example.
62
64 The current file I/O parameters can be retrieved with the following
65 state variable codes (see vpGeti(3)): VP_WRITE_FUNC.
66
68 The normal return value is VP_OK. The following error return values
69 are possible:
70
71 VPERROR_IO
72 The file writing function returned an error value (in which case
73 the external variable errno should contain an operating-system
74 specific error code), or the file system is full.
75
76 VPERROR_BAD_VOLUME
77 The volume dimensions are invalid, or there is no voxel data in
78 the context.
79
80 VPERROR_BAD_SIZE
81 There is no min-max octree in the volume (vpStoreMinMaxOctree
82 only).
83
84 VPERROR_BAD_VOXEL
85 The voxel fields in the rendering context have not been properly
86 defined.
87
89 VolPack(3), vpCreateContext(3), vpLoadRawVolume(3)
90
91
92
93VolPack vpStoreRawVolume(3)