organoid_tracker.imaging.trackmate_io module

The TrackMate file format works as follows:

  • XML file with a root tag “TrackMate” <TrackMate version=”3.6.0”> - Subtag “Model”: <Model spatialunits=”µm” timeunits=”frame”>

    • Some default tags:
      <FeatureDeclarations>

      <SpotFeatures /> <EdgeFeatures /> <TrackFeatures />

      </FeatureDeclarations>

    • The positions: <AllSpots nspots=”1234”>

      <SpotsInFrame frame=”1”>
      <Spot FRAME=”1” ID=”1668” POSITION_T=”1.0” POSITION_X=”49.24473640416” POSITION_Y=”51.907814350324756”

      POSITION_Z=”64.18574949599984” QUALITY=”-1.0” RADIUS=”3” VISIBILITY=”1” name=”1668” />

      etc.

      </SpotsInFrame>

      </AllSpots>

    • The links: <AllTracks>

      <Track TRACK_ID=”1” name=”1”>

      <Edge SPOT_SOURCE_ID=”1668” SPOT_TARGET_ID=”1693” /> …

      </Track> ..

      </AllTracks> <FilteredTracks>

      <TrackID TRACK_ID=”1” />

      </FilteredTracks>

    • Subtag “Settings” - Subtag <ImageData filename=”a.xml” folder=”” height=”512” nframes=”326” nslices=”32” pixelheight=”0.32”

      pixelwidth=”0.32” voxeldepth=”2.0” timeinterval=”12” width=”512” />

      • Other tags to keep Trackmate happy:

        <InitialSpotFilter feature=”QUALITY” isabove=”true” value=”0.0” /> <SpotFilterCollection /> <TrackFilterCollection /> <AnalyzerCollection>

        <SpotAnalyzers /> <EdgeAnalyzers>

        <Analyzer key=”Edge target” />

        </EdgeAnalyzers> <TrackAnalyzers />

        </AnalyzerCollection>

      • Subtag “GUIState” <GUIState state=”ConfigureViews”>

        <View key=”HYPERSTACKDISPLAYER” />

        </GUIState>

organoid_tracker.imaging.trackmate_io.load_data_file(file_name: str, min_time_point: int, max_time_point: int, experiment: Optional[Experiment] = None) Experiment

Loads an XML file in the TrackMate format.

organoid_tracker.imaging.trackmate_io.save_tracking_data(experiment: Experiment, output_file: str)

Saves the tracking data to the TrackMate format, used by TrackMate, MaMut, Mastodon, LFTree and others.