Hi,
My Question: Is there a way to directly create a 4D file from a numpy array in python which is directly readable by TrackMate?
A little context: I created a custom spot detection in Python and would like to directly export it into a TrackMate XML file with jinja2 (because these were the tools I used the last years and was a little afraid about the learning how to modify the existing jython script.)
(Basically, I have done what was proposed here)
The spot import works as expected, the only problem is the creation of the TrackMate Hyperstack which is indicated in the (jinja2) XML template by:
<ImageData filename="{{ int_data_file }}" folder="{{ int_data_folder}}" width="{{ width }}" height="{{ height }}" nslices="{{ n_slices }}" nframes="{{ n_frames }}" pixelwidth="{{ dx }}" pixelheight="{{ dy }}" voxeldepth="{{ dz }}" timeinterval="1.0" />
Currently, I write a 3D tiff with the dimensions (T*Z, Y, X) from a numpy array, convert it in Fiji to a Hyperstack, and save it as .zip (just because it works). However, I would like to automate the file generation process.
I read that TrackMate can read normal imagej tiffs.
Best wishes,
Eric
PS: My Jinja2 template:
template_TrackMate.xml (9.7 KB)