List of my modules...

Module: Pixels of triangles

Description:

Given an input surface and an input image (used to define dimension, resolution, location, etc.), creates a similar output image, where a pixel is set to non-zero if it intersects a triangle of the input surface, zero otherwise. In technical terms, a pixel (i,j,k) of the output image will be set to 1 if the voxel centred at (i,j,k) intersects a triangle of the input surface. The greylevel of the output pixels are defined as the number of triangles that intersect it.

Example : the left image shows the input surface, made up of four patches, with the bounding box of the input image. The right image shows the output image, in which pixels with zero greylevel are not drawn, and the other represented by cubes (drawn with Draw_Cubes) colored according to their greylevel, which is defined by the number of triangles that intersect the pixel.

NOTES :

Connections:

Image

[required]
Input image. This is only used to set the size of the output image. For now, the only input type that has been implemented is HxUniformScalarField3.

Triangles

[required]
Input surface. If a vertex of a triangle falls outside the input image's bounding box, then it is ignored completely.

Ports:

Patch


Chooses whether only one patch of the input surface is handled, or all of them.

Patch_number


If only one patch is chosen, then this port gives the index of the patch to look at.

Just_Do_It


Pressing this button starts the computation.

Commands:

Additional options can be accessed when typing in the console Pixels_of_Triangles COMMAND_NAME.

verbose

Displays timing information after the computation. Retype to hide info.

create

Runs the computation. Returns the name of the output, so it can be used in a script, such as set RESULT [Pixels_of_Triangles create].