agencyenterprise / neurotechdevkit

Neurotech Development Kit (NDK)
https://agencyenterprise.github.io/neurotechdevkit/
Apache License 2.0
117 stars 10 forks source link

Implementing web UI #144

Closed NewtonSander closed 3 months ago

NewtonSander commented 1 year ago

Introduction

Added a web UI to interact with NDK with the following functionalities:

Running it

After installing the dependencies with poetry install and poetry run pip install git+https://github.com/trustimaging/stride@2520c59, run make web

Loading CT Scans

  1. Download and extract ct-scans.zip anywhere in your computer
  2. Start the web server by running make web
  3. Click the CT Scan toggle
  4. Select the pair of files with the same name from the extracted folder to make the upload.

    One of the files is the .nii or .zip archive with the dicom files, the other file has to be a .json containing the mapping between the material layer names and the layer number, like this:

    {  
        "water": 0,
        "brain": 1,
        "trabecular_bone": 2
    }

    After performing the upload, the CT scan is available on the CT Scan section of the web interface

CT Loading example

load_ct

Running on Docker

The documentation on this PR was updated to run the NDK UI on docker, but the docker image will only be generated when this PR is merged. So if you want to test/run the UI on docker you will have to manually execute these two steps on the project folder:

docker build . -t ndk_with_web
docker run -w /ndk -p8080:8080 ndk_with_web python src/web/app.py
codecov-commenter commented 1 year ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/neurotechdevkit/materials.py 95.23% <ø> (ø)
src/neurotechdevkit/rendering/_formatting.py 100.00% <100.00%> (+50.00%) :arrow_up:
src/neurotechdevkit/rendering/_source.py 85.45% <100.00%> (+52.72%) :arrow_up:
src/neurotechdevkit/rendering/_target.py 96.87% <100.00%> (+62.50%) :arrow_up:
src/neurotechdevkit/rendering/layout.py 100.00% <100.00%> (+64.10%) :arrow_up:
src/neurotechdevkit/rendering/legends.py 97.91% <100.00%> (+50.09%) :arrow_up:
src/neurotechdevkit/results/_metrics.py 100.00% <100.00%> (ø)
src/neurotechdevkit/scenarios/__init__.py 100.00% <100.00%> (ø)
.../neurotechdevkit/scenarios/built_in/_scenario_1.py 98.46% <ø> (ø)
.../neurotechdevkit/scenarios/built_in/_scenario_2.py 98.88% <ø> (ø)
... and 6 more

... and 1 file with indirect coverage changes

:loudspeaker: Thoughts on this report? Let us know!