Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
QIM
Tools
qim3d
Merge requests
!43
Load bigtiff
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Load bigtiff
load_bigtiff
into
main
Overview
0
Commits
3
Pipelines
0
Changes
1
Merged
Load bigtiff
s184058
requested to merge
load_bigtiff
into
main
Jan 23, 2024
Overview
0
Commits
3
Pipelines
0
Changes
1
See
https://www.notion.so/qim-dtu/Load-BigTiff-5befc589dee3497d9c88a4977e113361
0
0
Merge request reports
Compare
main
version 1
ac30e364
Jan 23, 2024
main (base)
and
version 1
latest version
67a4ffba
3 commits,
Jan 23, 2024
version 1
ac30e364
2 commits,
Jan 23, 2024
1 file
+
6
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
qim3d/io/load.py
+
6
−
2
View file @ ac30e364
Edit in single-file editor
Open in Web IDE
Show full file
@@ -66,10 +66,14 @@ class DataLoader:
If
'
self.virtual_stack
'
is True, returns a numpy.memmap object.
"""
# Get the number of TIFF series (some BigTIFF have multiple series)
with
tifffile
.
TiffFile
(
path
)
as
tif
:
series
=
len
(
tif
.
series
)
if
self
.
virtual_stack
:
vol
=
tifffile
.
memmap
(
path
)
else
:
vol
=
tifffile
.
imread
(
path
)
vol
=
tifffile
.
imread
(
path
,
key
=
range
(
series
)
if
series
>
1
else
None
)
log
.
info
(
"
Loaded shape: %s
"
,
vol
.
shape
)
@@ -412,7 +416,7 @@ def load(
log_memory_info
(
data
)
else
:
# Only log if file type is not a np.ndarray, i.e., it is some kind of memmap object
if
not
isinstance
(
data
[
0
]
if
isinstance
(
data
,
tuple
)
else
data
,
np
.
ndarray
):
if
not
isinstance
(
type
(
data
[
0
]
)
if
isinstance
(
data
,
tuple
)
else
type
(
data
)
,
np
.
ndarray
):
log
.
info
(
"
Using virtual stack
"
)
else
:
log
.
warning
(
'
Virtual stack is not supported for this file format
'
)
Loading