Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
direct-5D-viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
direct-5D-viewer
Commits
58568100
Commit
58568100
authored
Mar 15, 2017
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
Only open 2-D as 3-D only if the whole image stack is already open
parent
a9202ca6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/matlab/+D3d/Open.m
+13
-9
13 additions, 9 deletions
src/matlab/+D3d/Open.m
with
13 additions
and
9 deletions
src/matlab/+D3d/Open.m
+
13
−
9
View file @
58568100
...
...
@@ -44,7 +44,6 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
if
(
isempty
(
imData
))
return
end
imagePath
=
imData
.
imageDir
;
else
% there is an image to load just no metadata to go with it
% assume that the voxels are isomorphic
...
...
@@ -58,13 +57,6 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
end
end
%% open the region chooser if the image is too big
if
(
any
(
imData
.
Dimensions
>
2048
))
D3d
.
UI
.
InitializeMipFigure
(
im
,
imData
,
imData
.
imageDir
,
true
);
imData
=
[];
im
=
[];
end
%% if there is no metadata, get out without starting anything
if
(
isempty
(
imData
))
if
(
nargout
>
1
)
...
...
@@ -77,7 +69,7 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
end
%% if the data is 2D put time on the third dimension
if
(
imData
.
Dimensions
(
3
)
==
1
)
if
(
imData
.
Dimensions
(
3
)
==
1
&&
~
isempty
(
im
)
)
imData
.
Dimensions
(
3
)
=
imData
.
NumberOfFrames
;
imData
.
NumberOfFrames
=
1
;
...
...
@@ -86,6 +78,18 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
im
=
permute
(
im
,[
1
,
2
,
5
,
4
,
3
]);
end
%% open the region chooser if the image is too big
if
(
any
(
imData
.
Dimensions
>
2048
))
D3d
.
UI
.
InitializeMipFigure
(
im
,
imData
,
imData
.
imageDir
,
true
);
if
(
nargout
>
1
)
varargout
{
2
}
=
[];
end
if
(
nargout
>
0
)
varargout
{
1
}
=
[];
end
return
end
%% start the viewer
if
(
~
D3dIsOpen
)
[
pathstr
,
~
,
~
]
=
fileparts
(
which
(
'D3d.Viewer'
));
...
...
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