fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center
description
Transcript of fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center
![Page 1: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/1.jpg)
fBIRN Image Processing Stream(FIPS)
Douglas N. GreveMGH Martinos Center
![Page 2: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/2.jpg)
FIPS Design Goals
• Massive fMRI Analysis• All Levels• Query-Driven• Facilitate Collaboration• Calibration
A work in progress …
![Page 3: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/3.jpg)
BIRN Data Hierarchy
• Directory Structure• Naming Convention• XML• Human Upload Script• SRB• FIPS “Database”• Well-Defined Rules
Root (SRB)
Analysis
K-Reconstruction
Project
Subject/BIRNId
Study
Visit
Series/Run
PixelData/XML
![Page 4: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/4.jpg)
Analysis Levels• Preprocessing – MC, STC, B0, Smoothing, Brain Extraction, Registration • First Level – Estimate amplitude of HDR, Significance• Higher Levels
• Visit, Subject, Group, Cross-Group, …• Fixed, Random, Mixed Effects
• Stimulus Schedule – EPrime• FIPS Database and Web page • QA – All Levels (nothing in FIPS yet)• Mostly FSL-based
![Page 5: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/5.jpg)
Analysis ConfigurationCentralized vs Customized
• Centralized/Global• Preprocessing and First-Level• High-Level Instructions• Do a few times• Assures same analysis
![Page 6: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/6.jpg)
Automatic Analysis Customization• Low-Level Sources of Variance
• Run, Visit, Subject, Site• Intended – Stimulus Schedule• Unintended, Known – Slice Timing• Unintended, Unknown – Smoothness, HDR, B0
• Remove or Account for Automatically • Insulate the user• Starts with data upload – STC, EPrime; GIGO• Global Analysis Configuration (FLAC, PPC)• Customize – Schedules, STC, Smoothing-To
![Page 7: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/7.jpg)
Query-Driven Analysis
• Specify Match Criteria• Eg, All subjects from Minn• Male, Left Handed, Schz• Hypothesis
• Automatic Level Traversal
Cross-Group
Group1
Run1
Visit1
Subj1
First-Level
PreProc
Raw
![Page 8: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/8.jpg)
Facilitate Collaboration• Sharing of:
• Raw Data• Analysis• Storage• Computation
• Global Configurations (Centralized)• Stimulus Schedules• PPC• FLAC• Done a few times – bring all expertise to bear
![Page 9: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/9.jpg)
Status …• Software Exists! www.nmr.mgh.harvard.edu/~greve/fbirn/fips • And people are using it. • Tue, 830-930AM, Laguna Room • Mostly wrappers around FSL• EPrime Stimulus Schedules• PreProc –
• FSL: MC, STC, Smooth• Smoothing-To• Some Modularization
• First Level – FSL
![Page 10: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/10.jpg)
… Status• Visit Level – FSL Fixed Effects• Subject Level – Not Yet• Group Level (Talairach Space)
• OSGM FSL RFx, FFx, MFx • Where? DB?
• XGroup Level – Not Yet. Where? DB?• Queryability
• FIPS DB (need real DB)• Automatic Traversal
• Local Processing Only• ROI – Some FreeSurfer Integration
![Page 11: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/11.jpg)
Current Issues• Databasing – extracting info for designs• QA and Repair• Modularization• Centralized Configurations• Provenance/Distribution/Testing • Multi-Stage Registration• Format – currently Analyze, want NIFTI• Computational Power/Cluster
![Page 12: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/12.jpg)
![Page 13: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/13.jpg)
FIPS Overview
Scanner
Human Upload
Hierarchy(Local SRB)
ConfigureFirst-LevelAnalysis
FLAC Library
First-LevelAnalysis
FIPSDatabase
StimulusTiming
EPrime
PixelDataImageWrapper.xmlfips-process.xmlStimulus Schedules
![Page 14: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/14.jpg)
Local Human Upload and Data Hierarchy
1. $LOCAL_SRB_HOME_BIRN/2. ProjectName_ProjectId3. SubjectID/4. Visit__SiteId_VisitNo/5. Study__StudyId/6. ExperimentSeries/7. Native/8. Original__0001/9. Analyze_7.5/
/space/BIRN/fBIRNPhaseII__000010/00900000103/Visit__009_0001/Study__0001/sm3/Native/Original__0001/Analyze_7.5/
In Analyze_7.5/: Pixel Data: f0001.img, f0002.img, … (analyze format + .mat) ImageWrapper.xml – geometry, voxel size, slice order fips-process.xml – paradigm, run, site, BIRN Id, etc (redundant) XML files contain data-specific information.
![Page 15: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/15.jpg)
fips-process.xml
• paradigm – eg, SIRP• run number within paradigm• All hierarchy information (BIRNID, etc)• Analysis Level (none, FirstLevel)• Stored with Raw and Analyzed data
![Page 16: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/16.jpg)
FIPS Resource File: ~/.fipsrc
setenv LOCAL_SRB_HOME_BIRN /space/mojave/1/users/swallace/SRBsetenv MY_FIPS_DIR /birn/users/share/fips/dbsetenv FIPS_FLAC_DIR /birn/users/share/fips/flac
LOCAL_SRB_HOME_BIRN: root of Local SRB MY_FIPS_DIR: Local FIPS Database (low storage)FIPS_FLAC_DIR: Place were FLACs are saved (low storage)
![Page 17: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/17.jpg)
FIPS Database
• fips-build-db• Finds all fips-process.xml files 9 levels down• Creates a table in $MY_FIPS_DIR• Creates html in $MY_FIPS_DIR• $MY_FIPS_DIR not in the hierarchy (~/.fipsrc)
![Page 18: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/18.jpg)
![Page 19: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/19.jpg)
Analysis Parameters
• Slice Timing (XML)• Discarded Acqs (XML)• Stimulus Schedules
Data-Specific
• Event Definitions • HRF• Smoothing Level• Use Slice Timing or not• Contrasts
Data-Independent
Lower-level, Hidden, Nuisance.Handled at upload, within-hierarchy.ImageWrapper.xml, fips-process.xml
Higher-level, Share, Save in DB, Queryable, extra-hierarchy. FLAC.
![Page 20: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/20.jpg)
Stimulus Schedules and Data Hierarchy
1. $LOCAL_SRB_HOME_BIRN/2. ProjectName_ProjectId3. SubjectID/4. Visit__SiteId_VisitNo/5. Study__StudyId/6. ExperimentSeries/7. Native/8. Original__0001/9. StimulusSchedules/
/space/BIRN/fBIRNPhaseII__000010/00900000103/Visit__009_0001/Study__0001/sm3/Native/Original__0001/StimulusSchedules/
In StimulusSchedules/: Happy.stf, Sad.stf, …
fips-import-sched – program to copy stimulus schedules for a data set into the correct place in the hierarchy.
![Page 21: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/21.jpg)
Stimulus Schedule Issues
• More automation needed.• Combine with upload?• Predefined within analysis?• Flexible enough for post hoc event definitions?• Keep in SRB Hierarchy or save in DB?• Note: SIRP and MM schedules for Phase II in
fips/etc (thanks Bryon!)
![Page 22: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/22.jpg)
Analysis Parameters
• Slice Timing (XML)• Discarded Acqs (XML)• Stimulus Schedules
Data-Specific
• Event Definitions • HRF• Smoothing Level• Use Slice Timing or not• Contrasts
Data-Independent
Lower-level, Hidden, Nuisance.Handled at upload.
Higher-level, Share, Save in DB, Queryable.
![Page 23: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/23.jpg)
First Level Analysis Configuration (FLAC)
• Motion Correction• Slice-timing Correction • Spatial Smoothing• Intensity Normalization (Grand Mean)• Fit General Linear Model (GLM)
• Event Types and Schedules• HRF Type and Parameters, Derivatives• Contrasts of Regression Coefficients• Register to Standard SpaceConfigure ONCE
![Page 24: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/24.jpg)
Creating the FLACfips-fla-config – program that uses FSL’s FEAT GUI to configure first-level analyses. Saves FLAC to FLAC “library”.
fips-fla-config --flac sirp-stc-smth5mm –paradigm SIRP –projectname fBIRNPhaseII --flac: name of the FLAC to be used in later calls--paradigm: as specified during upload--projectname: as specified during the upload
Creates: $MY_FLAC_DIR/fBIRNPhaseII/SIRP/sirp-stc-smth5mm• sirp-stc-smth5mm is a text file crated by FSL.• FLAC “Library” $MY_FLAC_DIR not in the hierarchy (~/.fipsrc)
DO THIS ONCE!
![Page 25: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/25.jpg)
What fips-fla-config is doing
1. Creates temporary staging directory2. Copies the data and schedules from a template
subject (confusing but required by FEAT)3. Runs FSL’s FEAT GUI4. User specifies the config (including schedules)5. User saves to “design.fsf”6. Renames design.fsf and copies to FLAC Library
![Page 26: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/26.jpg)
Configuring the First-Level Analysis using FSL-FEAT
![Page 27: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/27.jpg)
Analyzing Data: fips-flaUSAGE: fips-fla --projectname name : eg, fBIRNPhaseII --paradigm name : eg, SIRP --flac FLACName : eg, sirp-stc-smth5mm
Analyzes all matching data sets, unless: --birnid id : eg, 00042105 --siteid id : eg, 0006 --visitid id : eg, L0001 --studyname name : eg, bay4-trio --run nthrun --visitname name --studyid id
![Page 28: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/28.jpg)
FLA and Data Hierarchy
1. $LOCAL_SRB_HOME_BIRN/2. ProjectName_ProjectId3. SubjectID/4. Visit__SiteId_VisitNo/5. Study__StudyId/6. ExperimentSeries/7. Analysis/8. Original__0001/9. FLACName.feat/
/space/BIRN/fBIRNPhaseII__000010/00900000103/Visit__009_0001/Study__0001/sirp3/Analysis/Original__0001/sirp-stc-smth5mm.feat/
In FLACName.feat/: FSL Analysis results, fips-process.xml.Rebuild DB (fips-build-db) to see results in HTML.
![Page 29: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/29.jpg)
What fips-fla is doing
1. Finds a matching data set2. Copies FLAC file (FSL FEAT format)3. Customizes for that data set (eg, slice order)4. Runs FEAT scripts (does “everything”)5. Runs a check to catch errors6. Creates a new fips-process.xml (changes
“Analysis Level” to “FirstLevel”)
![Page 30: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/30.jpg)
First-Level Analysis Visualization
• FSL-created HTML File• fips-view
•AFNI• FreeSurfer (tkmedit)• Slicer
![Page 31: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/31.jpg)
First Level Analysis Workflow
1. Collect data for a session2. Local Upload 3. (Re)Build FIPS DB4. Upload stimulus timing files (if necessary)5. Analyze (First Level) 6. Rebuild FIPS DB7. Visualize
0. Define and upload FLAC (once for all sessions)
For each session:
![Page 32: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/32.jpg)
FIPS and MBIRN/FreeSurfer
• Visualization• ROI Definition and Analysis
fips-fsreg – register functional to anatomicalfips-feat2surf – sample results on surfacefips-fsroi – maps ROIs to functional spacefips-fsroisum – summarizes ROIs
![Page 33: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/33.jpg)
Outstanding Issues
• Higher-Level Analysis (where in hierarchy?)
• Analyze on Upload (stimulus timing files)
• Include FLAC in DB?
• Portalize
• Continue to use FEAT?
![Page 34: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/34.jpg)
![Page 35: fBIRN Image Processing Stream (FIPS) Douglas N. Greve MGH Martinos Center](https://reader035.fdocuments.in/reader035/viewer/2022062409/568146ff550346895db43b27/html5/thumbnails/35.jpg)
Stimulus Identification and Timing
1 73 42 5 6 8
HAPPYSAD
Happy.stf:
10.0 2 1
30.0 2 1
28.7 6 1
43.1 2 1
Sad.stf:
3.0 2 1
13.0 2 1
15.0 2 1
37.1 2 1
Time
t=0 t=3.0 t=10.0
t=13.0
t=15.0 t=30.0 t=28.7 t=37.1 t=43.1
Columns:1. Onset Time2. Duration3. Weight