Description
(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:
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
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.