tdd and readme#71
Conversation
| @@ -0,0 +1,585 @@ | |||
| # MRD Viz Technical Design | |||
|
|
|||
| Status: Draft | |||
There was a problem hiding this comment.
I would say this is no longer a draft :)
|
|
||
| Stage 1 should use external and existing logic carefully: | ||
|
|
||
| - Use `file-format/mrd/python/mrd/tools/minimal_example.py` as the reference for basic MRD header and stream reading. |
There was a problem hiding this comment.
these paths dont exist in the current repo so either take them out (or explicitly state they are not present) or reference the paths that do exist in this repo
| - validate that the header is present and the stream can be consumed | ||
| - classify files by stream item type, not filename | ||
| - extract one representative display plane from each MRD image stream item for the Stage 1 mosaic | ||
| - normalize complex, integer, or floating image data into grayscale 8-bit PNG output |
There was a problem hiding this comment.
we are relying on export_png_images.py to do this, correct?
|
|
||
| ### Local setup and rollout | ||
|
|
||
| Stage 1 setup should be Windows-first, with no architecture choices that prevent later macOS or Linux support. |
There was a problem hiding this comment.
I am not sure I understand what you mean by "windows first" - does it mean that the way you build and install an extension on vscode will be different depending on the OS? or do you simply mean that building locally in windows is different vs linux?
if I were to make a suggestion, i'd say build this for Linux first, it will likely be easier (you can use WSL) but let me know if I am missing a detail of why Windows should be first (I ask because both John and Joe have mac's so if the extension is specific to windows they likely wont be able to run it)
| - `mrd-viz image <path> --index <n>`: return one larger/full-resolution temporary PNG path and metadata for a selected mosaic tile. | ||
| - `mrd-viz classify <path>`: return a lightweight classification payload for batch workflows. | ||
| - `mrd-viz html <path> --output <html>`: write a static HTML mosaic harness for fast UI iteration before the VS Code frontend exists. | ||
| - `mrd-viz inspect <path>`: supported as a temporary alias for `open` while naming settles. |
There was a problem hiding this comment.
i'd say lets settle on a name now and call it good :) mrd-viz sounds good to me
| ```json | ||
| { | ||
| "ok": true, | ||
| "schema_version": 1, |
There was a problem hiding this comment.
did not see a section about backwards compatibility (sorry if I missed it), but need to answer questions like: will the extension reject unknown schema versions? Will it attempt best-effort rendering?
| - MRD reader: uses `mrd-python` as the only Stage 1 format parser. | ||
| - Summary JSON: carries schema version, file class, display mode, header summary, stream counts, warnings, raw-only states, and error envelopes. | ||
| - Preview PNG data: uses base64 PNGs for bounded thumbnails and temporary PNG paths for lazy full-size image requests. | ||
| - Webview UI: renders the mosaic, selected image, metadata panel, loading states, unsupported states, and controlled errors. |
There was a problem hiding this comment.
what error views are we going to support? I.e. it would be nice to explicitly list the expected errors we may get (wrong version, wrong format, error in the way file is formatted...there are probably more)
|
|
||
| ### Loading and caching | ||
|
|
||
| - Read eagerly: header, stream item counts, image metadata, acquisition examples, and up to 128 thumbnail PNGs for the image-item mosaic. |
There was a problem hiding this comment.
a bit misleading: you can read the header without reading the whole file, but you cannot get item counts without reading the whole file.
|
looks good - all the changes cover everything we talked about, thanks for including all that! a few follow up comments but nothing major. excited to try out a first version of the extension soon! |
added a brief readme and detailed technical design doc in docs/TECHNICAL_DESIGN.md. requesting review for the TDD to make sure everything looks good and is aligned with expectations.