Skip to content

Commit 74f80ca

Browse files
committed
Move prob_threshold definition to top of file
Relocated the definition of prob_threshold to the top-level scope to avoid redeclaration within the loop and improve code clarity.
1 parent 6018fb4 commit 74f80ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GannetSegment.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

4545
run_count = 0;
4646
setup_spm = 1;
47+
prob_threshold = 0.9; % threshold to reduce partial volume effect and
48+
% improve accuracy of tissue probability maps
4749

4850
% Loop over voxels if PRIAM
4951
for kk = 1:length(vox)
@@ -165,8 +167,6 @@
165167
T1 = spm_vol(struc);
166168
T1_tmp = T1.private.dat(:,:,:);
167169

168-
prob_threshold = 0.9; % threshold to reduce partial volume effect and improve accuracy
169-
170170
WM_vol_tmp = WM_vol.private.dat(:,:,:);
171171
WM_vol_tmp(WM_vol_tmp < prob_threshold) = 0;
172172
T1_WM = WM_vol_tmp .* T1_tmp;

0 commit comments

Comments
 (0)