Skip to content

Commit 7150e80

Browse files
committed
convert pixel size to float
1 parent a5fb793 commit 7150e80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

anamic/imaging/metadata.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ def get_pixel_size(fname):
1010
scales = list(filter(lambda x: x.startswith('scales'), description.split("\n")))
1111
if len(scales) >= 1:
1212
scales = scales[0]
13-
return scales.split('=')[1].split(',')[0]
13+
pixel_size = scales.split('=')[1].split(',')[0]
14+
return float(pixel_size)
1415

1516
# Second method
1617
raw_pixel_size, mul = tiff_obj.pages.pages[0].tags['YResolution'].value

0 commit comments

Comments
 (0)