Skip to content

Commit 49dd51c

Browse files
committed
Avoid PCRE grep in recon-surf
Avoid using grep -P, instead use grep -E and some bash instructions.
1 parent 7a6f47e commit 49dd51c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

recon_surf/recon-surf.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ cmd="$python $FASTSURFER_HOME/FastSurferCNN/data_loader/conform.py -i $t1 --chec
464464
RunIt "$cmd" "$LF"
465465

466466
# look into the CONFORM_LF to find the voxel sizes, the second conform.py call will check the legality of vox_size
467-
vox_size=$(grep -oP '(?<= - Voxel Size )[0-9\.]+' "$CONFORM_LF")
467+
vox_size_prefix=" - Voxel Size"
468+
vox_size=$(grep -oE "${vox_size_prefix} [0-9.]+" "$CONFORM_LF")
469+
vox_size="${vox_size:${#vox_size_prefix}}"
468470
# remove the temporary conform_log (all info is also in the recon-surf logfile)
469471
if [ -f "$CONFORM_LF" ]; then rm -f "$CONFORM_LF" ; fi
470472

0 commit comments

Comments
 (0)