Skip to content

Commit

Permalink
Merge pull request #90 from /issues/89
Browse files Browse the repository at this point in the history
Fix demo script.
  • Loading branch information
mcquin authored Sep 27, 2017
2 parents e70392d + 9f5a41f commit 3cca4e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions bioformats/log4j.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Python-bioformats is distributed under the GNU General Public
# License, but this file is licensed under the more permissive BSD
# license. See the accompanying file LICENSE for details.
#
#
# Copyright (c) 2009-2014 Broad Institute
# All rights reserved.

import javabridge

def basic_config():
'''Configure logging for "WARN" level'''
javabridge.JClassWrapper("loci.common.Log4jTools").enableLogging("WARN")
log4j = javabridge.JClassWrapper("loci.common.Log4jTools")
log4j.enableLogging()
log4j.setRootLevel("WARN")
9 changes: 7 additions & 2 deletions demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
try:
log4j.basic_config()
if len(sys.argv) < 2:
image_path = os.path.join(os.path.dirname(bioformats.__file__), 'tests',
'Channel1-01-A-01.tif')
image_path = os.path.join(
os.path.dirname(bioformats.__file__),
'..',
'tests',
'resources',
'Channel1-01-A-01.tif'
)
else:
image_path = sys.argv[1]
image, scale = bioformats.load_image(image_path, rescale=False,
Expand Down

0 comments on commit 3cca4e6

Please sign in to comment.