Skip to content

Commit e4cb4ce

Browse files
committed
Rely on hard-coded scaling factor between full res atlas image and JPEG to avoid introducing pillow dependency on the client
1 parent f249bc2 commit e4cb4ce

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/murfey/client/contexts/spa_metadata.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import requests
66
import xmltodict
7-
from PIL import Image
87

98
from murfey.client.context import Context
109
from murfey.client.contexts.spa import _get_grid_square_atlas_positions, _get_source
@@ -85,17 +84,9 @@ def post_transfer(
8584
atlas_original_pixel_size = atlas_xml_data["MicroscopeImage"][
8685
"SpatialScale"
8786
]["pixelSize"]["x"]["numericValue"]
88-
readout_width = float(
89-
atlas_xml_data["MicroscopeImage"]["SpatialScale"]["pixelSize"]["x"][
90-
"numericValue"
91-
]
92-
)
9387

9488
# need to calculate the pixel size of the downscaled image
95-
atlas_im = Image.open(atlas_xml_path.with_suffix(".jpg"))
96-
atlas_pixel_size = atlas_original_pixel_size * (
97-
readout_width / atlas_im.width
98-
)
89+
atlas_pixel_size = atlas_original_pixel_size * 7.8
9990

10091
source = _get_source(
10192
visitless_path.parent / "Images-Disc1" / visitless_path.name,

0 commit comments

Comments
 (0)