Skip to content

Commit

Permalink
[bug] fix outputtype error in json2mcx, reformat with miss_hit
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jun 5, 2024
1 parent 25b0268 commit 654dff1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mcxlab/mcxlab.m
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@
[traj.id, idx] = sort(traj.id);
traj.pos = traj.pos(idx, :);
traj.srcid = int32(data(6, :)');
if(size(data, 1) >= 10)
if (size(data, 1) >= 10)
traj.iquv = data(7:10, :)';
end
traj.data = [single(traj.id)'; data(2:end, idx)];
Expand Down
2 changes: 1 addition & 1 deletion utils/json2mcx.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
cfg = copycfg(cfg, 'isnormalize', json.Session, 'DoNormalize');
cfg = copycfg(cfg, 'outputformat', json.Session, 'OutputFormat');
cfg = copycfg(cfg, 'outputtype', json.Session, 'OutputType');
if (length(cfg.outputtype) == 1)
if (isfield(cfg, 'outputtype') && length(cfg.outputtype) == 1)
otypemap = struct('x', 'flux', 'f', 'fluence', 'e', 'energy', 'j', 'jacobian', 'p', 'nscat', 'm', 'wm', 'r', 'rf', 'l', 'length');
if (~isfield(otypemap, cfg.outputtype))
error('output type %s is not supported', cfg.outputtype);
Expand Down
2 changes: 1 addition & 1 deletion utils/mcxsvmc.m
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
%% computing total area and normal vector for each boundary voxel
areas = elemvolume(iso.vertices, iso.faces);
normals = surfacenorm(iso.vertices, iso.faces);
if(isoctavemesh)
if (isoctavemesh)
normals = -normals;
end
centroids = meshcentroid(iso.vertices, iso.faces);
Expand Down

0 comments on commit 654dff1

Please sign in to comment.