Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ome-zarr slice-view renderer package #34

Merged
merged 22 commits into from
Nov 20, 2024
Merged

Conversation

froyo-np
Copy link
Collaborator

@froyo-np froyo-np commented Oct 29, 2024

a super-quick renderer for 2D slices of 3-channel RGB images stored in the OME-ZARR format, following the example of the DZI renderer package.

TODO:

  • remove copied code from examples/common
  • remove (unused) rotation parameter?

Copy link
Collaborator

@lanesawyer lanesawyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple but renders!

Just some general cleanup items with demo location and setting up the package package.json like the other packages.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't matching the other packages. Should be parcel stuff instead in this one!

Copy link
Collaborator Author

@froyo-np froyo-np Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parcel seems incapable of building when importing zarrita - I tried to figure it out, but I lost that fight, which is why the examples package also does not use parcel. I figured since we're feeling good about vite elsewhere, and use it in the examples, I'd just roll with it. I seems to support building libraries/packages just fine

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turn out I was completely wrong about this - parcel is back in

packages/omezarr/src/sliceview/slice-renderer.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can go away once example piece is moved to examples

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines +3 to +11
"compilerOptions": {
"paths": {
"~/*": ["./*"]
},
"moduleResolution": "Bundler",
"module": "ES2022",
"target": "ES2022",
"lib": ["es2022", "DOM"]
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do it in this PR, I'm just thinking we might want a tsconfig.package.json file as well to get the common packaging stuff together!

froyo-np and others added 6 commits November 1, 2024 10:28
…build in library mode did - nothing else could import it.

move furnature around, build a short demo in the examples for omezarr slice viewing.
remove unused rotation prop for omezarr tile rendering
@TheMooseman TheMooseman marked this pull request as ready for review November 14, 2024 19:13
@froyo-np froyo-np requested a review from TheMooseman November 19, 2024 19:28

// find the tiles, in voxels, to request...
const allTiles = getAllTiles([tileSize, tileSize], size);
// TODO: this is a pretty slow, and also somewhat flickery way to do this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO now or later? Is this going to cause similar issues we saw with the dzi viewer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

): VoxelTile[] {
const uv = uvForPlane(plane);
const layer = pickBestScale(dataset, uv, camera.view, camera.screenSize);
// TODO: open the array, look at its chunks, use that size for the size of the tiles I request!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO now or later?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later - updated comment!

const uv = uvForPlane(plane);
// TODO (someday) open the array, look at its chunks, use that size for the size of the tiles I request!

const layer = pickBestScale(dataset, uv, camera.view, camera.screenSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for these comments!

Copy link
Contributor

@TheMooseman TheMooseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rendering is working for me and code looks good!

Copy link
Collaborator

@lanesawyer lanesawyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well commented, working great on Mac and Firefox, this is good to go!

@froyo-np froyo-np merged commit 45e7175 into main Nov 20, 2024
5 checks passed
@froyo-np froyo-np deleted the noah/ome-zarr-slice-viewer branch November 20, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants