How to use the neuroglancer.row_layout function in neuroglancer

To help you get started, we’ve selected a few neuroglancer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / neuroglancer / python / examples / synaptic_partners.py View on Github external
s.projection_orientation = [0.63240087, 0.01582051, 0.05692779, 0.77238464]
            s.dimensions = dimensions
            s.position = [3000, 3000, 3000]
            s.layers['image'] = neuroglancer.ImageLayer(
                source='precomputed://gs://neuroglancer-public-data/flyem_fib-25/image',
            )
            s.layers['ground_truth'] = neuroglancer.SegmentationLayer(
                source='precomputed://gs://neuroglancer-public-data/flyem_fib-25/ground_truth',
            )
            s.layers['partners'] = neuroglancer.SegmentationLayer(
                source='precomputed://gs://neuroglancer-public-data/flyem_fib-25/ground_truth',
            )
            s.layers['synapses'] = neuroglancer.LocalAnnotationLayer(
                dimensions=dimensions,
                linked_segmentation_layer='ground_truth')
            s.layout = neuroglancer.row_layout([
                neuroglancer.LayerGroupViewer(
                    layout='xy',
                    layers=['image', 'ground_truth', 'partners', 'synapses'],
                ),
                neuroglancer.LayerGroupViewer(
                    layout='3d',
                    layers=['ground_truth', 'synapses'],
                ),
                neuroglancer.LayerGroupViewer(
                    layout='3d',
                    layers=['partners', 'synapses'],
                ),
            ])

        self.selected_segments = frozenset()
        self.viewer.shared_state.add_changed_callback(
github google / neuroglancer / python / neuroglancer / tool / agglomeration_split_tool.py View on Github external
def _update_state(self, s):
        self.cached_split_result.update()
        self.state.save()
        _set_viewer_seeds(s, self.cached_split_result.seeds)

        s.layers['unused'].segments = self.state.unused_supervoxels
        s.layers['original'].segments = self.cached_split_result.supervoxels
        s.layers['split-result'].segments = self.cached_split_result.supervoxels
        split_result = self.cached_split_result.split_result
        if split_result is not None:
            self._show_split_result(
                s,
                cur_eqs=split_result['cur_eqs'],
            )
        s.layout = neuroglancer.row_layout([
            neuroglancer.LayerGroupViewer(
                layout='3d',
                layers=['image', 'original', 'unused', 'inclusive-seeds', 'exclusive-seeds']),
            neuroglancer.LayerGroupViewer(
                layout='3d', layers=['image', 'split-result', 'inclusive-seeds',
                                     'exclusive-seeds']),
        ])