Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway authored Nov 17, 2023
1 parent 7664e39 commit af7d778
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ await ij.viewImage(image)

If you pass raw bytes of an image in other formats, you need to specify the file name with the corresponding file extension. For example: `ij.viewImage(image_bytes, {"name": "my_image.png"})`.


#### Supporting 5D

The `viewImage` api only limited dimensions, e.g.: `z-stack, height, width`, however, more dimensions can be supported by running a macro to convert the image stack into a hyper stack.

See the following [javascript example](https://github.com/will-moore/omero-imjoy/blob/9ec52590b730d5246201de547ebb09c69147478a/omero_imjoy/templates/omero_imjoy/index.html#L174-L177):
```javascript
// encode the image data as an ndarray
await ij.viewImage({ _rtype: 'ndarray', _rdtype: dtype, _rshape: [sizeZ * sizeC * sizeT, sizeY, sizeX, 1], _rvalue: zarrPlanes.buffer });
await ij.runMacro(`run("Stack to Hyperstack...", "order=xyzct channels=${sizeC} slices=${sizeZ} frames=${sizeT} display=Grayscale");`)
```

### openVirtualStack(img)
**This function is in experimental state**

Expand Down

0 comments on commit af7d778

Please sign in to comment.