1vpOctreeMask(3)            Library Functions Manual            vpOctreeMask(3)
2
3
4

NAME

6       vpOctreeMask  -  compute  a  mask  representing  one level of a min-max
7       octree
8

SYNOPSIS

10       #include <volpack.h>
11
12       vpResult
13       vpOctreeMask(vpc, array, array_size, max_level)
14           vpContext *vpc;
15           unsigned char *array;
16           int array_size;
17           int max_level;
18

ARGUMENTS

20       vpc    VolPack context from vpCreateContext.
21
22       array  A 3D array for storing the mask.
23
24       array_size
25              Size of array in bytes.
26
27       max_level
28              Maximum octree level to descend to.
29

DESCRIPTION

31       vpOctreeMask is used for performance debugging when  rendering  volumes
32       with  a min-max octree.  During rendering the min-max octree is used to
33       help determine which voxels are transparent.  The time required to make
34       this  determination  can  be minimized by an appropriate choice for the
35       range parameters for vpMinMaxOctreeThreshold and the node size  parame‐
36       ters  for vpCreateMinMaxOctree.  vpOctreeMask provides information that
37       can help to determine whether a set of parameters works effectively  or
38       not.
39
40       The output of the routine is stored in a 3D array of bytes that has the
41       same dimensions as the volume (although each element is only one  byte,
42       regardless  of  the size of a voxel).  For each voxel in the volume the
43       corresponding byte in the output array is set by vpOctreeMask to one of
44       three  values:  0  if  the  voxel is definitely transparent, 255 if the
45       voxel may be non-transparent, or 128 if the voxel may be  non-transpar‐
46       ent  and there is more detailed information available at unvisited lev‐
47       els of the octree.  The max_level argument specifies the deepest  level
48       of the octree to be visited (the root level is level 0).
49
50       A  suggested  way  to  use this routine is to compute an octree using a
51       particular set of parameters and then call  vpOctreeMask  with  several
52       different values for max_level.  For each resulting mask array, look at
53       slices (or create a volume rendering!) and see how accurately the  mask
54       captures  the  general  shape  of the data in the original volume.  The
55       best set of parameters results in a  mask  that  captures  the  general
56       shape  without  an  excessively small value for the minimum octree node
57       size (which would result in a very large data structure and  a  lot  of
58       traversal overhead).
59

ERRORS

61       The  normal  return  value is VP_OK.  The following error return values
62       are possible:
63
64       VPERROR_BAD_SIZE
65              There is no octree or the output array has the wrong size.
66
67       VPERROR_BAD_VOXEL
68              The voxel size or the voxel fields have not  been  specified  or
69              have been incorrectly specified.
70
71       VPERROR_BAD_CLASSIFIER
72              The  opacity  transfer function tables have invalid sizes or are
73              associated with invalid voxel fields or  have  been  incorrectly
74              specified.
75

SEE ALSO

77       VolPack(3), vpCreateContext(3), vpCreateMinMaxOctree(3)
78
79
80
81VolPack                                                        vpOctreeMask(3)
Impressum