Skip to content

feat(zarr): add thumbnail generation#87

Open
LDeakin wants to merge 5 commits into
mainfrom
ld/feat/thumbnails
Open

feat(zarr): add thumbnail generation#87
LDeakin wants to merge 5 commits into
mainfrom
ld/feat/thumbnails

Conversation

@LDeakin

@LDeakin LDeakin commented Jun 12, 2026

Copy link
Copy Markdown
Member

Enabled by default. Uses the proposed Zarr thumbnail convention.

anu-ctlab-io ~/data/tomoLoRes.nc ~/data/tomoLoRes.zarr

.
├── 0
│   ├── c.0.0.0
│   └── zarr.json
├── thumbnails
│   ├── middle_xy_455x455.jpg
│   ├── middle_xz_455x204.jpg
│   └── middle_yz_455x204.jpg
└── zarr.json

zarr.json

  {
    "zarr_conventions": [
      {
        "schema_url": "https://raw.githubusercontent.com/zarr-conventions/thumbnails/refs/tags/v1/schema.json",
        "spec_url": "https://github.com/zarr-conventions/thumbnails/blob/v1/README.md",
        "uuid": "49326c01-1180-4743-b15f-f7157038a6ab",
        "name": "thumbnails",
        "description": "Metadata for thumbnails representing Zarr data"
      }
    ],
    "thumbnails": [
      {
        "width": 455,
        "height": 455,
        "media_type": "image/jpeg",
        "path": "thumbnails/middle_xy_455x455.jpg",
        "description": "Middle XY slice (downsampled)",
        "attributes": {
          "plane": "XY",
          "slice_axis": "z",
          "slice_index": 102,
          "plane_axes": [
            "y",
            "x"
          ],
          "lower_percentile": 1.0,
          "upper_percentile": 99.0,
          "lower_value": 10000.0,
          "upper_value": 15797.0,
          "full_resolution": false
        }
      },
      {
        "width": 455,
        "height": 204,
        "media_type": "image/jpeg",
        "path": "thumbnails/middle_xz_455x204.jpg",
        "description": "Middle XZ slice (downsampled)",
        "attributes": {
          "plane": "XZ",
          "slice_axis": "y",
          "slice_index": 227,
          "plane_axes": [
            "z",
            "x"
          ],
          "lower_percentile": 1.0,
          "upper_percentile": 99.0,
          "lower_value": 10000.0,
          "upper_value": 15797.0,
          "full_resolution": false
        }
      },
      {
        "width": 455,
        "height": 204,
        "media_type": "image/jpeg",
        "path": "thumbnails/middle_yz_455x204.jpg",
        "description": "Middle YZ slice (downsampled)",
        "attributes": {
          "plane": "YZ",
          "slice_axis": "x",
          "slice_index": 227,
          "plane_axes": [
            "z",
            "y"
          ],
          "lower_percentile": 1.0,
          "upper_percentile": 99.0,
          "lower_value": 10000.0,
          "upper_value": 15797.0,
          "full_resolution": false
        }
      }
    ]
  }

@LDeakin
LDeakin force-pushed the ld/feat/thumbnails branch from 9e190aa to 0f84199 Compare June 12, 2026 03:15
@LDeakin LDeakin changed the title feat: add Zarr thumbnail generation feat(zarr): add thumbnail generation Jun 12, 2026
LDeakin added 2 commits June 12, 2026 15:37
Enabled by default. Uses the proposed Zarr thumbnail convention.
@LDeakin
LDeakin force-pushed the ld/feat/thumbnails branch from 0f84199 to 6c0e733 Compare June 12, 2026 05:37
@LDeakin
LDeakin force-pushed the ld/feat/thumbnails branch from 002206d to 3028589 Compare June 12, 2026 06:05
# Conflicts:
#	CHANGELOG.md
#	pyproject.toml
#	src/anu_ctlab_io/zarr/_writer.py
#	tests/test_zarr_write.py
#	uv.lock
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.

1 participant