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
b42a76b9
Commit
b42a76b9
authored
May 16, 2018
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
Fixed opening data
parent
1e1a39bf
Branches
Branches containing commit
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
+21
-3
21 additions, 3 deletions
src/matlab/+D3d/Open.m
with
21 additions
and
3 deletions
src/matlab/+D3d/Open.m
+
21
−
3
View file @
b42a76b9
...
@@ -74,6 +74,8 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
...
@@ -74,6 +74,8 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
imData
.
Dimensions
(
3
)
=
imData
.
NumberOfFrames
;
imData
.
Dimensions
(
3
)
=
imData
.
NumberOfFrames
;
imData
.
NumberOfFrames
=
1
;
imData
.
NumberOfFrames
=
1
;
imData
.
PixelPhysicalSize
(
3
)
=
max
(
imData
.
PixelPhysicalSize
([
1
,
2
]))
*
2
;
im
=
permute
(
im
,[
1
,
2
,
5
,
4
,
3
]);
im
=
permute
(
im
,[
1
,
2
,
5
,
4
,
3
]);
end
end
...
@@ -112,7 +114,9 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
...
@@ -112,7 +114,9 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
D3d
.
LoadImage
(
im
(:,:,:,:,
t
),
1
,
t
);
D3d
.
LoadImage
(
im
(:,:,:,:,
t
),
1
,
t
);
end
end
else
else
D3d
.
LoadImage
(
im
);
for
t
=
1
:
size
(
im
,
5
)
D3d
.
LoadImage
(
im
(:,:,:,:,
t
),
1
,
t
);
end
loadTransFunc
(
imData
,
im
);
loadTransFunc
(
imData
,
im
);
D3d
.
Update
();
D3d
.
Update
();
end
end
...
@@ -123,12 +127,26 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
...
@@ -123,12 +127,26 @@ function [varargout] = Open( im, imData, imagePath, mesagePkgStr )
loadTransFunc
(
imData
,
im
);
loadTransFunc
(
imData
,
im
);
disp
(
'Only the first image was loaded, please wait while I load the others...'
);
disp
(
'Only the first image was loaded, please wait while I load the others...'
);
im
=
MicroscopeData
.
Reader
(
'path'
,
imData
.
imageDir
,
'imageData'
,
imData
,
'verbose'
,
true
);
if
(
nargout
>
0
)
fullIm
=
zeros
([
Utils
.
SwapXY_RC
(
imData
.
Dimensions
),
imData
.
NumberOfChannels
,
imData
.
NumberOfFrames
],
class
(
im
));
else
fullIm
=
[];
end
prgs
=
Utils
.
CmdlnProgress
(
imData
.
NumberOfFrames
,
true
,
'Loading images in viewer'
);
prgs
=
Utils
.
CmdlnProgress
(
imData
.
NumberOfFrames
,
true
,
'Loading images in viewer'
);
for
t
=
2
:
imData
.
NumberOfFrames
for
t
=
2
:
imData
.
NumberOfFrames
D3d
.
LoadImage
(
im
(:,:,:,:,
t
),
1
,
t
);
im
=
MicroscopeData
.
Reader
(
'path'
,
fullfile
(
imData
.
imageDir
,[
imData
.
DatasetName
,
'.json'
]),
'imageData'
,
imData
,
'timeRange'
,[
t
,
t
]);
if
(
~
D3dIsOpen
)
return
end
D3d
.
LoadImage
(
im
,
1
,
t
);
if
(
~
isempty
(
fullIm
))
fullIm
(:,:,:,:,
t
)
=
im
;
end
prgs
.
PrintProgress
(
t
);
prgs
.
PrintProgress
(
t
);
drawnow
% let the control window send messages
end
end
prgs
.
ClearProgress
(
true
);
prgs
.
ClearProgress
(
true
);
end
end
...
...
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