A brief description of the Gaussian_Sampler algorithm follows. The points to be sampled are injected into a volume one at a time. For each point, a determination of which voxel the point is in is made. The, using a Gaussian distribution:
f(r) = scale_factor * scalar * exp (exponent_factor*((rxy2/eccentricity2 + z2)/R2))
for (rxy2/eccentricity2 + z2) <= R2
the points neighboring the cell are recursively assigned a value. Note: scale_factor, exponent_factor, and eccentricity are instance variables. R2 is the radius**2 defined as the radius instance variable times the maximum length of the bounding box (i.e., the radius instance variable is a fraction of the bounding box of the data). The variable rxy2, eccentricity2, and z2 are used to control the shape of the Gaussian function. Eccentricty values > 1.0 yield flattened ellipsoids whose short axis is oriented in the direction of the input vector data. Eccentric Gaussian distributions are available only if vector data is available, and the "scalar" parameter in the function above is only available if scalar data is available. If you do not wish to affect the Gaussian function with either scalar or vector data, use the "scalar_visibility_on!/off!" and "vector_visibility_on!/off!" messages to control this behavior.
Normally, the bounding box of the points to be injected is calculated automatically. However, if the bounding box is explicitly set (to other than all zeros), then the specified bounding box is used. This may clip points: any points outside the specified bounding box are discarded.
Generally gaussian_sampler is used to create values in a volume. Usually data_iso_surface (or other data_set_filters) is then used to generate a meaningful surface or other visual representation.
dimensions the x-y-z size of the sampling volume.
radius the radius (as a fraction of the bounding box) that the Gaussian function is propogated.
scale_factor factor to increase value of Gaussian function.
exponent_factor factor to multiply Gaussian exponent. Should be <=0.
eccentricity controls the degree of eccentricity of the Gaussian ellipsoid. If the eccentricity == 1.0, the ellipsoid is a sphere. If the eccentricity > 1.0, the ellipsoid is flattened so that the short axis of the ellipsoid is aligned with the vector. If the eccentricity > 1.0, the ellipsoid is lengthened so that the long axis of the ellipsoid is aligned with the vector.
dimensions=(ix,iy,iz) set the x-y-z dimensions of the sampling volume.
bounds? get the bounding box of the inserted points.
bounds=(xmin,xmax, ymin,ymax, zmin,zmax) get the bounding box of the inserted points.
radius? get the radius of the Gaussian function.
radius+value add to the radius of the Gaussian function.
radius=value set the radius of the Gaussian function.
scale_factor? get the scale_factor of the Gaussian function.
scale_factor+value add to the scale_factor of the Gaussian function.
scale_factor=value set the scale_factor of the Gaussian function.
exponent_factor? get the exponent_factor of the Gaussian function.
exponent_factor+value add to the exponent_factor of the Gaussian function.
exponent_factor=value set the exponent_factor of the Gaussian function.
eccentricity? get the eccentricity of the Gaussian function.
eccentricity+value add to the eccentricity of the Gaussian function.
eccentricity=value set the eccentricity of the Gaussian function.
generate_data! create the output data set (in data_out) from the input data set (in data_in).
/* * Test the gaussian_sampler filter */ unstructured_point_set new: ups points=( 0,0,0, 1,1,1, 1.1,1.1,1.1, 2,2,2, ) ; visage_scalar new: s
data=( 1, 2, 10, 3, ) ; visage_scalar new: v data=( 1,2,4, 1,1,1, 10,-2,-2, 3,8,-.1 ) ; visage_data_set new: vds geometry= ups scalar_data= s vector_data= v ;
gaussian_sampler new: gauss -- vector_visibility_off! data_in= vds radius= 0.1 debugon! generate_data! ;
data_iso_surface new: iso data_in= gauss value = .9 ;
display_all new: da data_in= iso ; actor new: a modeller= da ;
data_outline new: outline data_in= gauss ; display_lines new: dl data_in= outline ; actor new: oa modeller= dl ;
renderer new: aren actors=[actor instances?] render!
;