Skip to content

get_roots_from_points

jaybgager edited this page Sep 30, 2026 · 1 revision

This function gets the ID for the segment or supervoxel at each point in a list of point coordinates.

Arguments:

  • datastack (string, mandatory)
    • the name of the CAVE datastack the points coordinates are in
  • points (list of lists of integers, mandatory)
    • a list of point coordinates you want the root IDs for
    • e.g. [[1,2,3],[4,5,6],...]
  • sv (boolean, optional, default=False)
    • if set to True, returns supervoxel IDs
    • otherwise returns segment IDs by default

Returns:

  • root_ids (list of ints)
    • a list of the segment or supervoxel IDs at the locations requested
    • in the same order as the submitted point coordinates

Examples

Default Behavior (Segment IDs)

INPUT:

import tracertools as tt

seg_ids = tt.get_roots_from_points(
    datastack = "brain_and_nerve_cord",
    points = [
        [128563, 169944, 4093],
        [136207, 175201, 4812],
        [101370, 215228, 5264],
    ],
)

print(seg_ids)

OUTPUT:

[
    720575941643797624, 
    720575941429439959, 
    720575941561135887
]

Supervoxel IDs

INPUT:

import tracertools as tt

seg_ids = tt.get_roots_from_points(
    datastack = "brain_and_nerve_cord",
    points = [
        [128563, 169944, 4093],
        [136207, 175201, 4812],
        [101370, 215228, 5264],
    ],
    sv = True,
)

print(seg_ids)

OUTPUT:

[
    76426092181762338, 
    76707773517849702, 
    75512879390421881
]

Note

This output was generated on 2026/06/09 and may be different if this code is run in the future.

Clone this wiki locally