labs.spatial_models.bsa_io

Module: labs.spatial_models.bsa_io

This module is the interface to the bayesian_structural_analysis (bsa) module It handles the images provided as input and produces result images.

nipy.labs.spatial_models.bsa_io.make_bsa_image(mask_images, stat_images, threshold=3.0, smin=0, sigma=5.0, prevalence_threshold=0, prevalence_pval=0.5, write_dir=None, algorithm='density', contrast_id='default')

Main function for performing bsa on a set of images. It creates the some output images in the given directory

Parameters:

mask_images: list of str,

image paths that yield mask images, one for each subject

stat_images: list of str,

image paths of the activation images, one for each subject

threshold: float, optional,

threshold used to ignore all the image data that is below

smin: float, optional,

minimal size (in voxels) of the extracted blobs smaller blobs are merged into larger ones

sigma: float, optional,

variance of the spatial model, i.e. cross-subject uncertainty

prevalence_threshold: float, optional

threshold on the representativity measure

prevalence_pval: float, optional,

p-value of the representativity test:

test = p(representativity>prevalence_threshold) > prevalence_pval

write_dir: string, optional,

if not None, output directory

method: {‘density’, ‘co-occurrence’}, optional,

Inference method used in the landmark definition

contrast_id: string, optional,

identifier of the contrast

Returns:

landmarks: nipy.labs.spatial_models.structural_bfls.landmark_regions

instance that describes the structures found at the group level None is returned if nothing has been found significant at the group level

hrois : list of nipy.labs.spatial_models.hroi.Nroi instances,

(one per subject), describe the individual counterpart of landmarks