Installation¶
Install from PyPi:
$ pip install django_mriAdd “django_mri” and “django_dicom” to your project’s INSTALLED_APPS setting:
<project>/settings.py¶INSTALLED_APPS = [ ..., "django_dicom", "django_mri", ]Note
django_mri uses django_dicom to manage data imported as DICOM files.
Include the app’s URLconf in your prject urls.py:
<project>/urls.py¶urlpatterns = [ ..., path("api/", include("django_mri.urls", namespace="mri")), ]Run:
$ python manage.py migrate[Optional] Load preconfigured sequence types and analyses:
Django shell¶>>> from django_mri.analysis.utils import load_mri_analyses >>> from django_mri.models import SequenceType >>> from django_mri.models.common_sequences import sequences # Create analyses and pipelines >>> load_mri_analyses() # Create common MRI sequence definitions >>> for sequence in sequences: >>> SequenceType.objects.create(**sequence)Start the development server and visit http://127.0.0.1:8000/admin/.