function []=stat_threshold_prog(Volume); file_str=inputdlg('Enter Name of File to Save Design as (including path if required)','Design Save',1,{Volume.savefile}); Volume.savefile=cat(1,file_str{:}); if ~isempty(Volume.savefile) save(Volume.savefile,'Volume'); end if Volume.T_Thresh.Req==1; [Volume.T_Thresh.Peak_Thresh,Volume.T_Thresh.Peak_Extent]=stat_threshold(Volume.T_Thresh.Volume,Volume.T_Thresh.Voxel,Volume.T_Thresh.FWHM,Volume.T_Thresh.DF,... Volume.T_Thresh.P_val_peak,Volume.T_Thresh.ClusterThresh,Volume.T_Thresh.P_val_extent,Volume.T_Thresh.Dim); outstr=strvcat(['Peak Threshold = ',num2str(Volume.T_Thresh.Peak_Thresh)],['Peak Extent = ',num2str(Volume.T_Thresh.Peak_Extent)]); disp(outstr); end if Volume.LocMax.Req==1 if Volume.LocMax.InpThresh==0;Volume.LocMax.Threshold=Volume.T_Thresh.Peak_Thresh;end Volume.LocMax.LM=locmax([Volume.LocMax.Input.filepath Volume.LocMax.Input.filename],Volume.LocMax.Threshold); end if ~isempty(Volume.savefile) save(Volume.savefile,'Volume'); end set(Volume.fig,'Visible','on'); set(Volume.fig,'Userdata',Volume);