Skip to content

Commit

Permalink
Work around pyjnius mishandling of bool args (#118)
Browse files Browse the repository at this point in the history
Bools are now auto-converted to Integers instead of Booleans, so we have to
perform the conversion explicitly now. Tracked upstream in kivy/pyjnius#602 .
  • Loading branch information
jmuhlich committed Apr 26, 2022
1 parent db26247 commit eccb25f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ashlar/reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

import jnius

JBoolean = jnius.autoclass('java.lang.Boolean')
DebugTools = jnius.autoclass('loci.common.DebugTools')
IFormatReader = jnius.autoclass('loci.formats.IFormatReader')
MetadataRetrieve = jnius.autoclass('ome.xml.meta.MetadataRetrieve')
Expand Down Expand Up @@ -227,8 +228,8 @@ def _init_metadata(self):
# For multi-scene .CZI files, we need raw tiles instead of the
# auto-stitched mosaic and we don't want labels or overview images
options = DynamicMetadataOptions()
options.setBoolean('zeissczi.autostitch', False)
options.setBoolean('zeissczi.attachments', False)
options.setBoolean('zeissczi.autostitch', JBoolean(False))
options.setBoolean('zeissczi.attachments', JBoolean(False))
self._reader.setMetadataOptions(options)
self._reader.setId(self.path)

Expand Down

0 comments on commit eccb25f

Please sign in to comment.