Skip to content

webknossos.dataset.properties

class DatasetViewConfiguration:

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

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.

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

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

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.

color: Union[Tuple[int, int, int], NoneType]

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

alpha: Union[float, NoneType]

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

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.

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

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

is_disabled: Union[bool, NoneType]

Disable a layer. The WEBKNOSSOS default is False.

is_inverted: Union[bool, NoneType]

Invert a layer. The WEBKNOSSOS default is False.

is_in_edit_mode: Union[bool, NoneType]

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

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

Method generated by attrs for class MagViewProperties.

path: Union[str, NoneType]
cube_length: Union[int, NoneType]
axis_order: Union[Dict[str, int], NoneType]
class AxisProperties:
AxisProperties(name: str, bounds: Tuple[int, int], index: int)

Method generated by attrs for class AxisProperties.

name: str
bounds: Tuple[int, int]
index: int
class LayerProperties:
LayerProperties( name: str, category: Literal['color', 'segmentation'], bounding_box: webknossos.geometry.nd_bounding_box.NDBoundingBox, element_class: str, data_format: webknossos.dataset.data_format.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.

name: str
category: Literal['color', 'segmentation']
element_class: str
num_channels: Union[int, NoneType]
default_view_configuration: Union[webknossos.dataset.properties.LayerViewConfiguration, NoneType]
class SegmentationLayerProperties(LayerProperties):
SegmentationLayerProperties( name: str, category: Literal['color', 'segmentation'], bounding_box: webknossos.geometry.nd_bounding_box.NDBoundingBox, element_class: str, data_format: webknossos.dataset.data_format.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.

largest_segment_id: Union[int, NoneType]
mappings: List[str]
class DatasetProperties:
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.

id: Dict[str, str]
scale: Tuple[float, float, float]
default_view_configuration: Union[webknossos.dataset.properties.DatasetViewConfiguration, NoneType]
dataset_converter = <cattrs.converters.Converter object>
def bbox_to_wkw(o):
def mag_unstructure(mag: webknossos.geometry.mag.Mag) -> List[int]:
def vec3int_to_array(o):
def mag_view_properties_post_unstructure(d: Dict[str, Any]) -> Dict[str, Any]:
def mag_view_properties_pre_structure(d: Dict[str, Any]) -> Dict[str, Any]:
def disambiguate_layer_properties(obj: dict, _: Any) -> webknossos.dataset.properties.LayerProperties: