Skip to content

Conversation

@shnizzedy
Copy link
Member

Fixes

Fixes failing smoke tests
Related to #2182 by @birajstha
Related to 20572de by @e-kenneally

Description

  1. Updates one place where resources were being dynamically named "space-template_desc-T1w_mask"
    f"space-{sym}template_desc-{orig}_mask": (
    to "space-template_desc-brain_mask"
    f"space-{sym}template_desc-{'brain' if orig == 'T1w' else orig}_mask": (
    re: ➖ removed space-template_desc-T1w_mask resource  #2182
  2. Adds 5 resources to
    @nodeblock(
    name="register_symmetric_FSL_anat_to_template",
    outputs={
    **{
    f"space-symtemplate_desc-{suffix}": {
    "Template": "T1w-brain-template-symmetric"
    }
    for suffix in [
    *[f"{desc}_T1w" for desc in ["brain", "preproc"]],
    "brain_mask",
    ]
    },
    **{
    output: {"Template": "T1w-template-symmetric"}
    for output in [
    "space-symtemplate_desc-head_T1w",
    "from-T1w_to-symtemplate_mode-image_desc-linear_xfm",
    "from-symtemplate_to-T1w_mode-image_desc-linear_xfm",
    "from-T1w_to-symtemplate_mode-image_warp",
    "from-T1w_to-symtemplate_mode-image_xfm",
    "from-longitudinal_to-symtemplate_mode-image_desc-linear_xfm",
    "from-symtemplate_to-longitudinal_mode-image_desc-linear_xfm",
    "from-longitudinal_to-symtemplate_mode-image_xfm",
    "space-symtemplate_desc-T1wT2w_biasfield",
    ]
    },
    },
    where a conditional was not met in any preconfigs (prior to 20572de)
    if cfg.registration_workflows['anatomical_registration']['registration']['FSL-FNIRT']['ref_resolution'] == \
    cfg.registration_workflows['anatomical_registration']['resolution_for_anat']:
    else:
    # NOTE: this is an UPDATE because of the opt block above
    added_outputs = {
    f'space-{sym}template_desc-preproc_{orig}': (
    fnirt_reg_anat_mni, 'outputspec.output_brain'),
    f'space-{sym}template_desc-head_{orig}': (
    fnirt_reg_anat_mni, 'outputspec.output_head'),
    f'space-{sym}template_desc-{orig}_mask': (
    fnirt_reg_anat_mni, 'outputspec.output_mask'),
    f'space-{sym}template_desc-T1wT2w_biasfield': (
    fnirt_reg_anat_mni, 'outputspec.output_biasfield'),
    f'from-{orig}_to-{sym}{tmpl}template_mode-image_xfm': (
    fnirt_reg_anat_mni, 'outputspec.nonlinear_xfm'),
    f'from-{orig}_to-{sym}{tmpl}template_mode-image_warp': (
    fnirt_reg_anat_mni, 'outputspec.nonlinear_warp')
    }
    outputs.update(added_outputs)
    but is not nested in that conditional block anymore after that commit
    # NOTE: this is an UPDATE because of the opt block above
    added_outputs = {
    f"space-{sym}template_desc-preproc_{orig}": (
    fnirt_reg_anat_mni,
    "outputspec.output_brain",
    ),
    f"space-{sym}template_desc-head_{orig}": (
    fnirt_reg_anat_mni,
    "outputspec.output_head",
    ),
    f"space-{sym}template_desc-{orig}_mask": (
    fnirt_reg_anat_mni,
    "outputspec.output_mask",
    ),
    f"space-{sym}template_desc-T1wT2w_biasfield": (
    fnirt_reg_anat_mni,
    "outputspec.output_biasfield",
    ),
    f"from-{orig}_to-{sym}{tmpl}template_mode-image_xfm": (
    fnirt_reg_anat_mni,
    "outputspec.nonlinear_xfm",
    ),
    f"from-{orig}_to-{sym}{tmpl}template_mode-image_warp": (
    fnirt_reg_anat_mni,
    "outputspec.nonlinear_warp",
    ),
    }
    outputs.update(added_outputs)

Technical details

I'm not completely confident about which template goes with each resource in register_symmetric_FSL_anat_to_template:

resourcetemplate
before this PRwith this PR
from-T1w_to-symtemplate_mode-image_desc-linear_xfmT1w-template-symmetricT1w-template-symmetric
from-T1w_to-symtemplate_mode-image_warpnot includedT1w-template-symmetric
from-T1w_to-symtemplate_mode-image_xfmT1w-template-symmetricT1w-template-symmetric
from-longitudinal_to-symtemplate_mode-image_desc-linear_xfmT1w-template-symmetricT1w-template-symmetric
from-longitudinal_to-symtemplate_mode-image_xfmT1w-template-symmetricT1w-template-symmetric
from-symtemplate_to-T1w_mode-image_desc-linear_xfmT1w-template-symmetricT1w-template-symmetric
from-symtemplate_to-longitudinal_mode-image_desc-linear_xfmT1w-template-symmetricT1w-template-symmetric
space-symtemplate_desc-T1wT2w_biasfieldnot includedT1w-template-symmetric
space-symtemplate_desc-brain_T1wnot includedT1w-brain-template-symmetric
space-symtemplate_desc-brain_masknot includedT1w-brain-template-symmetric
space-symtemplate_desc-head_T1wnot includedT1w-template-symmetric
space-symtemplate_desc-preproc_T1wT1w-brain-template-symmetricT1w-brain-template-symmetric

Screenshots

failing smoke tests

successful smoke tests

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@shnizzedy shnizzedy merged commit 7523a5c into develop Mar 31, 2025
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants