Skip to content

webknossos.dataset.properties

# &nbsp class DatasetViewConfiguration:

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

# &nbsp DatasetViewConfiguration( four_bit: Union[bool, NoneType] = None, interpolation: Union[bool, NoneType] = None, render_missing_data_black: Union[bool, NoneType] = None, loading_strategy: Union[str, NoneType] = None, segmentation_pattern_opacity: Union[int, NoneType] = None, zoom: Union[float, NoneType] = None, position: Union[Tuple[int, int, int], NoneType] = None, rotation: Union[Tuple[int, int, int], NoneType] = None )

Method generated by attrs for class DatasetViewConfiguration.

# &nbsp four_bit: Union[bool, NoneType]
# &nbsp interpolation: Union[bool, NoneType]
# &nbsp render_missing_data_black: Union[bool, NoneType]
# &nbsp loading_strategy: Union[str, NoneType]
# &nbsp segmentation_pattern_opacity: Union[int, NoneType]
# &nbsp zoom: Union[float, NoneType]
# &nbsp position: Union[Tuple[int, int, int], NoneType]
# &nbsp rotation: Union[Tuple[int, int, int], NoneType]
# &nbsp class LayerViewConfiguration:

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

# &nbsp LayerViewConfiguration( color: Union[Tuple[int, int, int], NoneType] = None, alpha: Union[float, NoneType] = None, intensity_range: Union[Tuple[float, float], NoneType] = None, min: Union[float, NoneType] = None, max: Union[float, NoneType] = None, is_disabled: Union[bool, NoneType] = None, is_inverted: Union[bool, NoneType] = None, is_in_edit_mode: Union[bool, NoneType] = None )

Method generated by attrs for class LayerViewConfiguration.

# &nbsp color: Union[Tuple[int, int, int], NoneType]

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

# &nbsp alpha: Union[float, NoneType]

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

# &nbsp intensity_range: Union[Tuple[float, float], NoneType]

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.

# &nbsp min: Union[float, NoneType]

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).

# &nbsp max: Union[float, NoneType]

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).

# &nbsp is_disabled: Union[bool, NoneType]

Disable a layer. The WEBKNOSSOS default is False.

# &nbsp is_inverted: Union[bool, NoneType]

Invert a layer. The WEBKNOSSOS default is False.

# &nbsp is_in_edit_mode: Union[bool, NoneType]

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

# &nbsp class MagViewProperties:
# &nbsp MagViewProperties( mag: webknossos.geometry.mag.Mag, cube_length: Union[int, NoneType] = None, axis_order: Union[Dict[str, int], NoneType] = None )

Method generated by attrs for class MagViewProperties.

# &nbsp cube_length: Union[int, NoneType]
# &nbsp axis_order: Union[Dict[str, int], NoneType]
# &nbsp class LayerProperties:
# &nbsp LayerProperties( name: str, category: typing_extensions.Literal['color', 'segmentation'], bounding_box: webknossos.geometry.bounding_box.BoundingBox, element_class: str, data_format: webknossos.dataset._array.DataFormat, mags: List[webknossos.dataset.properties.MagViewProperties], num_channels: Union[int, NoneType] = None, default_view_configuration: Union[webknossos.dataset.properties.LayerViewConfiguration, NoneType] = None )

Method generated by attrs for class LayerProperties.

# &nbsp name: str
# &nbsp category: typing_extensions.Literal['color', 'segmentation']
# &nbsp element_class: str
# &nbsp num_channels: Union[int, NoneType]
# &nbsp default_view_configuration: Union[webknossos.dataset.properties.LayerViewConfiguration, NoneType]
# &nbsp class SegmentationLayerProperties(LayerProperties):
# &nbsp SegmentationLayerProperties( name: str, category: typing_extensions.Literal['color', 'segmentation'], bounding_box: webknossos.geometry.bounding_box.BoundingBox, element_class: str, data_format: webknossos.dataset._array.DataFormat, mags: List[webknossos.dataset.properties.MagViewProperties], num_channels: Union[int, NoneType] = None, default_view_configuration: Union[webknossos.dataset.properties.LayerViewConfiguration, NoneType] = None, largest_segment_id: Union[int, NoneType] = None, mappings: List[str] = [] )

Method generated by attrs for class SegmentationLayerProperties.

# &nbsp largest_segment_id: Union[int, NoneType]
# &nbsp mappings: List[str]
# &nbsp class DatasetProperties:
# &nbsp DatasetProperties( id: Dict[str, str], scale: Tuple[float, float, float], data_layers: List[Union[webknossos.dataset.properties.SegmentationLayerProperties, webknossos.dataset.properties.LayerProperties]], default_view_configuration: Union[webknossos.dataset.properties.DatasetViewConfiguration, NoneType] = None )

Method generated by attrs for class DatasetProperties.

# &nbsp id: Dict[str, str]
# &nbsp scale: Tuple[float, float, float]
# &nbsp default_view_configuration: Union[webknossos.dataset.properties.DatasetViewConfiguration, NoneType]
# &nbsp def bbox_to_wkw(o):
# &nbsp def mag_unstructure(mag: webknossos.geometry.mag.Mag) -> List[int]:
# &nbsp def vec3int_to_array(o):
# &nbsp def mag_view_properties_post_structure(d: Dict[str, Any]) -> Dict[str, Any]:
# &nbsp def mag_view_properties_pre_unstructure(d: Dict[str, Any]) -> Dict[str, Any]:
# &nbsp def disambiguate_layer_properties(obj: dict, _: Any) -> webknossos.dataset.properties.LayerProperties:
# &nbsp cls( name: str, category: typing_extensions.Literal['color', 'segmentation'], bounding_box: webknossos.geometry.bounding_box.BoundingBox, element_class: str, data_format: webknossos.dataset._array.DataFormat, mags: List[webknossos.dataset.properties.MagViewProperties], num_channels: Union[int, NoneType] = None, default_view_configuration: Union[webknossos.dataset.properties.LayerViewConfiguration, NoneType] = None, largest_segment_id: Union[int, NoneType] = None, mappings: List[str] = [] )

Method generated by attrs for class SegmentationLayerProperties.

# &nbsp largest_segment_id: Union[int, NoneType]
# &nbsp mappings: List[str]