Skip to content

Commit 4a724a2

Browse files
committed
Cleanup.
1 parent 2967f9f commit 4a724a2

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

omero_vitessce/views.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from . import omero_vitessce_settings
1010

1111
from vitessce import VitessceConfig, OmeZarrWrapper, MultiImageWrapper
12-
from vitessce import ViewType as vt, FileType as ft, CoordinationType as ct
12+
from vitessce import ViewType as Vt, FileType as Ft, CoordinationType as Ct
1313

1414
# Get the address of omeroweb from the config
1515
SERVER = omero_vitessce_settings.SERVER_ADDRESS[1:-1]
@@ -62,17 +62,17 @@ def create_dataset_config(dataset_id, conn):
6262
wrappers = []
6363
for img in images:
6464
wrapper = OmeZarrWrapper(
65-
img_url=build_zarr_image_url(img.getId()),
66-
name=img.getName())
65+
img_url=build_zarr_image_url(img.getId()),
66+
name=img.getName())
6767
wrappers.append(wrapper)
6868
vc_dataset.add_object(MultiImageWrapper(image_wrappers=wrappers,
6969
use_physical_size_scaling=True))
70-
vc.add_view(vt.SPATIAL, dataset=vc_dataset, x=0, y=0, w=10, h=10)
71-
vc.add_view(vt.LAYER_CONTROLLER, dataset=vc_dataset, x=10, y=0, w=2, h=10)
70+
vc.add_view(Vt.SPATIAL, dataset=vc_dataset, x=0, y=0, w=10, h=10)
71+
vc.add_view(Vt.LAYER_CONTROLLER, dataset=vc_dataset, x=10, y=0, w=2, h=10)
7272
vc.add_coordination_by_dict({
73-
ct.SPATIAL_ZOOM: 2,
74-
ct.SPATIAL_TARGET_X: 0,
75-
ct.SPATIAL_TARGET_Y: 0,
73+
Ct.SPATIAL_ZOOM: 2,
74+
Ct.SPATIAL_TARGET_X: 0,
75+
Ct.SPATIAL_TARGET_Y: 0,
7676
})
7777
return vc
7878

@@ -85,14 +85,14 @@ def create_image_config(image_id):
8585
"""
8686
vc = VitessceConfig(schema_version="1.0.6")
8787
vc_dataset = vc.add_dataset().add_file(
88-
url=build_zarr_image_url(image_id),
89-
file_type=ft.IMAGE_OME_ZARR)
90-
vc.add_view(vt.SPATIAL, dataset=vc_dataset, x=0, y=0, w=10, h=10)
91-
vc.add_view(vt.LAYER_CONTROLLER, dataset=vc_dataset, x=10, y=0, w=2, h=10)
88+
url=build_zarr_image_url(image_id),
89+
file_type=Ft.IMAGE_OME_ZARR)
90+
vc.add_view(Vt.SPATIAL, dataset=vc_dataset, x=0, y=0, w=10, h=10)
91+
vc.add_view(Vt.LAYER_CONTROLLER, dataset=vc_dataset, x=10, y=0, w=2, h=10)
9292
vc.add_coordination_by_dict({
93-
ct.SPATIAL_ZOOM: 2,
94-
ct.SPATIAL_TARGET_X: 0,
95-
ct.SPATIAL_TARGET_Y: 0,
93+
Ct.SPATIAL_ZOOM: 2,
94+
Ct.SPATIAL_TARGET_X: 0,
95+
Ct.SPATIAL_TARGET_Y: 0,
9696
})
9797
return vc
9898

@@ -107,7 +107,7 @@ def attach_config(vc, obj_type, obj_id, conn):
107107
delete=False) as outfile:
108108
json.dump(vc.to_dict(), outfile, indent=4, sort_keys=False)
109109
file_ann = conn.createFileAnnfromLocalFile(
110-
outfile.name, mimetype="text/plain")
110+
outfile.name, mimetype="text/plain")
111111
obj = conn.getObject(obj_type, obj_id)
112112
obj.linkAnnotation(file_ann)
113113
return file_ann.getId()

0 commit comments

Comments
 (0)