GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
vpOctreeMask(3) FreeBSD Library Functions Manual vpOctreeMask(3)

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

#include <volpack.h>

vpResult

vpOctreeMask(vpc, array, array_size, max_level)

vpContext *vpc;
unsigned char *array;
int array_size;
int max_level;

vpc
VolPack context from vpCreateContext.
array
A 3D array for storing the mask.
array_size
Size of array in bytes.
max_level
Maximum octree level to descend to.

vpOctreeMask is used for performance debugging when rendering volumes with a min-max octree. During rendering the min-max octree is used to help determine which voxels are transparent. The time required to make this determination can be minimized by an appropriate choice for the range parameters for vpMinMaxOctreeThreshold and the node size parameters for vpCreateMinMaxOctree. vpOctreeMask provides information that can help to determine whether a set of parameters works effectively or not.

The output of the routine is stored in a 3D array of bytes that has the same dimensions as the volume (although each element is only one byte, regardless of the size of a voxel). For each voxel in the volume the corresponding byte in the output array is set by vpOctreeMask to one of three values: 0 if the voxel is definitely transparent, 255 if the voxel may be non-transparent, or 128 if the voxel may be non-transparent and there is more detailed information available at unvisited levels of the octree. The max_level argument specifies the deepest level of the octree to be visited (the root level is level 0).

A suggested way to use this routine is to compute an octree using a particular set of parameters and then call vpOctreeMask with several different values for max_level. For each resulting mask array, look at slices (or create a volume rendering!) and see how accurately the mask captures the general shape of the data in the original volume. The best set of parameters results in a mask that captures the general shape without an excessively small value for the minimum octree node size (which would result in a very large data structure and a lot of traversal overhead).

The normal return value is VP_OK. The following error return values are possible:
VPERROR_BAD_SIZE
There is no octree or the output array has the wrong size.
VPERROR_BAD_VOXEL
The voxel size or the voxel fields have not been specified or have been incorrectly specified.
VPERROR_BAD_CLASSIFIER
The opacity transfer function tables have invalid sizes or are associated with invalid voxel fields or have been incorrectly specified.

VolPack(3), vpCreateContext(3), vpCreateMinMaxOctree(3)
VolPack

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.