Neuroglancer models

These are the Neuroglancer models that represent a mapping from the actual database tables to python classes, or ORM. (ORM: object relational mapping)


class neuroglancer.models.AlignmentScore(*args, **kwargs)

A model that holds the alignment score data.

Parameters

id (Auto) – ID

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.AnnotationAbstract(*args, **kwargs)

Abstract model for the 3 new annotation data models

Parameters
  • id (BigAuto) – id

  • x (Decimal) – X (um)

  • y (Decimal) – Y (um)

  • z (Decimal) – Z (um)

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

class neuroglancer.models.AnnotationArchive(active, created, id, animal, neuroglancer_model, brain_region, annotator, annotation_type, updated)
Parameters
  • active (Boolean) – DB column = active

  • created (DateTime) – DB column = created

  • id (BigAuto) – id

  • animal_id (ForeignKey) – DB column = FK_prep_id

  • neuroglancer_model_id (ForeignKey) – DB column = FK_state_id

  • brain_region_id (ForeignKey) – DB column = FK_structure_id

  • annotator_id (ForeignKey) – DB column = FK_annotator_id

  • annotation_type (Enum) – annotation type

  • updated (DateTime) – updated

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.AnnotationPointArchive(*args, **kwargs)

This class is for an archive of annotation points

Parameters
  • id (BigAuto) – id

  • x (Decimal) – X (um)

  • y (Decimal) – Y (um)

  • z (Decimal) – Z (um)

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

  • polygon_index (Char length=40) – polygon index

  • point_order (Integer) – point order

  • source (Char length=255) – source

  • cell_type_id (ForeignKey) – DB column = FK_cell_type_id

  • archive_id (ForeignKey) – DB column = FK_archive_set_id

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.AnnotationSession(*args, **kwargs)

This model describes a user session in Neuroglancer.

Parameters
  • active (Boolean) – DB column = active

  • created (DateTime) – DB column = created

  • id (BigAuto) – id

  • animal_id (ForeignKey) – DB column = FK_prep_id

  • neuroglancer_model_id (ForeignKey) – DB column = FK_state_id

  • brain_region_id (ForeignKey) – DB column = FK_structure_id

  • annotator_id (ForeignKey) – DB column = FK_annotator_id

  • annotation_type (Enum) – annotation type

  • updated (DateTime) – updated

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.AnnotationStatus(id)
Parameters

id (Auto) – ID

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.ArchiveSet(*args, **kwargs)

This class model is for set of archives. It gets used by the AnnotationPointArchive.

Parameters
  • active (Boolean) – DB column = active

  • created (DateTime) – DB column = created

  • id (BigAuto) – id

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.AtlasToBeth(*args, **kwargs)

A model that holds the alignment score data. This is another version of the alignment score and needs to be renamed.

Parameters

id (Auto) – ID

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.BrainRegion(*args, **kwargs)

This class model is for the brain regions or structures in the brain.

Parameters
  • active (Boolean) – DB column = active

  • created (DateTime) – DB column = created

  • id (BigAuto) – id

  • abbreviation (Char length=200) – abbreviation

  • description (Text length=2001) – description

  • color (PositiveInteger) – color

  • hexadecimal (Char length=7) – hexadecimal

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.BrainShape(*args, **kwargs)

This class will hold the numpy data for a brain region.

Parameters
  • active (Boolean) – DB column = active

  • created (DateTime) – DB column = created

  • id (BigAuto) – id

  • animal_id (ForeignKey) – DB column = prep_id

  • brain_region_id (ForeignKey) – DB column = FK_structure_id

  • dimensions (Char length=50) – dimensions

  • xoffset (Float) – xoffset

  • yoffset (Float) – yoffset

  • zoffset (Float) – zoffset

  • numpy_data (Text) – Array (pickle)

exception DoesNotExist
exception MultipleObjectsReturned
midsection()

This is a helper method to show what the mid part of a brain region will look like.

Returns

the HTML pointing to the thumbnail of the mid part of the brain region.

class neuroglancer.models.CellType(*args, **kwargs)

Model corresponding to the cell type table in the database

Parameters
  • id (BigAuto) – id

  • cell_type (Char length=200) – cell type

  • description (Text length=2001) – description

  • active (Integer) – active

  • created (DateTime) – created

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.MarkedCell(*args, **kwargs)

This model is for the marked cell points entered in Neuroglancer.

Inheritance

AnnotationAbstract

Parameters
  • id (BigAuto) – id

  • x (Decimal) – X (um)

  • y (Decimal) – Y (um)

  • z (Decimal) – Z (um)

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

  • source (Char length=25) – source

  • cell_type_id (ForeignKey) – DB column = FK_cell_type_id

exception DoesNotExist
exception MultipleObjectsReturned
class SourceChoices(value)

An enumeration.

class neuroglancer.models.MarkedCellWorkflow(*args, **kwargs)

This model is for the marked cell points workflow entered in Neuroglancer.

Inheritance

MarkedCells

Parameters
  • id (BigAuto) – id

  • x (Decimal) – X (um)

  • y (Decimal) – Y (um)

  • z (Decimal) – Z (um)

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

  • source (Char length=25) – source

  • cell_type_id (ForeignKey) – DB column = FK_cell_type_id

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.Points(*args, **kwargs)

Model corresponding to the annotation points table in the database

Parameters
  • id (BigAuto) – id

  • url (JSON) – Neuroglancer State

  • owner_id (ForeignKey) – DB column = person_id

  • public (Boolean) – DB column = active

  • readonly (Boolean) – Read only

  • created (DateTime) – created

  • updated (DateTime) – updated

  • user_date (Char length=25) – user date

  • comments (Char length=255) – comments

exception DoesNotExist
exception MultipleObjectsReturned
class neuroglancer.models.PolygonSequence(*args, **kwargs)

This model is for the polygons drawn by an anatomist in Neuroglancer.

Inheritance

AnnotationAbstract

Parameters
  • id (BigAuto) – id

  • x (Decimal) – X (um)

  • y (Decimal) – Y (um)

  • z (Decimal) – Z (um)

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

  • polygon_index (Char length=40) – polygon index

  • point_order (Integer) – point order

  • source (Char length=25) – source

exception DoesNotExist
exception MultipleObjectsReturned
class SourceChoices(value)

An enumeration.

class neuroglancer.models.StructureCom(*args, **kwargs)

This model is for the COMs for a structure (brain region). They are usually entered by an anatomist in Neuroglancer.

Inheritance

AnnotationAbstract

Parameters
  • id (BigAuto) – id

  • x (Decimal) – X (um)

  • y (Decimal) – Y (um)

  • z (Decimal) – Z (um)

  • annotation_session_id (ForeignKey) – DB column = FK_session_id

  • source (Char length=25) – source

exception DoesNotExist
exception MultipleObjectsReturned
class SourceChoices(value)

An enumeration.

class neuroglancer.models.UrlModel(*args, **kwargs)

Model corresponding to the neuroglancer json states stored in the neuroglancer_url table. This name was used as the original verion of Neuroglancer stored all the data in the URL.

Parameters
  • id (BigAuto) – id

  • url (JSON) – Neuroglancer State

  • owner_id (ForeignKey) – DB column = person_id

  • public (Boolean) – DB column = active

  • readonly (Boolean) – Read only

  • created (DateTime) – created

  • updated (DateTime) – updated

  • user_date (Char length=25) – user date

  • comments (Char length=255) – comments

exception DoesNotExist
exception MultipleObjectsReturned
property animal

Find the animal within the url between data/ and /neuroglancer_data: data/MD589/neuroglancer_data/C1

Returns

the first match if found, otherwise NA