Domain

class dendrotweaks.morphology.domains.Domain(name, type_idx, color)[source]

Bases: object

A class representing a morphological or functional domain in a neuron.

Parameters:
  • name (str) – The name of the domain.

  • type_idx (int) – The type index of the domain.

  • color (str) – The color of the domain.

property sections

A list of sections in the domain.

property name

The name of the domain.

property type_idx

The type index of the domain.

property color

The color of the domain.

add_section(sec: Section)[source]

Add a section to the domain.

Changes the domain attribute of the section.

Parameters:

sec (Section) – The section to be added to the domain.

remove_section(sec)[source]

Remove a section from the domain.

Sets the domain attribute of the section to None.

Parameters:

sec (Section) – The section to be removed from the domain.

is_empty()[source]

Check if the domain is empty.

Returns:

True if the domain is empty, False otherwise.

Return type:

bool