Skip to content
Snippets Groups Projects
Commit 3e357612 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Blob-definition: updated and made able to generate arrays of them

parent a0af4c2e
No related branches found
No related tags found
No related merge requests found
function blob = gtFwdSimBlobDefinition(type)
% function blob = gtFwdSimBlobDefinition(type)
function blob = gtFwdSimBlobDefinition(type, num_blobs)
% function blob = gtFwdSimBlobDefinition(type, num_blobs)
%
if (~exist('type', 'var') || isempty(type))
......@@ -18,7 +18,7 @@ function blob = gtFwdSimBlobDefinition(type)
'bbnim', zeros(0, 2), ... % Shape function's limits in eta
'bbwim', zeros(0, 2), ... % Shape function's limits in W
'bbsize', zeros(0, 2) ); % Shape function's BoundingBox (includes margins)
otherwise
case {'blob', 'sf_uvw'}
blob = struct( ...
'intm', [], ... % The normalized blob
'mask', [], ... % The segmentation mask
......@@ -31,5 +31,12 @@ function blob = gtFwdSimBlobDefinition(type)
'mbbw', zeros(0, 2), ... % Real (Measured) Blob BB on W <- Not strictly w
'mbbsize', zeros(0, 3), ... % Real (Measured) Blob Bounding Box
'intensity', zeros(0, 1) ); % Blob original intensity
otherwise
error('gtFwdSimBlobDefinition:wrong_argument', ...
'Unnown blob tye: "%s"', type)
end
if (exist('num_blobs', 'var') && ~isempty(num_blobs))
blob(2:num_blobs) = blob;
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment