Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LightFieldCodingLibrary
LF
Commits
6dc2c0ce
Commit
6dc2c0ce
authored
6 years ago
by
Elian Dib
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned a bit
parent
f24fa301
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
@Viewer/Viewer.m
+8
-8
8 additions, 8 deletions
@Viewer/Viewer.m
with
8 additions
and
8 deletions
@Viewer/Viewer.m
+
8
−
8
View file @
6dc2c0ce
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment