Skip to content

Commit e497d62

Browse files
committed
adding changes suggested
1 parent fd65fb5 commit e497d62

File tree

7 files changed

+14
-29
lines changed

7 files changed

+14
-29
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- Required positional parameter "wf" in input and output of `ingress_pipeconfig_paths` function, where a node to reorient templates is added to the `wf`.
2525
- Required positional parameter "orientation" to `resolve_resolution`.
2626
- Optional positional argument "cfg" to `create_lesion_preproc`.
27-
- New switch `mask_sbref` under `func_input_prep` in functional registration.
27+
- New switch `mask_sbref` under `func_input_prep` in functional registration and set to default `on`.
2828
- New resource `desc-head_bold` as non skull-stripped bold from nodeblock `bold_masking`.
2929

3030
### Changed
@@ -57,7 +57,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5757
- as output from FNIRT registration.
5858
- as inputs from Nodeblocks requesting it and, replaced with `space-template_desc-brain_mask`.
5959
- from outputs tsv.
60-
60+
- Inputs `[desc-motion_bold, bold]` from `coregistration_prep_vol` nodeblock.
61+
- `input` field from `coregistration` in blank and default config.
62+
- `reg_with_skull` swtich from `func_input_prep` in blank and default config.
6163

6264
## [1.8.7] - 2024-05-03
6365

CPAC/pipeline/cpac_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,8 +1288,8 @@ def build_workflow(subject_id, sub_dict, cfg, pipeline_name=None):
12881288
coregistration_prep_vol,
12891289
coregistration_prep_mean,
12901290
coregistration_prep_fmriprep,
1291-
mask_sbref,
12921291
],
1292+
mask_sbref,
12931293
]
12941294

12951295
# Distortion/Susceptibility Correction

CPAC/pipeline/schema.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,12 +725,10 @@ def sanitize(filename):
725725
"reference": In({"brain", "restore-brain"}),
726726
"interpolation": In({"trilinear", "sinc", "spline"}),
727727
"using": str,
728-
"input": str,
729728
"cost": str,
730729
"dof": int,
731730
"arguments": Maybe(str),
732731
"func_input_prep": {
733-
"reg_with_skull": bool1_1,
734732
"input": [
735733
In(
736734
{

CPAC/registration/registration.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,7 +3167,7 @@ def mask_sbref(wf, cfg, strat_pool, pipe_num, opt=None):
31673167
"input",
31683168
],
31693169
option_val="Selected_Functional_Volume",
3170-
inputs=[("desc-preproc_bold", ["desc-head_bold", "bold"], "sbref")],
3170+
inputs=[("desc-preproc_bold", "sbref")],
31713171
outputs=["sbref"],
31723172
)
31733173
def coregistration_prep_vol(wf, cfg, strat_pool, pipe_num, opt=None):
@@ -3182,14 +3182,7 @@ def coregistration_prep_vol(wf, cfg, strat_pool, pipe_num, opt=None):
31823182
outputtype="NIFTI_GZ",
31833183
)
31843184

3185-
if not cfg.registration_workflows["functional_registration"]["coregistration"][
3186-
"func_input_prep"
3187-
]["reg_with_skull"]:
3188-
node, out = strat_pool.get_data("desc-preproc_bold")
3189-
else:
3190-
# TODO check which file is functional_skull_leaf
3191-
# TODO add a function to choose brain or skull?
3192-
node, out = strat_pool.get_data(["desc-head_bold", "bold"])
3185+
node, out = strat_pool.get_data("desc-preproc_bold")
31933186

31943187
wf.connect(node, out, get_func_volume, "in_file_a")
31953188

CPAC/resources/configs/pipeline_config_abcd-options.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ registration_workflows:
199199
run: On
200200
func_input_prep:
201201

202-
# Choose whether to use functional brain or skull as the input to functional-to-anatomical registration
203-
reg_with_skull: On
204-
205202
# Choose whether to use the mean of the functional/EPI as the input to functional-to-anatomical registration or one of the volumes from the functional 4D timeseries that you choose.
206203
# input: ['Mean_Functional', 'Selected_Functional_Volume', 'fmriprep_reference']
207204
input: [Selected_Functional_Volume]

CPAC/resources/configs/pipeline_config_blank.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,6 @@ registration_workflows:
706706
run: Off
707707
func_input_prep:
708708

709-
# Choose whether to use functional brain or skull as the input to functional-to-anatomical registration
710-
reg_with_skull: Off
711-
712709
# Choose whether to use the mean of the functional/EPI as the input to functional-to-anatomical registration or one of the volumes from the functional 4D timeseries that you choose.
713710
# input: ['Mean_Functional', 'Selected_Functional_Volume', 'fmriprep_reference']
714711
input: [Mean_Functional]
@@ -724,8 +721,8 @@ registration_workflows:
724721
#Input the index of which volume from the functional 4D timeseries input file you wish to use as the input for functional-to-anatomical registration.
725722
func_reg_input_volume: 0
726723

727-
# Independent of the above `reg_with_skull` option
728-
mask_sbref: Off
724+
# Mask the sbref created by coregistration input prep nodeblocks above before registration
725+
mask_sbref: On
729726

730727
boundary_based_registration:
731728

@@ -755,8 +752,7 @@ registration_workflows:
755752
# Choose FSL or ABCD as coregistration method
756753
using: FSL
757754

758-
# Choose brain or whole-head as coregistration input
759-
input: brain
755+
#TODO Add input field here to choose between whole head or brain
760756

761757
# Choose coregistration interpolation
762758
interpolation: trilinear

CPAC/resources/configs/pipeline_config_default.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,7 @@ registration_workflows:
766766
# Choose FSL or ABCD as coregistration method
767767
using: FSL
768768

769-
# Choose brain or whole-head as coregistration input
770-
input: brain
769+
#TODO Add input field here to choose between whole head or brain
771770

772771
# Choose coregistration interpolation
773772
interpolation: trilinear
@@ -783,9 +782,6 @@ registration_workflows:
783782

784783
func_input_prep:
785784

786-
# Choose whether to use functional brain or skull as the input to functional-to-anatomical registration
787-
reg_with_skull: Off
788-
789785
# Choose whether to use the mean of the functional/EPI as the input to functional-to-anatomical registration or one of the volumes from the functional 4D timeseries that you choose.
790786
# input: ['Mean_Functional', 'Selected_Functional_Volume', 'fmriprep_reference']
791787
input: ['Mean_Functional']
@@ -802,6 +798,9 @@ registration_workflows:
802798
#Input the index of which volume from the functional 4D timeseries input file you wish to use as the input for functional-to-anatomical registration.
803799
func_reg_input_volume: 0
804800

801+
# Mask the sbref created by coregistration input prep nodeblocks above before registration
802+
mask_sbref: On
803+
805804
boundary_based_registration:
806805
# this is a fork point
807806
# run: [On, Off] - this will run both and fork the pipeline

0 commit comments

Comments
 (0)