# Full workflow ## Modular ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph TemplateFlow template["Template"]:::opt end subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph anat[Anatomical fit] direction LR norm["T1w-to-template transform"]:::opt end subgraph min[BOLD fit] direction LR coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Coregistration reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Motion correction reference"] fmap'["Preprocessed Fieldmap"]:::opt end subgraph Transform; direction LR; stc(["Slice-timing correction"]):::opt fmap''["Resampled Fieldmap"]:::opt boldr["Resampled BOLD"] end template -.-> norm T1w -.-> norm norm -.-> boldr T1w --> coreg bold --- stc; bold --> hmc bold --> boldref_hmc ---> hmc fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' -..-> bold2fmap boldref_hmc --> boldref_coreg --> coreg sbref -.-> boldref_coreg boldref_coreg ~~~ bold2fmap -.-> boldref_coreg stc & hmc --> boldr bold2fmap & fmap' -.-> fmap'' coreg & fmap'' -.-> boldr ``` ## Monolithic ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph TemplateFlow template["Template"]:::opt end subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph fmriprep[Preprocessing] direction LR norm["T1w-to-template transform"]:::opt coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Coregistration reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Motion correction reference"] fmap'["Preprocessed fieldmap"]:::opt stc(["Slice-timing correction"]):::opt fmap''["Resampled fieldmap"]:::opt boldr["Resampled BOLD"] end template & T1w -.-> norm -.-> boldr T1w --> coreg bold --> boldref_hmc ----> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' boldref_hmc & fmap' -.-> bold2fmap sbref -.-> boldref_coreg bold --- stc; stc & hmc --> boldr bold2fmap & fmap' -.-> fmap'' -.-> boldref_coreg coreg & fmap'' -.-> boldr ``` # Fit workflows ## Anat and func ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph TemplateFlow template["Template"]:::opt end subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph anat[Anatomical fit] direction LR norm["T1w-to-template transform"]:::opt end template -..-> norm T1w -...-> norm subgraph min[BOLD fit] direction LR coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Coregistration reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Motion correction reference"] fmap'["Preprocessed Fieldmap"]:::opt end T1w ----> coreg bold --> boldref_hmc ---> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' -..-> bold2fmap sbref -.-> boldref_coreg boldref_coreg ~~~ bold2fmap -.-> boldref_coreg ``` ## Anat only ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph TemplateFlow template["Template"] end subgraph raw[Raw dataset] T1w end subgraph anat[Anatomical fit] direction LR norm["T1w-to-template transform"] end template & T1w --> norm ``` ## Func only ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph min[BOLD fit] direction LR coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Coregistration reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Motion correction reference"] fmap'["Preprocessed Fieldmap"]:::opt end T1w ----> coreg bold --> boldref_hmc ---> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' -..-> bold2fmap sbref -.-> boldref_coreg boldref_coreg ~~~ bold2fmap -.-> boldref_coreg ``` # Transform workflow ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph raw[Raw dataset] bold[BOLD] end subgraph min[Fit derivatives] norm["T1w-to-template transform"] coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] bold2fmap["BOLD-fieldmap transform"]:::opt fmap'["Preprocessed Fieldmap"]:::opt end %% subgraph "`**Archive**`" %% raw & min %% end subgraph Transform; direction LR; stc(["Slice-timing correction"]):::opt fmap''["Resampled Fieldmap"]:::opt boldr["Resampled BOLD"] end bold --- stc; norm & coreg -.-> boldr stc & hmc --> boldr bold2fmap & fmap' -.-> fmap'' fmap'' -.-> boldr ``` # Old ```mermaid graph LR; classDef opt stroke-dasharray: 5 subgraph raw[Raw dataset]; direction TB; T1w & fmap[Fieldmap]:::opt & bold[BOLD] sbref["Single-band reference"]:::opt end subgraph min[Fit derivatives]; direction TB; T1w ------> norm["T1w-to-template transform"] boldref_coreg & T1w --> coreg bold --> boldref_hmc["Initial BOLD Reference"] boldref_hmc --> boldref_coreg sbref & fmap'' -.-> boldref_coreg["Final BOLD Reference"] bold & boldref_hmc ----> hmc["HMC transforms"] boldref_coreg --> boldmask["BOLD mask"] coreg["BOLD-to-T1w transform"] fmap' & boldref_hmc -...-> bold2fmap["BOLD-fieldmap transform"] fmap -.-> fmap'["Preprocessed Fieldmap"] fmap' -.-> fmap''["Resampled Fieldmap"] end ``` ```mermaid graph LR classDef opt stroke-dasharray: 5 subgraph TemplateFlow template["Template"] end subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph min[Fit derivatives] norm["T1w-to-template transform"] coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Final BOLD Reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Initial BOLD Reference"] fmap'["Preprocessed Fieldmap"]:::opt T1w ----> norm & coreg bold --> boldref_hmc ---> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' -..-> bold2fmap sbref -.-> boldref_coreg boldref_coreg ~~~ bold2fmap -.-> boldref_coreg end template ----> norm ``` ### Fixup ```mermaid graph LR classDef opt stroke-dasharray: 5 subgraph "Manual fixes" t1w_brain["Brain Mask"] bold2fmap["BOLD-fieldmap transform"] end subgraph TemplateFlow template["Template"] end subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph min[Fit derivatives] norm["T1w-to-template transform"] coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Final BOLD Reference"] boldref_hmc["Initial BOLD Reference"] fmap'["Preprocessed Fieldmap"]:::opt t1w_brain ----> norm T1w ----> norm & coreg bold --> boldref_hmc ---> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' sbref -.-> boldref_coreg bold2fmap --> boldref_coreg end template ----> norm ``` ### Optional template ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph TemplateFlow template["Template"]:::opt end subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph min[Fit derivatives] norm["T1w-to-template transform"]:::opt coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Final BOLD Reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Initial BOLD Reference"] fmap'["Preprocessed Fieldmap"]:::opt T1w -...-> norm T1w ----> coreg bold --> boldref_hmc ---> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' -..-> bold2fmap sbref -.-> boldref_coreg boldref_coreg ~~~ bold2fmap -.-> boldref_coreg end template -...-> norm ``` ### Bold preproc ```mermaid %%{init: {"flowchart": {"htmlLabels": false}} }%% graph LR classDef opt stroke-dasharray: 5 subgraph raw[Raw dataset] T1w bold[BOLD] sbref["Single-band reference"]:::opt fmap[Fieldmap]:::opt end subgraph min[Fit derivatives] coreg["BOLD-to-T1w transform"] hmc["HMC transforms"] boldref_coreg["Final BOLD Reference"] bold2fmap["BOLD-fieldmap transform"]:::opt boldref_hmc["Initial BOLD Reference"] fmap'["Preprocessed Fieldmap"]:::opt T1w ----> coreg bold --> boldref_hmc ---> hmc bold --> hmc boldref_hmc --> boldref_coreg --> coreg fmap -.-> fmap' -.-> boldref_coreg boldref_hmc & fmap' -..-> bold2fmap sbref -.-> boldref_coreg boldref_coreg ~~~ bold2fmap -.-> boldref_coreg end ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up