Skip to content

webknossos.dataset.properties

Classes:

AxisProperties

Attributes:

bounds instance-attribute

bounds: Tuple[int, int]

index instance-attribute

index: int

name instance-attribute

name: str

DatasetProperties

Methods:

Attributes:

data_layers instance-attribute

data_layers: List[Union[SegmentationLayerProperties, LayerProperties]]

default_view_configuration class-attribute instance-attribute

default_view_configuration: Optional[DatasetViewConfiguration] = None

id instance-attribute

id: Dict[str, str]

scale instance-attribute

scale: VoxelSize

update_for_layer

update_for_layer(layer_name: str, layer_properties: LayerProperties) -> None

DatasetViewConfiguration

Stores information on how the dataset is shown in webknossos by default.

Attributes:

four_bit class-attribute instance-attribute

four_bit: Optional[bool] = None

interpolation class-attribute instance-attribute

interpolation: Optional[bool] = None

loading_strategy class-attribute instance-attribute

loading_strategy: Optional[str] = None

position class-attribute instance-attribute

position: Optional[Tuple[int, int, int]] = None

render_missing_data_black class-attribute instance-attribute

render_missing_data_black: Optional[bool] = None

rotation class-attribute instance-attribute

rotation: Optional[Tuple[int, int, int]] = None

segmentation_pattern_opacity class-attribute instance-attribute

segmentation_pattern_opacity: Optional[int] = None

zoom class-attribute instance-attribute

zoom: Optional[float] = None

LayerProperties

Attributes:

bounding_box instance-attribute

bounding_box: NDBoundingBox

category instance-attribute

category: LayerCategoryType

data_format instance-attribute

data_format: DataFormat

default_view_configuration class-attribute instance-attribute

default_view_configuration: Optional[LayerViewConfiguration] = None

element_class instance-attribute

element_class: str

mags instance-attribute

mags: List[MagViewProperties]

name instance-attribute

name: str

num_channels class-attribute instance-attribute

num_channels: Optional[int] = None

resolutions property

resolutions: List[MagViewProperties]

LayerViewConfiguration

Stores information on how the dataset is shown in webknossos by default.

Attributes:

  • alpha (Optional[float]) –

    Alpha value from 0 to 100. The WEBKNOSSOS default is 100 except for segmentation

  • color (Optional[Tuple[int, int, int]]) –

    Color in RGB from 0 to 255. The WEBKNOSSOS default is [255, 255, 255].

  • intensity_range (Optional[Tuple[float, float]]) –

    Min and max data value range (dependent on the layer's data type). Can be used to threshold the value range.

  • is_disabled (Optional[bool]) –

    Disable a layer. The WEBKNOSSOS default is False.

  • is_in_edit_mode (Optional[bool]) –

    Enable the histogram edit mode. The WEBKNOSSOS default is False.

  • is_inverted (Optional[bool]) –

    Invert a layer. The WEBKNOSSOS default is False.

  • mapping (Optional[Dict[str, str]]) –

    Enables ID mapping for a segmentation layer and applies the selected mapping by default. The default WK behavior is to disable ID mapping. Expected values is a Dict with {"name": my_mapping_name, "type": "HDF5"}.

  • max (Optional[float]) –

    Maximum data value that might be encountered. This will restrict the histogram in WEBKNOSSOS and possibly overwrite

  • min (Optional[float]) –

    Minimum data value that might be encountered. This will restrict the histogram in WEBKNOSSOS and possibly overwrite

alpha class-attribute instance-attribute

alpha: Optional[float] = None

Alpha value from 0 to 100. The WEBKNOSSOS default is 100 except for segmentation layers where it is 20.

color class-attribute instance-attribute

color: Optional[Tuple[int, int, int]] = None

Color in RGB from 0 to 255. The WEBKNOSSOS default is [255, 255, 255].

intensity_range class-attribute instance-attribute

intensity_range: Optional[Tuple[float, float]] = None

Min and max data value range (dependent on the layer's data type). Can be used to threshold the value range. The WEBKNOSSOS default is the full value range.

is_disabled class-attribute instance-attribute

is_disabled: Optional[bool] = None

Disable a layer. The WEBKNOSSOS default is False.

is_in_edit_mode class-attribute instance-attribute

is_in_edit_mode: Optional[bool] = None

Enable the histogram edit mode. The WEBKNOSSOS default is False.

is_inverted class-attribute instance-attribute

is_inverted: Optional[bool] = None

Invert a layer. The WEBKNOSSOS default is False.

mapping class-attribute instance-attribute

mapping: Optional[Dict[str, str]] = None

Enables ID mapping for a segmentation layer and applies the selected mapping by default. The default WK behavior is to disable ID mapping. Expected values is a Dict with {"name": my_mapping_name, "type": "HDF5"}.

max class-attribute instance-attribute

max: Optional[float] = None

Maximum data value that might be encountered. This will restrict the histogram in WEBKNOSSOS and possibly overwrite the max value of the intensityRange (if that is higher).

min class-attribute instance-attribute

min: Optional[float] = None

Minimum data value that might be encountered. This will restrict the histogram in WEBKNOSSOS and possibly overwrite the min value of the intensityRange (if that is lower).

MagViewProperties

Attributes:

axis_order class-attribute instance-attribute

axis_order: Optional[Dict[str, int]] = None

cube_length class-attribute instance-attribute

cube_length: Optional[int] = None

mag instance-attribute

mag: Mag

path class-attribute instance-attribute

path: Optional[str] = None

resolution property

resolution: Mag

SegmentationLayerProperties

Bases: LayerProperties

Attributes:

bounding_box instance-attribute

bounding_box: NDBoundingBox

category instance-attribute

category: LayerCategoryType

data_format instance-attribute

data_format: DataFormat

default_view_configuration class-attribute instance-attribute

default_view_configuration: Optional[LayerViewConfiguration] = None

element_class instance-attribute

element_class: str

largest_segment_id class-attribute instance-attribute

largest_segment_id: Optional[int] = None

mags instance-attribute

mags: List[MagViewProperties]

mappings class-attribute instance-attribute

mappings: List[str] = []

name instance-attribute

name: str

num_channels class-attribute instance-attribute

num_channels: Optional[int] = None

resolutions property

resolutions: List[MagViewProperties]

VoxelSize

Methods:

Attributes:

factor class-attribute instance-attribute

factor: Tuple[float, float, float] = field(converter=float_tpl)

unit class-attribute instance-attribute

unit: LengthUnit = DEFAULT_LENGTH_UNIT

to_nanometer

to_nanometer() -> Tuple[float, float, float]

SegmentationLayerProperties

Bases: LayerProperties

Attributes:

bounding_box instance-attribute

bounding_box: NDBoundingBox

category instance-attribute

category: LayerCategoryType

data_format instance-attribute

data_format: DataFormat

default_view_configuration class-attribute instance-attribute

default_view_configuration: Optional[LayerViewConfiguration] = None

element_class instance-attribute

element_class: str

largest_segment_id class-attribute instance-attribute

largest_segment_id: Optional[int] = None

mags instance-attribute

mags: List[MagViewProperties]

mappings class-attribute instance-attribute

mappings: List[str] = []

name instance-attribute

name: str

num_channels class-attribute instance-attribute

num_channels: Optional[int] = None

resolutions property

resolutions: List[MagViewProperties]