Skip to content

Commit

Permalink
Some minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Sun committed Dec 4, 2023
1 parent 46cddd2 commit a45c943
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions CanlabCore/@region/isosurface.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@

cl = region2struct(r);

% surface_handles = []; % This appears to be a bug, as it coerces the Patch object into a double. 05/23/2023 MS
surface_handles = {};
surface_handles = []; % This appears to be a bug, as it coerces the Patch object into a double. 05/23/2023 MS
% surface_handles = {};

for i = 1:k

try
out = imageCluster('cluster', cl(i), 'color', colors{i}, varargin{:});

% surface_handles(i) = out; % This appears to be a bug, as it
surface_handles(i) = out; % This appears to be a bug, as it
% coerces the Patch object into a double. 05/23/2023 MS
surface_handles{i} = out;
% surface_handles{i} = out;
catch
disp('Error imaging isosurface; too few voxels?')
%surface_handles(i) = [];
surface_handles(i) = [];
end

% % Isocaps, if needed
Expand Down
8 changes: 5 additions & 3 deletions CanlabCore/@region/region.m
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,11 @@
obj(i).dim = mask.volInfo.dim;
obj(i).numVox = size(obj(i).XYZ, 2);

obj(i).center = center_of_mass(myXYZ, double(obj(i).Z));
obj(i).mm_center = center_of_mass(obj(i).XYZmm, double(obj(i).Z));

if ~isempty(myXYZ) % XYZ initialization may be skipped, so skip this if so MS 2/15/2023
obj(i).center = center_of_mass(myXYZ, double(obj(i).Z));
obj(i).mm_center = center_of_mass(obj(i).XYZmm, double(obj(i).Z));
end

if ~isempty(mask.volInfo.fname)
[~, ff, ee] = fileparts(mask.volInfo.fname);
obj(i).custom_info1 = [ff ee];
Expand Down

0 comments on commit a45c943

Please sign in to comment.