Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanguage committed Apr 19, 2024
1 parent f6cab16 commit f2350a3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
13 changes: 11 additions & 2 deletions public/plugins/chatbot-extension.imjoy.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,21 @@
type: "number",
description: "Diameter of the cells",
default: 60,
}
},
"model_type": {
type: "string",
description: "Model type, cyto or nuclei",
default: "cyto",
},
"flow_threshold": {
type: "number",
description: "Flow threshold",
default: 0.4,
},
},
};
},
execute: async (config) => {
debugger
const client = await this.getUfishClient()
const bioengine_runner = await this.getBioengineRunner()
const img = await client.getInputImage()
Expand Down
5 changes: 3 additions & 2 deletions public/plugins/ufish.imjoy.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@
await self.viewer.view_image(image, name=name)
return image.shape

async def process_enhanced(self, enh_img):
await self.viewer.view_image(enh_img, name="enhanced")
async def process_enhanced(self, enh_img, view_enhanced=True):
if view_enhanced:
await self.viewer.view_image(enh_img, name="enhanced")
df = call_spots_local_maxima(enh_img)
coords = df.values
self.enhanced_image = enh_img
Expand Down
3 changes: 2 additions & 1 deletion src/views/PredictView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export default {
_rshape: modelOut.dims,
_rvalue: (modelOut.data as Float32Array).buffer
}
const [enhBytes, coords, numSpots] = await plugin.value.process_enhanced(outImg)
const viewEnhanced = !isPluginMode()
const [enhBytes, coords, numSpots] = await plugin.value.process_enhanced(outImg, viewEnhanced)
output.value = {
enhanced: enhBytes,
coords: coords
Expand Down

0 comments on commit f2350a3

Please sign in to comment.