Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
model_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Christopher Randolph Rhodes
model_server
Commits
13915f25
Commit
13915f25
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Catch when CZI is compressed via unsupported ZSTD format
parent
88f0bff9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!16
Completed (de)serialization of RoiSet
,
!5
Resolve "ilastik models do not validate dimensionality of input data"
,
!3
Catch when CZI is compressed via unsupported ZSTD format
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
model_server/base/accessors.py
+11
-0
11 additions, 0 deletions
model_server/base/accessors.py
with
11 additions
and
0 deletions
model_server/base/accessors.py
+
11
−
0
View file @
13915f25
...
...
@@ -162,6 +162,14 @@ class CziImageFileAccessor(GenericImageFileAccessor):
except
Exception
:
raise
FileAccessorError
(
f
'
Unable to access CZI data in
{
fpath
}
'
)
try
:
md
=
cf
.
metadata
(
raw
=
False
)
compmet
=
md
[
'
ImageDocument
'
][
'
Metadata
'
][
'
Information
'
][
'
Image
'
][
'
OriginalCompressionMethod
'
]
except
KeyError
:
raise
InvalidCziCompression
(
'
Could not find metadata key OriginalCompressionMethod
'
)
if
compmet
.
upper
()
!=
'
UNCOMPRESSED
'
:
raise
InvalidCziCompression
(
f
'
Unsupported compression method
{
compmet
}
'
)
sd
=
{
ch
:
cf
.
shape
[
cf
.
axes
.
index
(
ch
)]
for
ch
in
cf
.
axes
}
if
(
sd
.
get
(
'
S
'
)
and
(
sd
[
'
S
'
]
>
1
))
or
(
sd
.
get
(
'
T
'
)
and
(
sd
[
'
T
'
]
>
1
)):
raise
DataShapeError
(
f
'
Cannot handle image with multiple positions or time points:
{
sd
}
'
)
...
...
@@ -345,6 +353,9 @@ class FileWriteError(Error):
class
InvalidAxisKey
(
Error
):
pass
class
InvalidCziCompression
(
Error
):
pass
class
InvalidDataShape
(
Error
):
pass
...
...
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