[Volume of Labels] Compute Clique Statistics

Estimate clique statistics from a "ground truth" volume of labels.

Within an image of labels, a clique is a couple of adjacent labels. This process computes statistics on cliques distribution from an image considered to be ground truth. Here, cliques are not considered in terms of absolute (the probability of finding the combination (i,j) in the image) but in conditional terms (the probability for a voxel to be labeled i if one of its neighbours is labeled j).

In practice, "absolute" statistics are first stored into a symmetric matrix, which is then normalized along the first axis, making it non-symmetric in the end.

Description

A connectivity describes which neighbours configuration are considered a clique (Figure 1).

Figure 1. Voxels considered neighbours of a given central voxel under different connectivities. A clique is a set of two voxels that are neighbours under a chosen connectivity.

Statistics are then computed on all cliques in the image. All cliques are equally weighted, whether the input volume is isotropic or not, and whether the clique is a face, edge or corner clique. The resulting matrix is symmetric as shown Figure 2. The matrix is then normalized along the x direction to obtain conditional cliques probabilities.

Figure 2. Construction of the cliques conditional probabilities matrix.

Implementation

This process is implemented in Python. It is thus rather innefficient, despite the use of numpy routines and efforts to minimize loops. Its non-frequent use (only once when creating an atlas usable with our pipeline) makes this issue of low priority for now.

Parameters

Input_Volume: 3D Volume ( input )
Volume containing atlas labels. For this process to work properly, they should be continuous and start from 0 (which can be a "background" label).
Neighbourhood: Choice ( input )
Type of connectivity used to compute statistics. The lower the number, the smaller the neighborhood :
Output_Directory: Directory ( optional, input )
Specify the directory in which the output file will be stored.
Output_Matrix: 2D Image ( output )
Path to the output matrix file. It will be stored as a 2D image with voxel (i,j) containing the probability for a voxel to have the label i if one neighbour has the label j.
Output_Type: Choice ( input )
Data type in which statistics should be computed and stored. Double has more precision but also requires more memory.

Technical information

Toolbox : Primatologist

User level : 0

Identifier : AtlasComputeCliqueFromLabels

File name : brainvisa/toolboxes/primatologist/processes/atlases/AtlasComputeCliqueFromLabels.py

Supported file formats :

Input_Volume :
gz compressed NIFTI-1 image, Aperio svs, BMP image, DICOM image, Directory, ECAT i image, ECAT v image, FDF image, FreesurferMGH, FreesurferMGZ, GIF image, GIS image, Hamamatsu ndpi, Hamamatsu vms, Hamamatsu vmu, JPEG image, Leica scn, MINC image, NIFTI-1 image, PBM image, PGM image, PNG image, PPM image, SPM image, Sakura svslide, TIFF image, TIFF image, TIFF(.tif) image, TIFF(.tif) image, VIDA image, Ventana bif, XBM image, XPM image, Zeiss czi, gz compressed MINC image, gz compressed NIFTI-1 image
Output_Directory :
Directory, Directory
Output_Matrix :
gz compressed NIFTI-1 image, BMP image, DICOM image, Directory, ECAT i image, ECAT v image, FDF image, GIF image, GIS image, JPEG image, MINC image, NIFTI-1 image, PBM image, PGM image, PNG image, PPM image, SPM image, TIFF image, TIFF(.tif) image, VIDA image, XBM image, XPM image, gz compressed MINC image, gz compressed NIFTI-1 image