-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔧 Generalize desc-ref_bold
and the niworkflows
-style sbref
sub-workflow
#2173
Comments
@sgiavasis , The "bold-image" passed to create bold_mask_ccsgraph TD
A[Input Data]
A1["desc-motion_bold"]
A2["desc-preproc_bold"]
A3["desc-brain_T1w"]
A4["desc-preproc_T1w"]
A5["desc-reorient_T1w"]
A --> A1
A --> A2
A --> A3
A --> A4
A --> A5
B[Run 3dAutomask]
A1 -->|bold| B
B --> B1["Initial BOLD Mask"]
C[Extract 8th Volume as ROI]
A1 -->|bold| C
C --> C1["Func ROI"]
D[Apply Initial Mask on ROI]
C1 -->|roi_file| D
B1 -->|mask_file| D
D --> D1["Masked Func ROI"]
E[Register ROI to Anatomical]
D1 -->|in_file| E
A3 -->|reference| E
E --> E1["Func-to-Anat Transform"]
F[Inverse Func-to-Anat Transform]
E1 -->|out_matrix_file| F
F --> F1["Inverse Transform"]
G[Transform Anatomical Brain to Func Space]
A3 -->|in_file| G
C1 -->|reference| G
F1 -->|in_matrix_file| G
G --> G1["Anat Brain in Func Space"]
H[Binarize and Dilate Anat Brain Mask]
G1 -->|in_file| H
H --> H1["Dilated Anat Brain Mask"]
I[Binarize Detectable Func Signals]
A2 -->|bold| I
I --> I1["Binarized Func Signals"]
J[Merge Masks]
B1 -->|mask_file| J
H1 -->|mask_file| J
J --> J1["Merged Masks"]
K[Take Intersection of Masks]
J1 -->|operand_files| K
I1 -->|in_file| K
K --> K1["Intersected Mask"]
L[Generate Example Func Brain]
C1 -->|roi_file| L
K1 -->|mask_file| L
L --> L1["Masked Func Brain"]
M[Generate Outputs]
K1 -->|space-bold_desc-brain_mask| M
L1 -->|desc-ref_bold| M
bold_mask_fsl_afnigraph TD
A[Input Data]
A1["motion-basefile"]
A2["desc-preproc_bold"]
A3["FSL-AFNI-bold-ref"]
A4["FSL-AFNI-brain-mask"]
A5["FSL-AFNI-brain-probseg"]
A --> A1
A --> A2
A --> A3
A --> A4
A --> A5
B[Initialize Transforms with antsAI]
A3 -->|fixed_image| B
A4 -->|fixed_image_mask| B
A1 -->|moving_image| B
B --> B1["Affine Transform"]
C[Set up Spatial Normalization]
A3 -->|fixed_image| C
A1 -->|moving_image| C
B1 -->|initial_moving_transform| C
C --> C1["Normalized Transform"]
D[Map Brain Mask]
A5 -->|input_image| D
A1 -->|reference_image| D
C1 -->|transforms| D
D --> D1["Mapped Brain Mask"]
E[Binarize Mask]
D1 -->|in_file| E
E --> E1["Binary Mask"]
F[Dilate Pre-Mask]
E1 -->|in_file| F
F --> F1["Dilated Mask"]
G[Fix Precision Errors]
F1 -->|image| G
G --> G1["Precision-Corrected Image"]
H[Run N4BiasFieldCorrection]
G1 -->|mask_image| H
A1 -->|input_image| H
H --> H1["Bias-Corrected Image"]
I[Create Generous BET Mask]
H1 -->|in_file| I
I --> I1["BET Mask"]
J[Dilate BET Mask]
I1 -->|in_file| J
J --> J1["Dilated BET Mask"]
K[Apply BET Mask]
I1 -->|in_file| K
J1 -->|mask_file| K
K --> K1["BET Masked Image"]
L[Unifize for T2 Contrast]
K1 -->|in_file| L
L --> L1["Unifized Image"]
M[Run 3dAutomask]
L1 -->|in_file| M
M --> M1["3dAutomask Output"]
N[Take Intersection of Masks]
I1 -->|in_file| N
M1 -->|operand_file| N
N --> N1["Final Mask"]
O[Apply Final Mask]
L1 -->|in_file| O
N1 -->|mask_file| O
O --> O1["Masked Brain"]
P[Generate Outputs]
N1 -->|space-bold_desc-brain_mask| P
O1 -->|desc-ref_bold| P
|
could this be a common workflow for generating graph TD
A[space-bold_desc-brain_mask]
B[desc-motion_bold]
C[Unifize workflow]
D[coregistration_prep_fmriprep]
A --> C
B --> C
C --desc-ref_bold --> D
D --> E[sbref]
|
Related problem
This is related to #2047.
When a user chooses to use the coregistration_prep_fmriprep nodeblock (which requests the overly-specific
desc-ref_bold
resource, and produces thesbref
resource), but they do not use the bold_mask_fsl_afni BOLD masking (which producesdesc-ref_bold
), they will get the "missing resource" error fordesc-ref_bold
.sbref
nodeblock with a different BOLD masking strategy?desc-ref_bold
is too vague - what is the resource and what is it used for?Proposed feature
unifize
part of the workflow in FSL-AFNI BOLD masking can be generalized into its own function.coregistration_prep_fmriprep
should check ifdesc-ref_bold
(or whatever it is ideally renamed to) exists in the resource pool; if it doesn't, invoke theunifize
sub-workflow to create it. That way, any other BOLD mask can be used in conjunction with thissbref
generation.desc-ref_bold
should be more descriptive, reflecting what is unique about this resource created by the part of the workflow in the FSL-AFNI BOLD masking nodeblock.Note: related but tangential, this
unifize
sub-workflow needs an update.Acceptance criteria
coregistration_prep_fmriprep
is enabled, without getting a missing resource error.unifize
sub-workflow is generalized into a function, and regression testing shows no change in output calculation.desc-ref_bold
is renamed to something more descriptive.Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: