TrackMate Scripting - 3D tracking on files separately

Hello everyone,

I have the following situation.

My Task:
I have a sequence of 840 z-Stacks (3d Data) each saved in a tif-file of size 90 MB. Each z-Stack/tif-file is one time point in a movie of cell organelles. I want to track the movement of the cell organells over time using TrackMate in Fiji.

My Problem:
I cannot load all tif-files of the sequence into Fiji at the same time, even if I adjust the maximum memory, since all files together are bigger than the working memory.

My Plan:
Write a Script where each tif-file is opened separately and the spots are detected. After that use the tracker only on the Spot data.
I tried to modify the first scripting example from the TrackMate documentation (Scripting TrackMate in Python, Chapter 9). When I open one of my tif-files (one time point) and run the script, I get an error
“java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double”. Maybe this is due to my data having one time point and 31 z-planes, when I swap z and t it works, but of course this is not what I want.

My Question:
Is it possible to detect spots on each tif-file (one time point) separately, then merge the spot data and run the tracker on the spot data? How would I do that? Is there better approach to my problem?

I would be very grateful for suggestions!