Skip to content

get_seg_3d_volume

jaybgager edited this page Sep 30, 2026 · 1 revision

This function gets the volume of a segment in cubic micrometers using cached information from the L2 nodes of a datastack's chunkedgraph.

Arguments:

  • datastack (string, mandatory)
    • the name of the CAVE datastack the segment ID belongs to
  • seg_id (integer, mandatory)
    • the ID of the segment you want the 3D volume for

Returns:

  • vol (float)
    • the volume of the segment requested in cubic micrometers

Example

INPUT:

import tracertools as tt

volume = tt.get_seg_3d_volume(
    datastack = "brain_and_nerve_cord",
    seg_id = 720575941703820762,
)

print(volume)

OUTPUT:

770.08292352

Note

When looped repeatedly in a short time, as might happen when using this to get the volume for a long list of IDs, this function can get throttled by the CAVE service due to repeatedly setting the client. An update for batch submission is planned for the future, but for now, keep the request rate below 60/min.

Clone this wiki locally