layers
ngtools.layers
A neuroglancer scene with a programmatic interface.
LayerFactory
Bases: type
Metaclass for layers.
Layer
Bases: Wraps(Layer)
Base class for all layers.
See ImageLayer, SegmentationLayer, MeshLayer for
keyword-parameters specific to these layers types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_data
|
dict | Layer | LayerDataSource | str
|
Either a Layer (or its JSON representation), or a data source (or its JSON representation). |
required |
Other Parameters:
| Name | Type | Description |
|---|---|---|
type |
(image, segmentation, mesh, annotation, pointAnnotation)
|
Layer type -- guessed from source by default. |
source |
[list of] LayerDataSource | str
|
Data source. Except if layer is a |
layer_dimensions |
CoordinateSpace
|
Local dimensions specific to the layer. |
layer_position |
CoordinateSpace
|
Position within the local dimensions. |
local_velocity |
DimensionPlaybackVelocity
|
Speed for playback along local dimensions. |
tab |
str
|
|
panels |
list[LayerSidePanelState]
|
|
pick |
bool
|
|
tool_bindings |
dict[str, Tool | str]
|
Key binding to tools, specific to this layer. |
tool |
Tool | str
|
Active tool (or tool name). |
ImageLayer
Bases: _SourceMixin, Wraps(ImageLayer), Layer
Image layer.
See Layer for keyword parameters common to all layers.
Other Parameters:
| Name | Type | Description |
|---|---|---|
source |
[list of] LayerDataSource | str
|
|
shader |
str
|
|
shader_controls |
dict[str, float | dict | InvlerpParameters | TransferFunctionParameters]
|
|
opacity |
float
|
|
blend |
(default, additive)
|
|
volume_rendering_mode |
bool | {off, on, max, min}
|
|
volume_rendering_gain |
float
|
|
volume_rendering_depth_samples |
float
|
|
cross_section_render_scale |
float
|
|
SegmentationLayer
Bases: _SourceMixin, Wraps(SegmentationLayer), Layer
Segmentation layer.
See Layer for keyword parameters common to all layers.
Other Parameters:
| Name | Type | Description |
|---|---|---|
source |
[list of] LayerDataSource | str
|
|
starred_segments |
StarredSegments | dict[int, bool]
|
|
equivalences |
EquivalenceMap | list[list[int]]
|
|
hide_segment_zero |
bool
|
|
hover_highlight |
bool
|
|
base_segment_coloring |
bool
|
|
selected_alpha |
float
|
|
not_selected_alpha |
float
|
|
object_alpha |
float
|
|
saturation |
float
|
|
ignore_null_visible_set |
bool
|
|
skeleton_rendering |
SkeletonRenderingOptions | dict
|
shader : str, optional shader_controls : dict[str, float | dict | ng.InvlerpParameters | ng.TransferFunctionParameters] - InvlerpParameters: range: tuple[float, float] window: tuple[float, float] channel: list[int] - TransferFunctionParameters: window: tuple[float, float] channel: list[int] controlPoints : list[list[float]] defaultColor : str mode2d : {"lines", "lines_and_points"}, optional line_width2d : float, default=2 mode3d: {"lines", "lines_and_points"}, optional line_width3d : float, default=3 |
color_seed |
int
|
|
cross_section_render_scale |
float
|
|
mesh_render_scale |
float
|
|
mesh_silhouette_rendering |
float
|
|
segment_query |
str
|
|
segment_colors |
dict[uint64, str]
|
|
segment_default_color |
str
|
|
linked_segmentation_group |
str
|
|
linked_segmentation_color_group |
str | False
|
|
SkeletonLayerFactory
SkeletonLayer
Bases: SegmentationLayer
Skeleton layer.
TractLayer
Bases: SkeletonLayer
Tract layer.
MeshLayer
SingleMeshLayer
Bases: _SourceMixin, Wraps(SingleMeshLayer), MeshLayer
Single mesh layer.
See Layer for keyword parameters common to all layers.
See also: MeshLayer, MultiscaleMeshLayer.
Other Parameters:
| Name | Type | Description |
|---|---|---|
source |
[list of] LayerDataSource | str
|
|
vertex_attribute_sources |
list[str]
|
|
shader |
str
|
|
vertex_attribute_names |
list[str]
|
|
MultiscaleMeshLayer
Bases: SegmentationLayer
Multiscale mesh layer.
See also: MeshLayer, SingleMeshLayer.
Other Parameters:
| Name | Type | Description |
|---|---|---|
render_scale |
float
|
|
silhouette_rendering |
float
|
|
AnnotationLayer
Bases: _SourceMixin, Wraps(AnnotationLayer), Layer
Annotation layer.
See Layer for keyword parameters common to all layers.
Other Parameters:
| Name | Type | Description |
|---|---|---|
source |
[list of] LayerDataSource | str
|
|
annotations |
list[AnnotationBase | dict]
|
|
annotation_properties |
list[AnnotationPropertySpec | dict]
|
id : str type : str description : str default : float | str enum_values : list[int | str] enum_labels : list[str] |
annotation_relationships |
list[str]
|
|
linked_segmentation_layer |
dict[str, str]
|
|
filter_by_segmentation |
list[str]
|
|
ignore_null_segment_filter |
bool
|
|
shader |
str
|
|
shader_controls |
dict[str, float | dict | InvlerpParameters | TransferFunctionParameters]
|
|
TractAnnotationLayer
Bases: AnnotationLayer
Tract annotation layer.
LocalAnnotationLayer
Bases: Wraps(LocalAnnotationLayer), AnnotationLayer
TODO.