Skip to content

Commit

Permalink
paquo.jpype_backend: remove macos jvm_options
Browse files Browse the repository at this point in the history
This solves the mystery why macos used a different image backend
which caused the downsampling test to report a different set of
levels...

#23 (comment)
  • Loading branch information
ap-- committed Aug 2, 2020
1 parent 4faeccc commit d7df792
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
5 changes: 1 addition & 4 deletions paquo/jpype_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ def qupath_jvm_info_from_qupath_dir(qupath_dir: Path) -> QuPathJVMInfo:
app_dir = qupath_dir / "Contents" / "app"
runtime_dir = qupath_dir / "Contents" / "runtime" / "Contents" / "Home"
jvm_dir = runtime_dir / "lib" / "libjli.dylib" # not server/libjvm.dylib
jvm_options = [
f'-Djava.library.path={app_dir}:{qupath_dir}/Contents/MacOS',
f'-Djava.launcher.path={qupath_dir}/Contents/MacOS',
]
jvm_options = []

elif system == "Windows":
app_dir = qupath_dir / "app"
Expand Down
27 changes: 8 additions & 19 deletions paquo/tests/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,14 @@ def test_image_properties_from_image_server(image_entry):


def test_image_downsample_levels(image_entry):
# TODO INVESTIGATE: VERY STRANGE???
import platform
if platform.system() == "Darwin":
# ON OSX WE GET ONE DOWNSAMPLE LEVEL
levels = {
0: {'downsample': 1.0,
'height': 2967,
'width': 2220},
}
else:
# ON THE OTHER OSES IT'S TWO???
levels = {
0: {'downsample': 1.0,
'height': 2967,
'width': 2220},
1: {'downsample': 3.865438534407666,
'height': 768,
'width': 574},
}
levels = {
0: {'downsample': 1.0,
'height': 2967,
'width': 2220},
1: {'downsample': 3.865438534407666,
'height': 768,
'width': 574},
}
assert image_entry.downsample_levels == levels


Expand Down

0 comments on commit d7df792

Please sign in to comment.