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.ts: update with ome-zarr 0.5 #670

Merged
merged 6 commits into from
Nov 27, 2024
Merged

ome.ts: update with ome-zarr 0.5 #670

merged 6 commits into from
Nov 27, 2024

Conversation

joshmoore
Copy link
Contributor

RFC-2 has now been adopted. In preparation for the OME-Zarr 0.5 release, this PR wraps the NGFF metadata in the Zarr metadata within an "ome" block. This checks for that block and if it exists unwraps the necessary metadata if the Zarr version is 3.

Originally opened as #616

cc: @normanrz

The current proposal for updating OME-Zarr to support Zarr v3
wraps the NGFF metadata in the Zarr metadata within an "ome"
block. This checks for that block and if it exists unwraps
the necessary metadata.

This format is **not** finalized.

see: https://forum.image.sc/t/ome2024-ngff-challenge/97363
@joshmoore
Copy link
Contributor Author

Pushed a format fix.

@jbms
Copy link
Collaborator

jbms commented Nov 26, 2024

Thanks!

@jbms
Copy link
Collaborator

jbms commented Nov 27, 2024

Can you fix formatting with npm run format:fix ?

@joshmoore
Copy link
Contributor Author

TIL:

npm i prettier
npm run format:fix

Commit pushed

(and additional changes ignored)
diff --git a/src/ui/viewer_settings.ts b/src/ui/viewer_settings.ts
index 8744cb6f..a0c936f9 100644
--- a/src/ui/viewer_settings.ts
+++ b/src/ui/viewer_settings.ts
@@ -125,7 +125,10 @@ export class ViewerSettingsPanel extends SidePanel {
     );
     addCheckbox("Wire frame rendering", viewer.wireFrame);
     addCheckbox("Enable prefetching", viewer.chunkQueueManager.enablePrefetch);
-    addCheckbox("Enable adaptive downsampling", viewer.enableAdaptiveDownsampling);
+    addCheckbox(
+      "Enable adaptive downsampling",
+      viewer.enableAdaptiveDownsampling,
+    );
 
     const addColor = (label: string, value: WatchableValueInterface<vec3>) => {
       const labelElement = document.createElement("label");
diff --git a/src/util/framerate.spec.ts b/src/util/framerate.spec.ts
index e3b54839..6f96a4bb 100644
--- a/src/util/framerate.spec.ts
+++ b/src/util/framerate.spec.ts
@@ -71,10 +71,10 @@ describe("FrameRateCounter", () => {
       100,
       15,
     );
-    
+
     // Without any frames, the downsampling rate is 4
     expect(frameRateCounter.calculateDownsamplingRate()).toEqual(4);
-    
+
     // 80ms / 100ms < 1, so no downsampling
     for (let i = 0; i < 10; i++) {
       frameRateCounter.addFrame(i * 80);
@@ -86,19 +86,19 @@ describe("FrameRateCounter", () => {
       frameRateCounter.addFrame(i * 400);
     }
     expect(frameRateCounter.calculateDownsamplingRate()).toEqual(4);
-  
+
     // Better fps now, but the high rate persists for a while
     for (let i = 0; i < 10; i++) {
       frameRateCounter.addFrame(i * 50);
     }
     expect(frameRateCounter.calculateDownsamplingRate()).toEqual(4);
-    
+
     // The downsampling rate will eventually drop
     for (let i = 0; i < 10; i++) {
       frameRateCounter.addFrame(i * 50);
     }
     expect(frameRateCounter.calculateDownsamplingRate()).toEqual(1);
-    
+
     // If the frame rate is very bad, still caps at 8
     frameRateCounter.resetForNewFrameSet();
     expect(frameRateCounter.calculateDownsamplingRate()).toEqual(1);

@jbms jbms merged commit 0d767d1 into google:master Nov 27, 2024
21 of 22 checks passed
@joshmoore joshmoore deleted the ngff-0.5 branch November 27, 2024 19:25
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