Module: Spatial Graph Local Statistics ()

Description:

Computes local statistics related to the volume fraction, surface area, and orientation tensors for materials with recurent objects(fibers, neurons, molecule, etc.). The statistics are computed within sub-domains, positioned according to a regular lattice. The subblocks may overlap.

The primary input should be a spatial graph representing the centerlines of studied object (fibers, neurons, etc.) as extracted using the 'Cylinder Correlation' and 'Trace Correlation Lines' modules. The tensors are measured from these centerlines. If a object Mask is provided, the volume fraction and surface area are derived from this mask. If not, a fixed object model is used, and the volume (resp. surface area) are obtained by multiplying the studied object length with the assumed cross section area (resp. cross section perimeter) of the studied objects.

This module needs a complete configuration. First, the user has to define the port Bounding Box. This port defines the size of the output data. It can be synchronized with the Input data or the Reference data. Then, the second step is to define the port Mode. This port allow the user choosing how he wants to define the sub-block. Indeed, the output data is defined by blocks and these blocks are automatically define by "Block Size" port or "Voxel Size" port. For each block, a center is associated and it is called "node". This node will be a pixel of the output data.


This is a diagram which helps to configure the module:
- Point 1: This represents the bounding box within which local statistics are computed.
- Point 2: By setting the port Resolution or Voxel Size, the Output Grid is defined. The Resolution specifies the number of nodes within the bounding box, whereas the Voxel Size specifies the spacing between nodes. Please note that when specifying the voxel size, the bounding box will be slightly adjusted to fit the indicated (integer) number of nodes.
- Point 3: For each node, the statistics will be computed by integration within a block centered on the node. By default, the dimensions of blocks are defined such that neighboring blocks are adjacent without overlapping. However, these dimensions may be modified using the option User Defined of port Block Size.

Connections:

Data [required]
Primary input: Spatial Graph representing the centerline of object.

Object Mask [optional]
Object Mask representing a segmentation of the studied object. If a label image is provided, the module internally binarizes it.

Mask [optional]
Areas outside the mask are not taken into account in the computation of the local statistics. The Volume Fraction in a given block is computed as the ratio between of the volume of studied inside the block AND inside the mask, divided by the volume of the Mask inside the block.

Reference [optional]
If provided, the reference defines bounding box within which blocks will be distributed. The Reference may be a sub-volume of the data.

Ports:

Compute Areas

Block

Selects how sub-blocks are defined. These sub-blocks are used to compute the statistic. For each block, there is an associated sub-block. This sub-block is the integration domain for a block. The resulted computed value will be attribuated to the block's node and this value is local statistics:
- Input Cell: The whole block is used for computing the local statistics.
- User-Defined: The sub-blocks are centered on the nodes of the lattice defined by the Resolutionand Voxel Size ; but the actual integration is performed in a cube whose dimensions are specified in the 'Block size' ports. This allows for some overlap between the integration domain of adjacent blocks, resulting in smoother results.
- Full Volume: There is one sub-block which is the full data volume.

Block Size

Size of the sub-block, in X/Y/Z. It is set to 1*1*1 by default. If Input Cell is quoted, it is set to the same as Voxel Size but this port is hidden.

Compute Inputs

Object Model

Model used for evaluating the volume and surface area of studied objects.
- Cylinder: Assumes all objects are cylinders of constant diameter.
- Arbitrary: Assumes all objects are extruded shapes, whose cross-section area and perimeter are specified.
- Use Object Mask: Computes the volume and surface area from the provided 'Object Mask'. Namely, the volume is computed through the number of voxels. For computing the surface area, a triangle surface is internally generated. This may induce a relatively long computation time and memory peak, compared to the computation from a object model.

Section Radius

This port sets the radius for cylindrical object model studied.

Section

This port set the cross section area and perimeter for the arbitrary studied object model.

Compute Options

Model BBox

Selects the way the base bounding box within which the blocks shall be distributed. The actual bounding box use for the computations may be slightly different depending on the requested number and size of the blocks.

Bounding Box

This port displays the extents of the base output bounding box.

Mode

This port selects the way of defining the number and size of blocks.

Resolution(pixels)

Number of blocks requested in X/Y/Z directions.
Depending on Bounding Box parameters, the voxel size may be automatically adjusted to fill the requested bounding box.

Voxel Size(units)

Dimensions of the blocks requested in X/Y/Z directions.
Depending on Bounding Box parameters, the number of sub-blocks may be automatically adjusted to cover the requested bounding box. The actual output bounding box will probably be larger than requested due to a non-integer number of blocks. The actual output bounding box will always be centered on the center of the requested bounding box.

Info

Estimating memory requirements for storing the output data.
If the surface area is computed by using the optional connection Object Mask, a large amount of memory may temporarily be used. It depends on the size and complexity of the studied object mask data.
If spreadsheet output is requested, this port will indicate that a large amount of memory may be required for storing it.

Output

- Density: Generates a scalar field representing the volume fraction of the spatial graph (graph density).
- Surf.area: Generates a scalar field representing the surface area of the spatial graph.
- Orientation: Generates a vector field representing the main orientation of the spatial graph.
- Tensor: Generates a tensor field representing the orientation tensor of the spatial graph.
- Spreadsheet: If is selected, a table containing the statistics computed on each block will be generated. This should probably be avoided if lots of blocks (>2000) are requested, for performance issues. Each row (block) will always contain some positional information, the effective volume of the subblock, the Volume Fraction and Surface Area (computed according the specified model), and 6 entries for the orientation tensors.
- Decompose Tensors: The table will further contain the eigenvalues and eigenvectors corresponding to the decomposition of the tensor, sorted by decreasing eigenvalue