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

Support for edits #591

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft

Support for edits #591

wants to merge 3 commits into from

Conversation

dkuegler
Copy link
Member

This PR adds support for edits in FastSurfer.

Edits are enabled by the --edits flag for run_fastsurfer.sh.

Edits supported:
<asegdkt_segfile> via <asegdkt_segfile-w/o-ext>.manedit.
white matter segmentation (wm.mgz) via wm.manedit.mgz
white matter control points (via the standard FreeSurfer control points file)
talairach registration via mri/mri/transforms/talairach.xfm (overwriting talairach registration via mri/mri/transforms/talairach.xfm)
brain.finalsurfs.mgz via brain.finalsurfs.manedit.mgz

This PR also move the allow_root check into functions.sh and introduces run_it and run_it_cmdf function variants that are more clear wrt. argument splitting (see SC2206, SC2207 and similar).

@m-reuter
Copy link
Member

Hi, thanks for the pr. It would be great to fix the spelling errors and also add a readme for edits, which can be pretty short in the first iteration, with a 1-2 sentence description of each possible edit.

@dkuegler
Copy link
Member Author

Spelling should be fixed, documentation will need to be a future thing for now.

recon_surf/recon-surf.sh Outdated Show resolved Hide resolved
run_fastsurfer.sh Outdated Show resolved Hide resolved
@dkuegler
Copy link
Member Author

This branch is currently a mess of fixes and features for 6 different things. Those need to be separated into individual branches and PRs.

At a minimum, this version seems to work for longitudinal processing (still unclear for edits).

@m-reuter
Copy link
Member

I rebased this to current dev which disentangles the edits from the other changes. Please check :

  • that everything is as wanted and
  • no purposeful changes from the earlier commits are undone

Also update your local with a hard reset.

@m-reuter m-reuter mentioned this pull request Nov 2, 2024
@dkuegler dkuegler force-pushed the feature/edits branch 2 times, most recently from 63ccb88 to 69efedc Compare November 11, 2024 15:18
- Adds the --edits flag
- Add additional log messages for edits
- Support for manedit files for asegdkt_segfile.
- Also propagate asegdkt_segfile into  aseg_segfile and mask_name

recon_surf/recon-surf.sh
- Adds the --edits flag
- Add additional log messages for edits
- Change check for existing run into a message instead a fail criteria in edits mode
- Do not delete logfile in edits mode
- Make mask and aseg_noCC required for edits mode (otherwise it might get unclear what should or was already done between run_fastsurfer and recon-surf)
- Add manedit "search" for mask and aseg_nocc (the latter is

recon_surf/talairach-reg.sh
- Add an extra argument (new argument #3 to indicate whether talairach.reg should support edits)
- Support for edits: some messages and if in edit mode, only run talairach registration if mri/transforms/talairach.xfm and mri/transforms/talairach.auto.xfm are the same (so there are no edits) -- thus edits in talairach.xfm superceed automatic results
- talairch-reg.sh will now fail if mri/transforms/talairach.xfm exists, but the script is not running in edits mode (independent if talairach.auto.xfm is the same or not).

recon_surf/functions.sh
- add the add_file_suffix function, which adds a file suffix (for example manedits) to a file name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants