NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Previous topic

neurospin.spatial_models.bayesian_structural_analysis

Next topic

neurospin.spatial_models.discrete_domain

This Page

neurospin.spatial_models.bsa_io

Module: neurospin.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.neurospin.spatial_models.bsa_io.make_bsa_image(mask_images, betas, theta=3.0, dmax=5.0, ths=0, thq=0.5, smin=0, swd=None, method='simple', subj_id=None, nbeta='default', densPath=None, crPath=None, verbose=0, reshuffle=False)

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

Parameters :

mask_images: A list of image paths that yield binary images, :

one for each subject the number os subjects, nsubj, is taken as len(mask_images)

betas: A list of image paths that yields the activation images, :

one for each subject

theta=3., threshold used to ignore all the image data that si below :

dmax=5., prior width of the spatial model; :

corresponds to multi-subject uncertainty

ths=0: threshold on the representativity measure of the obtained :

regions

thq=0.5: p-value of the representativity test: :

test = p(representativity>ths)>thq

smin=0: minimal size (in voxels) of the extracted blobs :

smaller blobs are merged into larger ones

swd: string, optional :

if not None, output directory

method=’simple’: applied region detection method; to be chose among :

‘simple’, ‘ipmi’

subj_id=None: list of strings, identifiers of the subjects. :

by default it is range(nsubj)

nbeta=’default’, string, identifier of the contrast :

densPath=None, string, path of the output density image :

if False, no image is written if None, the path is computed from swd, nbeta

crPath=None, string, path of the (4D) output label image :

if False, no ime is written if None, many images are written, with paths computed from swd, subj_id and nbeta

reshuffle: bool, optional :

if true, randomly swap the sign of the data

Returns :

AF: an nipy.neurospin.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

BF : a list of nipy.neurospin.spatial_models.hroi.Nroi instances

(one per subject) that describe the individual coounterpart of AF

if method==’loo’, the output is different: :

mll, float, the average likelihood of the data under the model after cross validation ll0, float the log-likelihood of the data under the global null

fixme: unique mask should be allowed :