Reference

Submodules

django_mri.admin module

Registers various admin models to generate the app’s admin site interface.

References

class django_mri.admin.ScanAdmin(model, admin_site)

Bases: django.contrib.admin.options.ModelAdmin

Adds the Scan to the admin interface.

list_display = ('id', 'subject', 'time', 'number', 'description')

Fields displayed on the change list page of the admin.

media
ordering = ('subject', 'time', 'number')

List ordering in the Django admin views.

django_mri.apps module

Definition of the DjangoMriConfig class.

References

class django_mri.apps.DjangoMriConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

django_mri app configuration.

References

name = 'django_mri'

Full Python path to the application.

ready()

Loads the app’s signals.

References

verbose_name = 'MRI Data Management'

Human-readable name for the application.

django_mri.signals module

Signal receivers.

References

django_mri.signals.scan_post_save_receiver(sender: django.db.models.base.Model, instance: django_mri.models.scan.Scan, created: bool, **kwargs) → None

Creates a new subject automatically if a subject was not assigned and a DICOM series is accessible by extracting the Patient information.

Parameters:
  • sender (Model) – The Scan model
  • instance (Scan) – Scan instance
  • created (bool) – Whether the scan instance was created or not
django_mri.signals.series_post_save_receiver(sender: django.db.models.base.Model, instance: django_dicom.models.series.Series, created: bool, **kwargs) → None

Create a new Scan for any created DICOM Series in case one doesn’t exist.

Parameters:
  • sender (Model) – The Series model
  • instance (Series) – Series instance
  • created (bool) – Whether the series instance was created or not

django_mri.urls module

The app’s URLs configuration.

References

django_mri.urls.path(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)
django_mri.urls.router = <rest_framework.routers.DefaultRouter object>

Automatic URL routing using Django REST Framework.

References