traccuracy.loaders

Subpackage for loading tracking data into memory

This subpackage contains functions for loading ground truth or tracking method outputs into memory as TrackingGraph objects. Each loading function must return one TrackingGraph object which has a track graph and optionally contains a corresponding segmentation.

Package Contents

Functions

_check_ctc(tracks, detections, masks)

Sanity checks for valid CTC format.

_get_node_attributes(masks)

Calculates x,y,z,t,label for each detection in a movie.

_load_tiffs(data_dir)

Load a directory of individual frames into a stack.

load_ctc_data(data_dir[, track_path, name, run_checks])

Read the CTC segmentations and track file and create TrackingData.

traccuracy.loaders.load_ctc_data(data_dir, track_path=None, name=None, run_checks=True)[source]

Read the CTC segmentations and track file and create TrackingData.

Parameters:
  • data_dir (str) – Path to directory containing CTC tiffs.

  • track_path (optional, str) – Path to CTC track file. If not passed, finds *_track.txt in data_dir.

  • name (optional, str) – Name of data to store in TrackingGraph

  • run_checks (optional, bool) – If set to True (default), runs checks on the data to ensure valid CTC format.

Returns:

Object containing segmentations and graph.

Return type:

traccuracy.TrackingGraph

Raises:

ValueError – If run_checks is True, whenever any of the CTC format checks are violated. If run_checks is False, whenever any other Exception occurs while creating the graph.