Skip to content

Conversation

@birajstha
Copy link
Contributor

@birajstha birajstha commented Jul 23, 2025

Fixes

Fixes #2269 by @birajstha

Description

Freesurfer-ABCD brain masking strategy is improved to create a mask that resembles one created in original DCAN script.
This produces a better masked brain without residual skull and cropping.

Technical details

Removed pipeline-fs_xfm resource. Then modified the mask generation nodeblock to use desc-restore_T1w instead of desc-preproc_T1w as per the original script.

Tests

Tested with few oblique and non-oblique T1w s. Everything works perfect.
With oblique T1w, need to enable [warp] instead of [refit] as below.

anatomical_preproc:
  run: On
  deoblique: [warp]

Screenshots

Before

image

After

image

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.

@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.9%. Comparing base (1d39110) to head (54bab39).
⚠️ Report is 9 commits behind head on develop.

Files with missing lines Patch % Lines
CPAC/anat_preproc/utils.py 0.0% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #2268   +/-   ##
=======================================
  Coverage     33.9%   33.9%           
=======================================
  Files          233     233           
  Lines        26354   26344   -10     
  Branches      4135    4134    -1     
=======================================
- Hits          8941    8940    -1     
+ Misses       16684   16675    -9     
  Partials       729     729           
Files with missing lines Coverage Δ
CPAC/anat_preproc/anat_preproc.py 39.4% <100.0%> (+0.4%) ⬆️
CPAC/pipeline/engine.py 55.0% <ø> (-0.1%) ⬇️
CPAC/anat_preproc/utils.py 19.8% <0.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shnizzedy
Copy link
Member

Is this related to #2248 / #2256?

@birajstha
Copy link
Contributor Author

Is this related to #2248 / #2256?

Nope, It just refines the already existing desc-preproc_T1w which had skull in it.

@birajstha birajstha marked this pull request as ready for review July 24, 2025 18:57
@birajstha birajstha requested a review from a team July 24, 2025 18:57
@sgiavasis sgiavasis merged commit 921946a into develop Jul 29, 2025
30 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.

4 participants