Re: Exporting trackmate data using ImageJ/Jython script

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Exporting trackmate data using ImageJ/Jython script

Jean-Yves Tinevez-3
Hi Roy,

Ok I found the problem.

The tables return their item sorted by time (spot, edges at least). So you need to make sure that you compute the time feature for edges if you don't want to to fail.This means in your script add:


# Edge analyzer
settings.addEdgeAnalyzer(EdgeTargetAnalyzer())
settings.addEdgeAnalyzer(EdgeTimeLocationAnalyzer())

(without Target, you cannot save the TrackMate file btw)

and then 

ExportStatsToIJAction().execute(trackmate)

will work.

best
jy





On Sat, Jun 13, 2015 at 5:16 PM, Roy Francis <[hidden email]> wrote:
Hi Jean,
Thank you for your quick reply. ExportStatsToIJAction().execute(trackmate) doesn't seem to work. It doesn't matter what approach is used. Is there any way to save the three output data to a text file during batch process using script? If there is no way to do that, how can I have the result tables be opened in new windows during batch process so that I can manually save them at the end?
Thanks,
Roy 



Date: Sat, 13 Jun 2015 16:31:10 +0200
Subject: Re: Exporting trackmate data using ImageJ/Jython script
From: [hidden email]
To: [hidden email]




On Sat, Jun 13, 2015 at 4:17 PM, Roy Francis <[hidden email]> wrote:

Hi,
I am using trackmate to track some cells in image files. They seem to work fine using the GUI. But, I have a folder full of files and wish to run trackmate non-interactively as a batch.

I am using ImageJ macros to load images, convert avi to tiff sequence, convert to hyper stacks (for z-stack to time-stack) and then feed to the trackmate function which I created as a plugin based on instructions this page


Painfully, I have got it all to work except for the final part. The data exporting. Using the GUI, there is a button that opens three data tables for spot results, connections and track results. And once this is open it can be saved using IMJ macros.

How can I open these data and/or save them to a text file either using IMJ or Jython? I have the feeling the answer is ExportStatsToIJAction(). But, I have no idea how to use it. The help page 
is utterly unreadable and doesn't explain anything.

Any help is greatly appreciated. Full script below if required.


Hi Roy

I am afraid the action you mention cannot be used in an headless mode. It just generates the tables on ImageJ then you have to save them manually

If it is still what you want to to, try something in the lione of:

ExportStatsToIJAction().execute(trackmate)

best
jy


_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: Exporting trackmate data using ImageJ/Jython script

Jean-Yves Tinevez-3


On Sat, Jun 13, 2015 at 7:49 PM, Roy Francis <[hidden email]> wrote:
Hi Jean,
Yes. That seems to work. Adding the EdgeAnalyzers opens up the results windows. This is better than nothing.

But ideally, I would like for the results table to be automatically written to a text file such as tsv or csv etc.


You would have to do it yourself, either creating a new action in Java derived from the one we discussed, either by writing the Python code to generate this file. Indeed, as of now there is nothing automatic for the scripting approach.

Best
jy
 
 


_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel