This repo contains the source code building the mridata.org website. The only codes that are not public are GE Orchestra code, and AWS related code.
A local server can be set up using Docker, to test and extend features.
Install Docker Community Edition for your platform:
https://docs.docker.com/engine/installation/
Install docker-compose for your platform:
https://docs.docker.com/compose/install/#install-compose
Clone the repo, go to that directory.
If you want to convert GE files, you will need to put the orchestra-sdk-1.10-1
folder under the directory.
To launch the web servers, run:
docker-compose build
docker-compose up
The first time would take a long time to build. The website can be accessed at http://127.0.0.1:8000
Django is used for web framework and development.
PostgresSQL is used for database, storing user and data information.
Celery is used for distributed task queueing, including for ISMRMRD conversion, parameter extraction, and thumbnail generation.
Redis is used as a message worker for Django, and Celery.
Each of these packages (Django, PostgresSQL, Celery, and Redis) runs in their own Docker images (web, postgres, worker, redis).
models.py contains two main models. Data, which contains scan parameters and links to thumbnails and the final ISMRMD data file. And TempData, which links to the temporary uploaded data, and has four sub-classes: GeData, SiemensData, PhilipsData, and IsmrmrdData.
tasks.py contains backend processing tasks, including ISMRMRD conversion, and thumbnail extraction. Failure of ISMRMRD conversion traces back to here.
views.py contains how GET and POST requests are processed for each page.
filters.py contains filter options on the main page.
forms.py contains upload form options.
pip install \
boto3 \
celery \
django \
django-el-pagination \
django-s3direct \
django-taggit \
django-registration-redux \
django-widget-tweaks \
ismrmrd \
numpy \
pillow \
psycopg2 \
redis