django_dicom package — django_dicom 0.1.0 documentation

# django_dicom package

## Module contents

Manages DICOM files by creating Django models to represent the various DICOM entities (see django_dicom.models package for more information). Also provides the django_dicom.data_import package for supervising the maintenance of these models when importing new data, and a few more utility modules meant to help retrieving DICOM data easily and efficiently.

## Subpackages

- django_dicom.data_import package
  - Module contents
  - Submodules
  - django_dicom.data_import.import_image module
  - django_dicom.data_import.local_import module
- django_dicom.filters package
  - Module contents
  - Submodules
  - django_dicom.filters.image_filter module
- django_dicom.models package
  - Module contents
  - Submodules
  - django_dicom.models.choice_enum module
  - django_dicom.models.dicom_entity module
  - django_dicom.models.fields module
  - django_dicom.models.help_text module
  - django_dicom.models.image module
  - django_dicom.models.patient module
  - django_dicom.models.series module
  - django_dicom.models.study module
  - django_dicom.models.validators module
- django_dicom.reader package
  - Module contents
  - Subpackages
  - Submodules
  - django_dicom.reader.header_information module
  - django_dicom.reader.parser module
  - django_dicom.reader.value_representation module
- django_dicom.serializers package
  - Module contents
  - Submodules
  - django_dicom.serializers.image_serializer module
  - django_dicom.serializers.patient_serializer module
  - django_dicom.serializers.series_serializer module
  - django_dicom.serializers.study_serializer module

## Submodules

## django_dicom.admin module

class `django_dicom.admin.` `ImageAdmin`(model, admin_site)

  Bases: `django.contrib.admin.options.ModelAdmin`

  `list_display` = ('id', 'uid', 'series', 'number', 'date', 'time')
  `media`
  `ordering` = ['-date', '-series', 'number']
  `readonly_fields` = ['uid']

class `django_dicom.admin.` `ImageInLine`(parent_model, admin_site)

  Bases: `django.contrib.admin.options.TabularInline`

  `exclude` = ('uid', 'date', 'time')
  `media`
  `model`

    alias of `django_dicom.models.image.Image`

  `ordering` = ['number']

class `django_dicom.admin.` `PatientAdmin`(model, admin_site)

  Bases: `django.contrib.admin.options.ModelAdmin`

  `fieldsets` = ((None, {'fields': ('uid',)}), ('Name', {'fields': ('name_prefix', 'given_name', 'middle_name', 'family_name', 'name_suffix')}), ('Personal Information', {'fields': ('sex', 'date_of_birth')}))
  `inlines` = (<class 'django_dicom.admin.SeriesInLine'>,)
  `list_display` = ('id', 'uid', 'given_name', 'family_name', 'sex', 'date_of_birth')
  `media`

class `django_dicom.admin.` `SeriesAdmin`(model, admin_site)

  Bases: `django.contrib.admin.options.ModelAdmin`

  `inlines` = (<class 'django_dicom.admin.ImageInLine'>,)
  `list_display` = ('id', 'uid', 'date', 'time', 'number', 'description')
  `media`
  `ordering` = ['-date', '-time']
  `readonly_fields` = ['uid']

class `django_dicom.admin.` `SeriesInLine`(parent_model, admin_site)

  Bases: `django.contrib.admin.options.TabularInline`

  `fields` = ('date', 'number', 'description', 'scanning_sequence', 'sequence_variant', 'repetition_time', 'echo_time', 'inversion_time')
  `media`
  `model`

    alias of `django_dicom.models.series.Series`

  `ordering` = ['date', 'number']

class `django_dicom.admin.` `StudyAdmin`(model, admin_site)

  Bases: `django.contrib.admin.options.ModelAdmin`

  `inlines` = (<class 'django_dicom.admin.StudySeriesInLine'>,)
  `list_display` = ('id', 'uid', 'description')
  `media`
  `readonly_fields` = ['uid']

class `django_dicom.admin.` `StudySeriesInLine`(parent_model, admin_site)

  Bases: `django.contrib.admin.options.TabularInline`

  `fields` = ('patient', 'date', 'number', 'description', 'scanning_sequence', 'sequence_variant')
  `media`
  `model`

    alias of `django_dicom.models.series.Series`

  `ordering` = ['patient', 'date', 'number']

## django_dicom.apps module

class `django_dicom.apps.` `DjangoDicomConfig`(app_name, app_module)

  Bases: `django.apps.config.AppConfig`

  `data_extension` = 'dcm'
  `name` = 'django_dicom'

## django_dicom.urls module

`django_dicom.urls.` `path`(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)

## django_dicom.utils module

class `django_dicom.utils.` `NumpyEncoder`(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)

  Bases: `json.encoder.JSONEncoder`

  Converts NumPy array to a JSON serializable nested list. Based on this SO answer.

  `default`(obj)

    Implement this method in a subclass such that it returns a serializable object for `o`, or calls the base implementation (to raise a `TypeError`).

    For example, to support arbitrary iterators, you could implement default like this:

        def default(self, o):
            try:
                iterable = iter(o)
            except TypeError:
                pass
            else:
                return list(iterable)
            # Let the base class default method raise the TypeError
            return JSONEncoder.default(self, o)

`django_dicom.utils.` `snake_case_to_camel_case`(string: str) → str

## django_dicom.views module