Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6dc2c0ce authored by Elian Dib's avatar Elian Dib
Browse files

Cleaned a bit

parent f24fa301
Branches
No related tags found
No related merge requests found
...@@ -66,16 +66,17 @@ classdef Viewer < handle ...@@ -66,16 +66,17 @@ classdef Viewer < handle
if nDims<=5 if nDims<=5
switch lower(obj.state) switch lower(obj.state)
case 'xy' case 'xy'
state_ = [0 0 1 1,0]; state_ = [0,0,1,1,0];
case 'uv' case 'uv'
state_ = [1 1 0 0,0]; state_ = [1,1,0,0,0];
case 'ux' case 'ux'
state_ = [1 0 1 0,0]; state_ = [1,0,1,0,0];
case 'vy' case 'vy'
state_ = [0 1 0 1,0]; state_ = [0,1,0,1,0];
otherwise otherwise
error('Unexpected state'); error('Unexpected state');
end end
state_ = state_(1:nDims); state_ = state_(1:nDims);
else else
error('Unexpected number of dimensions in input data'); error('Unexpected number of dimensions in input data');
...@@ -83,7 +84,6 @@ classdef Viewer < handle ...@@ -83,7 +84,6 @@ classdef Viewer < handle
end end
function range_ = get.range_(obj) function range_ = get.range_(obj)
switch lower(obj.range) switch lower(obj.range)
case 'class' case 'class'
range_ = obj.classRange; range_ = obj.classRange;
...@@ -142,7 +142,7 @@ classdef Viewer < handle ...@@ -142,7 +142,7 @@ classdef Viewer < handle
if obj.validFigure() if obj.validFigure()
subind = logical(obj.state); subind = logical(obj.state);
subind(end+1:5) = false; subind(end+1:5) = false;
coordStr = {'u','v','x','y','c'}; coordStr = {'u','v','x','y','c'};
coordStr(subind) = arrayfun(@num2str,obj.curView,'UniformOutput',false); coordStr(subind) = arrayfun(@num2str,obj.curView,'UniformOutput',false);
coordStr(~subind) = deal({':'}); coordStr(~subind) = deal({':'});
...@@ -176,6 +176,7 @@ classdef Viewer < handle ...@@ -176,6 +176,7 @@ classdef Viewer < handle
rangeInd = mod(rangeInd,3)+1; rangeInd = mod(rangeInd,3)+1;
obj.range = obj.validRanges{rangeInd}; obj.range = obj.validRanges{rangeInd};
end end
sz = size(obj.slices); sz = size(obj.slices);
obj.curView = min(sz,max([1,1],curView_)); obj.curView = min(sz,max([1,1],curView_));
end end
...@@ -213,5 +214,4 @@ classdef Viewer < handle ...@@ -213,5 +214,4 @@ classdef Viewer < handle
~isempty(obj.im)&&isvalid(obj.im); ~isempty(obj.im)&&isvalid(obj.im);
end end
end end
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment