Kitware / itk-vtk-viewer

2D / 3D web image, mesh, and point set viewer using itk-wasm and vtk.js
https://kitware.github.io/itk-vtk-viewer/
BSD 3-Clause "New" or "Revised" License
210 stars 64 forks source link

Fuse multiple images into Conglomerate image components #504

Closed PaulHax closed 2 years ago

PaulHax commented 2 years ago

To view multiple overlapping images at once: load an array of input images and "fuse" their components into a single vtkImageData in updateRenderedImage(). Can pass an array of images to createViewer

itkVtkViewer.createViewer({
   images: [imageUrlA, imageUrlB]
})

Or give comma separated list of images addresses to the url parameter http://localhost:8082/?image=test-data/HeadMRVolume.nrrd,test-data/HeadMRVolumeLabels.nrrd

Also, to support 4 components, up from 3, stop ImageMapper from generating mip-maps.

BREAKING CHANGE: readFiles() no longer returns { image: MultiscaleSpatialImage, ... } Instead returns { images: MultiscaleSpatialImage[], ... }. Also readFiles() no longer reads the image paramter, it reads images like so readFiles({ images: [imageUrlA, imageUrlB] })

oeway commented 2 years ago

Maybe related to this, do you think we can have an ImJoy api to allow add image to the viewer?

PaulHax commented 2 years ago

Maybe related to this, do you think we can have an ImJoy api to allow add image to the viewer?

Looks like setImage() is wired up for ImJoy. Kind of separate thing if that has issues.

PaulHax commented 2 years ago

Interesting test case with 27 components: http://localhost:8082/?image=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0054A/5025551.zarr

thewtex commented 2 years ago

Interesting test case with 27 components:

Add to test suite?

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 14.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: