Code covered by the BSD License  

Highlights from
Dicom Operator - EsmeProcess

image thumbnail

Dicom Operator - EsmeProcess

by

 

06 Sep 2013 (Updated )

EsmeProcess functions dicom image operation including viewing, drawing, writing and statistic.

allanumber(m, n, limit)
function rt = allanumber(m, n, limit)
%--------------------------------------------------------------------------
% allanumber: check if elements of matrix m are all value n. As long as the
% difference is under the 'limit', we treat as identical.
%
%   Usage: rt = allanumber(m, n, limit)
%--------------------------------------------------------------------------

% Reshape the matrix m to a single row and compared to n.
t = reshape(m, 1, numel(m)) - n;
% Get a logical vector.
t = abs(t) <= abs(limit);
if all(t)
    rt = true;
else
    rt = false;
end

end

Contact us