Skip to content

Commit

Permalink
Use test inputs if no sample inputs exists
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Sep 28, 2023
1 parent 0f786ee commit 9463789
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/plugins/bioengine-test-run.imjoy.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@
const sampleInput = rdf.sample_inputs[0]
this.set_default_url(sampleInput)
}
else{
const testInputs = rdf.test_inputs[0]
this.set_default_url(testInputs)
}
this.setInfoPanel("")
this.setWaiting(false)
this.setButtonsDisabled(false)
Expand Down Expand Up @@ -553,6 +557,9 @@
_file.name = file_name
if file_name.endswith(".tif") or file_name.endswith(".tiff"):
image = imageio.volread(_file)
if file_name.endswith(".npy"):
image = np.load(_file)
image = image.squeeze()
else:
image = imageio.imread(_file)
await api.log(
Expand Down

0 comments on commit 9463789

Please sign in to comment.