Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliby-mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
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
Swain Lab
aliby
aliby-mirror
Commits
9ec11cc5
Commit
9ec11cc5
authored
2 years ago
by
Alán Muñoz
Browse files
Options
Downloads
Patches
Plain Diff
feat(image): Add instatiate_image wrapper
parent
22ceaf28
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/aliby/io/image.py
+17
-1
17 additions, 1 deletion
src/aliby/io/image.py
with
17 additions
and
1 deletion
src/aliby/io/image.py
+
17
−
1
View file @
9ec11cc5
...
@@ -33,6 +33,22 @@ def get_examples_dir():
...
@@ -33,6 +33,22 @@ def get_examples_dir():
return
files
(
"
aliby
"
).
parent
.
parent
/
"
examples
"
/
"
tiler
"
return
files
(
"
aliby
"
).
parent
.
parent
/
"
examples
"
/
"
tiler
"
def
instatiate_image
(
source
:
t
.
Union
[
str
,
int
,
t
.
Dict
[
str
,
str
],
PosixPath
]):
"""
Wrapper to instatiate the appropiate image
Parameters
----------
source : t.Union[str, int, t.Dict[str, str], PosixPath]
Image identifier
Examples
--------
FIXME: Add docs.
"""
return
dispatch_image
(
source
)(
source
)
def
dispatch_image
(
source
:
t
.
Union
[
str
,
int
,
t
.
Dict
[
str
,
str
],
PosixPath
]):
def
dispatch_image
(
source
:
t
.
Union
[
str
,
int
,
t
.
Dict
[
str
,
str
],
PosixPath
]):
"""
"""
Wrapper to pick the appropiate Image class depending on the source of data.
Wrapper to pick the appropiate Image class depending on the source of data.
...
@@ -235,7 +251,7 @@ class ImageDir(BaseLocalImage):
...
@@ -235,7 +251,7 @@ class ImageDir(BaseLocalImage):
super
().
__init__
(
path
)
super
().
__init__
(
path
)
self
.
image_id
=
str
(
self
.
path
.
stem
)
self
.
image_id
=
str
(
self
.
path
.
stem
)
self
.
_meta
=
dir_to_meta
(
self
.
path
,
**
kwargs
)
self
.
_meta
=
dir_to_meta
(
self
.
path
)
def
get_data_lazy
(
self
)
->
da
.
Array
:
def
get_data_lazy
(
self
)
->
da
.
Array
:
"""
Return 5D dask array. For lazy-loading local multidimensional tiff files
"""
"""
Return 5D dask array. For lazy-loading local multidimensional tiff files
"""
...
...
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