Skip to content

Commit

Permalink
key bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bogpetre committed Jan 25, 2024
1 parent 0fb2489 commit 4233852
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CanlabCore/@atlas/downsample_parcellation.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@

if isempty(varargin)
labelfield = 'labels_2';
elseif ischar(varargin{1})
labelfield=varargin{1};
elseif isvector(varargin{1})
if length(varargin{1}) ~= num_regions(obj)
error('New labels has length %d which does not match input atlas parcel count (%d)',length(varargin{1}), num_regions(obj));
end
labelfield='labels';
obj.lbaels = varargin{1};
else
labelfield = varargin{1};
error('Unrecognized input datatype');
end

% input check
Expand Down Expand Up @@ -87,7 +89,7 @@
% update progress watcher
delete_last_chars = length(last_msg);
fprintf('%s',char(8*ones(1,delete_last_chars)))
new_msg = sprintf('Assembling region %d/%d',i,n_reg);
new_msg = sprintf('Creating new region %d/%d',i,n_reg);
fprintf('%s',new_msg);
last_msg = new_msg;

Expand All @@ -106,7 +108,7 @@
% update progress watcher
delete_last_chars = length(last_msg);
fprintf('%s',char(8*ones(1,delete_last_chars)))
new_msg = sprintf('Adding region %d/%d',i,n_reg);
new_msg = sprintf('Merging new region %d/%d',i,n_reg);
fprintf('%s',new_msg);
last_msg = new_msg;

Expand Down

0 comments on commit 4233852

Please sign in to comment.