Skip to content

cornerstone: preview medical images online #23

Closed
@kousu

Description

@kousu

(moved from https://github.com/neuropoly/computers/issues/167#issuecomment-1272611388)
Use @cornerstonejs/nifti-image-loader to let Gitea preview medical scans the same way it can preview PDFs and SVGs and spreadsheets. Something like:

Screenshot 2022-10-13 at 17-16-14 https __www cornerstonejs org

This will help orient people when using our git with their datasets, making the process less abstract to them. It will also help people feel confident that git annex sync is behaving as they expect, which I think is important because git-annex is a pain.

I believe I need to patch this if-else tree

https://github.com/neuropoly/gitea/blob/88857cfa502057404c00e88eca2ba4aeab118c70/templates/repo/view_file.tmpl#L88-L105

to add a nifti case that loads and runs the cornerstone javascript. I have a starter demo of what needs to be loaded in https://gist.github.com/kousu/2a31328d9c320393fbd603534265faa7.

Then I will need to figure out how Gitea's frontend build process works (it's webpack I think?) so I can know how to serve cornerstone locally.

Later I would also like to add a toolbar like https://viewer.ohif.org/ has. Unfortunately this is going to be some manual work -- Cornerstone doesn't come with a UI library, all that had to be built on top as a wrapper package by the OHIF Viewer (even though they are also the people funding Cornerstone), so I'll need to replicate some of that work. I don't plan to be super fancy, just pan/zoom/scroll-through-slices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions