VOXELIZE(nged)
NAME
voxelize - Takes as input a primitive or a collection of primitives ,old_obj, and creates a region new_obj which is the collection of voxels(RPPs) approximating the old_obj.
SYNOPSIS
voxelize [[-d] | {n}] [[-s] | {"%s %s %s"}] [[-t] | {f}] {new_obj old_obj} [old_obj1 old_obj2 …]
DESCRIPTION
Takes as input a primitive or a collection of primitives , old_obj, and creates a region new_obj which is the collection of voxels(RPPs) approximating the old_obj. The -d option specifies the level of detail(precision in approximation of volume) required. An argument of n means that n * n rays will be shot through each row, and an approximation of volume filled in each voxel region is reached averaging these n * n values. The -s option lets the user specify the voxel size in each direction. The -t option specifies the threshold volume to decide if voxel is to be included in the voxelized output. The threshold should always be a value between 0 and 1.
EXAMPLES
The following example shows the use of the voxelize command to create a voxelized version of an existing object (old_object) and naming the output(new_object).
mged> voxelize -d 2 -s "0.5 0.5 0.5" -t 0.3 newregion.r oldregion.r
Creates a voxelized region corresponding to the original region oldregion.r.
The region newregion.r consists of the resulting voxels.
The -d 2 option means that on each voxel row, 2*2(=4) rays are uniformly shot over the area and an approximation of the volume is reached from the raytrace data of these four rays.
-s "0.5 0.5 0.5" sets the size of the voxels as 0.5 units (user’s choice of units) in each dimension.
-t 0.3 means that a voxel region is considered to be "filled" if the approximated volume of oldregion.r filling this voxel region is 30% of its total volume.
COPYRIGHT
This software is Copyright (c) 1989-2021 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org