-
Notifications
You must be signed in to change notification settings - Fork 120
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
base: dev
Are you sure you want to change the base?
Support for edits #591
Conversation
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. |
Spelling should be fixed, documentation will need to be a future thing for now. |
run_fastsurfer.sh
Outdated
@@ -220,6 +227,9 @@ SURFACE PIPELINE: | |||
to exist already in this case. | |||
--3T Use the 3T atlas for talairach registration (gives better | |||
etiv estimates for 3T MR images, default: 1.5T atlas). | |||
--edits Disable the check for existing recon-surf.sh run and enables | |||
edits of mri/wm.mgz and brain.finalsurfs.mgz by manedit | |||
files as well as FreeSurfer-style WM control points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is strange to have the flag --edits in the help text at multiple places. I think it should be a single help block explaining all of its effects in one location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess consolidating this into the first text makes more sense. On hindsight, I agree. I think --no_biasfield also has multiple mentions, so that should also be changed.
ad7ed78
to
b24182b
Compare
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). |
21f9e19
to
82cd0aa
Compare
- 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
82cd0aa
to
8bccee7
Compare
I rebased this to current dev which disentangles the edits from the other changes. Please check :
Also update your local with a hard reset. |
This PR adds support for edits in FastSurfer.
Edits are enabled by the
--edits
flag forrun_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).