Skip to content

Commit

Permalink
Fix issue when creating both click-point and freehanddraw fiducials.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreashorn committed Mar 9, 2019
1 parent 34c8096 commit 16af21d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ea_checkstructures.m
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@ function checkstructures_CloseRequestFcn(hObject, eventdata, handles)
end
[pathn,filen]=fileparts([directory,'fiducials',filesep,subdir,filesep,uuid,'.nii']);
filen=[filen,'.nii'];
clear matlabbatch

matlabbatch{1}.spm.spatial.smooth.data = {fullfile(pathn,filen)};
matlabbatch{1}.spm.spatial.smooth.fwhm = [0.5 0.5 0.5];
matlabbatch{1}.spm.spatial.smooth.dtype = 512;
Expand Down Expand Up @@ -779,6 +781,7 @@ function checkstructures_CloseRequestFcn(hObject, eventdata, handles)

if length(tfis)>1
fguid=ea_generate_uuid;
clear matlabbatch
matlabbatch{1}.spm.util.imcalc.input = tfis';
matlabbatch{1}.spm.util.imcalc.output = [fguid,'.nii'];
matlabbatch{1}.spm.util.imcalc.outdir = {[directory,'fiducials',filesep,ea_getspace]};
Expand All @@ -797,6 +800,7 @@ function checkstructures_CloseRequestFcn(hObject, eventdata, handles)
ea_delete(tfis);

if length(pfis)>1
clear matlabbatch
matlabbatch{1}.spm.util.imcalc.input = pfis';
matlabbatch{1}.spm.util.imcalc.output = [fguid,'.nii'];
matlabbatch{1}.spm.util.imcalc.outdir = {[directory,'fiducials',filesep,'native']};
Expand Down

0 comments on commit 16af21d

Please sign in to comment.