question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support more viewer options in the ImJoy API

See original GitHub issue

Would be nice to be able to pass viewer options when creating the viewer window including cmap, ui_collapsed, rotate, axes, mode etc. Just like the options accepted by the view function in the itkwidgets,

This can be passed as config:

const viewer = await api.createWindow({
  src: "https://kitware.github.io/itk-vtk-viewer/app/",
  config: {...viewer options...},
  data: { image: imageArray }
})

For updating the options later, perhaps would be also nice to have setConfig (and getConfig).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
thewtexcommented, Nov 4, 2020

👍 👍 support for this in #343

1reaction
oewaycommented, Dec 22, 2020

The pause for the viewer initialization appears to be in the data transfer. Is there a way that the imjoy-rpc codec system could be used to pass progress callbacks? We could then not only show a spinner but also the transfer progress for the default network transfer. Also, a custom codec (zarr-blosc) could emit progress information based on the number of transferred, decompressed, chunks?

For custom codec, we can directly emit progress in the encoder/decoder function. For the transfer progress, typically we just send the data through a certain transport layer (e.g. jupyter or socketio) without knowing the progress. However, I think we can easily support that by changing the way we send data, for example, say we want to send a numpy array to another peer, instead of directly sending the data, we can send a getChunk function together with its total length, then the other peer can fetch data chunk by chunk. We can then easily add a callback function in the getChunk function to report the progress. This can be done by a custom codec, or we can do it directly by default, we will need to think about the api though. Any idea on how the api should look like?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImJoy Docs: Interactive Documentation Made Easy!
In the ImJoyPlugin instruction, you can pass additional options. More specifically, they can be any options for the <config> block of an ImJoy...
Read more >
Interactive Microscopy Control with ImJoy - Pycro-Manager
The returned viewer object contains a set of API functions exported by the itk-vtk-viewer plugin, and we will call viewer.imshow() for displaying images...
Read more >
https://raw.githubusercontent.com/imjoy-team/imjoy...
ImJoy API Every plugin runs in its own sandbox-like container environment (web worker or iframe for JavaScript, process for Python).
Read more >
ImJoy - ImageJ Wiki
The most common way to build ImJoy is to provide a plugin file. ... We support two-way integration: 1) connect existing web app...
Read more >
Overview - ImJoy
Checkout the documentation for how to get started and more details for how to ... Support Javascript, native Python and web Python; Concurrent...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found