1/61
Identification of the hemodynamic response in fMRI Part III: The pyHRF software P. Ciuciu1,2
[email protected]
1: CEA/NeuroSpin/LNAO
May 26, 2009
www.lnao.fr
2: IFR49
JIRFNI- “advanced course”, Marseille May 26th, Marseille
PyHRF package
2/61
Outline
General framework Implementation and requirements Setup and use cases Viewer overview
May 26th, Marseille
fMRI analysis with PyHRF
3/61
t t t
PyHRF ●
Parcellation
= n-ary mask (0 label = background) ● ●
from SPM beta maps from 4D fMRI series
May 26th, Marseille
fMRI analysis with PyHRF
4/61
t t t
HRF
PyHRF ●
Parcellation
= n-ary mask ●(0 label = background) ●
● ● ●
from SPM beta maps from 4D fMRI series
contrasts
May 26th, Marseille
5/61
Package description Mainly command line Setup with XML files Interactive dedicated viewer Python and C Time issues: parcellation : several minutes JDE : 1 to 2 hours (can be parallelized)
Available at: $P4/neurospy-.../ ⇒ $python setup.py install May 26th, Marseille
6/61
Dependencies gsl
scipy
numpy
fff PyHRF clustering
viewer
PyQt
JDE
PyXML
pynifti
SIP Qt
nifticlib May 26th, Marseille
7/61
Dependencies gsl
scipy
numpy
fff PyHRF clustering
viewer
PyQt
JDE
PyXML
pynifti
SIP Qt
nifticlib May 26th, Marseille
Dependencies (versions)
8/61
fff (snapshot SVN may 2008) GSL 1.9 numpy 1.0 scipy 0.5.2 PyXML 0.8.4 nifticlib 1.0 pynifti 0.20070930.1 PyQt 3.17.3 Qt 3.3.6 SIP 4.7 May 26th, Marseille
Use cases
9/61
Parcellation JDE Viewer
May 26th, Marseille
Parcellation
10/61
$pyhrf_clus_buildcfg
clustering.xml
$pyhrf_clus_run parcellation.nii May 26th, Marseille
Use cases
11/61
Parcellation JDE Viewer
May 26th, Marseille
Joint Detection-Estimation
12/61
$pyhrf_jde_buildcfg
detectestim.xml
$pyhrf_jde_estim -v1 session0_pm_hrf.nii session0_pmNRL_condition_audio.nii session0_pmNRL_condition_audio.nii ...
May 26th, Marseille
Joint Detection-Estimation
13/61
$pyhrf_jde_buildcfg
detectestim.xml
Data definition
Model parameters $pyhrf_jde_estim -v1 session0_pm_hrf.nii session0_pmNRL_condition_audio.nii session0_pmNRL_condition_audio.nii ...
May 26th, Marseille
Joint Detection-Estimation
14/61
detectestim.xml – Data definition
- seconds - separator : space parcellation with positions excluded during analysis (output file)
Input parcellation BOLD data - seconds - separator : space - if empty : spike stimuli
May 26th, Marseille
Joint Detection-Estimation
15/61
detectestim.xml – Model definition (1)
Drift base type ('polynomial' or 'cosine') Drift parameter: polynom order or cut-off frequency
May 26th, Marseille
Joint Detection-Estimation
16/61
detectestim.xml – Définition du modèle (2)
Amount of spatial correlation (between 0.3 et 0.7) Contrast definition Separator: “;” If no contrast: “;” Boolean flags for outputs
Constraint of HRF=0 at first and last time position (boolean) Boolean flag for the HRF estimation. If 0 : use of a fixed canonical HRF May 26th, Marseille
Joint Detection-Estimation ●
17/61
Multi-session aspect
$pyhrf_jde_buildcfg -s homoscedastic
$pyhrf_jde_buildcfg -s independent
Two different xml setup files May 26th, Marseille
Joint Detection-Estimation
18/61
$pyhrf_jde_buildcfg
detectestim.xml
$pyhrf_jde_estim -v1 session0_pm_hrf.nii session0_pmNRL_condition_audio.nii session0_pmNRL_condition_audio.nii ... May 26th, Marseille
Use cases
19/61
Parcellation JDE Viewer
May 26th, Marseille
Viewer
20/61
$pyhrf_view session0*
May 26th, Marseille
21/61
Viewer $pyhrf_view session0*
Data browser (slice definition)
current slice view
May 26th, Marseille
22/61
Viewer Data browser (slice definition)
current slice view
Slice dimension
May 26th, Marseille
23/61
Viewer Data browser (slice definition)
current slice view
Crop to mask
May 26th, Marseille
24/61
Viewer Data browser (slice definition)
current slice view
Slice axes selection
May 26th, Marseille
25/61
Viewer Data browser (slice definition)
current slice view
Mode 2D: image (matrix)
Mode 1D: curves May 26th, Marseille
PyHRF package – in factory
26/61
Methodological developments ➢
Unsupervised spatial regularization
➢
Habituation modeling
➢
Model comparison
Software developments ➢
Integration to the fMRI Brainvisa toolbox
➢
User friendly parallel system
➢
Scriptable API
➢
Port of the matlab HRF toolbox: L. Risser's work. May 26th, Marseille
Acknowlegdments
27/61
This work was partly supported by grants from Région Ilede-France Special thanks to: Thomas Vincent Anne-Laure Fouque Laurent Risser Stéphane Sockeel
Sophie Donnet
May 26th, Marseille