Skip to content
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

FIX: Write out boldref-space brain mask with minimal level #3292

Merged
merged 7 commits into from
May 20, 2024

Conversation

tsalo
Copy link
Collaborator

@tsalo tsalo commented May 18, 2024

Closes #3290.

Changes proposed in this pull request

  • Create init_ds_boldmask_wf workflow. This might be overkill.
  • Write out the boldref-space brain mask in init_bold_fit_wf.
  • Stop writing out boldref-space brain mask in init_ds_bold_native_wf, since it's written out in init_bold_fit_wf now.
  • Update expected outputs.

@effigies
Copy link
Member

Traveling so can't look closely, but does this avoid double-sinking in cases where boldref outputs are requested?

@tsalo
Copy link
Collaborator Author

tsalo commented May 18, 2024

Ah good point. It doesn't yet, so I'll switch this to a draft until I've got everything working and there's no double-sinking.

@tsalo tsalo marked this pull request as draft May 18, 2024 15:12
ds_boldmask = pe.Node(
DerivativesDataSink(
base_directory=output_dir,
datatype='func',
Copy link
Collaborator Author

@tsalo tsalo May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is a good idea, but for some reason the files were written out to anat otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this will be fixed by passing in an original bold file.

@tsalo tsalo marked this pull request as ready for review May 18, 2024 17:20
@tsalo tsalo requested a review from effigies May 20, 2024 13:26

# fmt:off
workflow.connect([
(hmcref_buffer, fmapref_buffer, [("boldref", "boldref_files")]),
(fmapref_buffer, enhance_boldref_wf, [("out", "inputnode.in_file")]),
(fmapref_buffer, ds_coreg_boldref_wf, [("out", "inputnode.source_files")]),
(ds_coreg_boldref_wf, regref_buffer, [("outputnode.boldref", "boldref")]),
(fmapref_buffer, ds_boldmask_wf, [("out", "inputnode.source_files")]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other workflows just set

        ds_hmc_wf.inputs.inputnode.source_files = [bold_file]

I don't think I would worry about getting sbref vs bold straight here, as it's just a mask.

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine. It does raise the question of what to do if a pre-computed mask or coregistration transform is found, but that can be handled in a separate issue. This one is sufficient for a bug-fix.

@effigies effigies merged commit cb80f4f into nipreps:maint/23.2.x May 20, 2024
10 checks passed
@tsalo tsalo deleted the minimal-mask-2 branch May 20, 2024 18:10
effigies added a commit that referenced this pull request Jun 4, 2024
23.2.3 (May 20, 2024)

Bug fix release in the 23.2.x series.

Writes brain masks in ``space-boldref`` with ``--level minimal``,
bringing behavior in line with documentation.

* FIX: Write out boldref-space brain mask with minimal level (#3292)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants