Problem getting the context

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

Problem getting the context

Thorsten Wagner
Dear List, dear Brian,

we currently came across problems with ImageJ-OPs and TrackMate.

For some reasons we have to start TrackMate by the following main
method:
https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java/f
iji/plugin/trackmate/TrackMatePlugIn_.java#L134

However, this always leads to the a exception at this line:
https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java/f
iji/plugin/trackmate/detection/findmaxima/FindMaximaSpotDetector.java#L
123

This is the exception:
http://pastebin.com/A3N5LQBw

Any ideas?

Cheers,
Thorsten

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

Re: Problem getting the context

Thorsten Wagner
Just an additional information:

I tried to start it by imagej2:

net.imagej.Main.main(args);
new TrackMatePlugIn_().run( "/home/thorsten/samples/FakeTracks.tif" );

However, this just leads to another exception:
http://pastebin.com/m0VCTZ4S

Cheers,
Thorsten

Am Samstag, den 11.07.2015, 11:14 +0200 schrieb Thorsten Wagner:

> Dear List, dear Brian,
>
> we currently came across problems with ImageJ-OPs and TrackMate.
>
> For some reasons we have to start TrackMate by the following main
> method:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/TrackMatePlugIn_.java#L134
>
> However, this always leads to the a exception at this line:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/detection/findmaxima/FindMaximaSpotDetector.java
> #L
> 123
>
> This is the exception:
> http://pastebin.com/A3N5LQBw
>
> Any ideas?
>
> Cheers,
> Thorsten

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

Re: Problem getting the context

Mark Hiner
Hi Thorsten,

>For some reasons we have to start TrackMate by the following main method:

How exactly are you trying to launch TrackMate? Are you using the latest TrackMate master[1]? When I run this class in Eclipse, it works for me - launching TrackMate and opening the sample image (although I did have to change the path to http://fiji.sc/samples/FakeTracks.tif)

>This is the exception:
>http://pastebin.com/A3N5LQBw

Note that this exception message includes suggested debugging and workaround options. It may be sufficient to add the suggested static initializer.

>However, this just leads to another exception:
>http://pastebin.com/m0VCTZ4S

My first guess would be a class path problem with the way you are launching TrackMate. Also, it may be helpful to lean on the Fiji Debug launcher[2] to set things up properly. If you can share the exact command you used to launch (or your IDE environment) I can try to reproduce and debug.

Best,

On Sat, Jul 11, 2015 at 4:17 AM, Thorsten Wagner <[hidden email]> wrote:
Just an additional information:

I tried to start it by imagej2:

net.imagej.Main.main(args);
new TrackMatePlugIn_().run( "/home/thorsten/samples/FakeTracks.tif" );

However, this just leads to another exception:
http://pastebin.com/m0VCTZ4S

Cheers,
Thorsten

Am Samstag, den 11.07.2015, 11:14 +0200 schrieb Thorsten Wagner:
> Dear List, dear Brian,
>
> we currently came across problems with ImageJ-OPs and TrackMate.
>
> For some reasons we have to start TrackMate by the following main
> method:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/TrackMatePlugIn_.java#L134
>
> However, this always leads to the a exception at this line:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/detection/findmaxima/FindMaximaSpotDetector.java
> #L
> 123
>
> This is the exception:
> http://pastebin.com/A3N5LQBw
>
> Any ideas?
>
> Cheers,
> Thorsten

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


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

Re: Problem getting the context

Thorsten Wagner
Dear Mark,

thank you for your willingness to help me.

No, we are not using the latest TrackMate master. I'm implementing the find-maxima detector for TrackMate and therefore I'm using a modified version [1] (this is the version which produces the exception) of the find-maxima branch of TrackMate [2] .

To reproduce this error (sorry that I've forgotten this important information in my last mail!):
 - Start TrackMate with the Main Method in the TrackMatePlugIn_.java (I'm using eclipse and select "Run as -> Java Application")
 - Select "Next" in TrackMate
 - Select the "Find Maxima" detector
 - Select a arbitary threshold
 - Press Preview

The static initializer did not help.

Thank you for your help!

Cheers,
Thorsten


Am Dienstag, den 14.07.2015, 09:45 -0500 schrieb Mark Hiner:
Hi Thorsten,

>For some reasons we have to start TrackMate by the following main method:

How exactly are you trying to launch TrackMate? Are you using the latest TrackMate master[1]? When I run this class in Eclipse, it works for me - launching TrackMate and opening the sample image (although I did have to change the path to http://fiji.sc/samples/FakeTracks.tif)

>This is the exception:
>http://pastebin.com/A3N5LQBw

Note that this exception message includes suggested debugging and workaround options. It may be sufficient to add the suggested static initializer.

>However, this just leads to another exception:
>http://pastebin.com/m0VCTZ4S

My first guess would be a class path problem with the way you are launching TrackMate. Also, it may be helpful to lean on the Fiji Debug launcher[2] to set things up properly. If you can share the exact command you used to launch (or your IDE environment) I can try to reproduce and debug.

Best,

On Sat, Jul 11, 2015 at 4:17 AM, Thorsten Wagner <[hidden email]> wrote:
Just an additional information:

I tried to start it by imagej2:

net.imagej.Main.main(args);
new TrackMatePlugIn_().run( "/home/thorsten/samples/FakeTracks.tif" );

However, this just leads to another exception:
http://pastebin.com/m0VCTZ4S

Cheers,
Thorsten

Am Samstag, den 11.07.2015, 11:14 +0200 schrieb Thorsten Wagner:
> Dear List, dear Brian,
>
> we currently came across problems with ImageJ-OPs and TrackMate.
>
> For some reasons we have to start TrackMate by the following main
> method:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/TrackMatePlugIn_.java#L134
>
> However, this always leads to the a exception at this line:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/detection/findmaxima/FindMaximaSpotDetector.java
> #L
> 123
>
> This is the exception:
> http://pastebin.com/A3N5LQBw
>
> Any ideas?
>
> Cheers,
> Thorsten

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



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

Re: Problem getting the context

Mark Hiner
Hi Thorsten,

>The static initializer did not help.

Unfortunately the static initializer error message is missing some critical information: you can't launch from a class that will cause ImageJ 1.x classes to be loaded. TrackMatePlugin_.java contains fields that will cause ImageJ 1.x classes to be loaded, so a main method in that class will not be able to use an ImageJ2 context. Also, Curtis and I both prefer using Debug.run instead of a static initializer to launch from Eclipse.

So I would recommend using the Main class in the test directory of TrackMate[1] to avoid premature IJ 1.x class loading. The existing runFilter call didn't work for me, but if you use: "Debug.run("Tracks for TrackMate (807K)", null);" in the main method then it will open Fiji, open the TrackMate sample image, and then you can run TrackMate and test FindMaxima.

Hope that helps. Let me know if you run into problems.

Best,
Mark

[1] https://github.com/fiji/TrackMate/blob/v2.7.4/src/test/java/fiji/plugin/trackmate/Main.java

On Tue, Jul 14, 2015 at 10:20 AM, Thorsten Wagner <[hidden email]> wrote:
Dear Mark,

thank you for your willingness to help me.

No, we are not using the latest TrackMate master. I'm implementing the find-maxima detector for TrackMate and therefore I'm using a modified version [1] (this is the version which produces the exception) of the find-maxima branch of TrackMate [2] .

To reproduce this error (sorry that I've forgotten this important information in my last mail!):
 - Start TrackMate with the Main Method in the TrackMatePlugIn_.java (I'm using eclipse and select "Run as -> Java Application")
 - Select "Next" in TrackMate
 - Select the "Find Maxima" detector
 - Select a arbitary threshold
 - Press Preview

The static initializer did not help.

Thank you for your help!

Cheers,
Thorsten


Am Dienstag, den 14.07.2015, 09:45 -0500 schrieb Mark Hiner:
Hi Thorsten,

>For some reasons we have to start TrackMate by the following main method:

How exactly are you trying to launch TrackMate? Are you using the latest TrackMate master[1]? When I run this class in Eclipse, it works for me - launching TrackMate and opening the sample image (although I did have to change the path to http://fiji.sc/samples/FakeTracks.tif)

>This is the exception:
>http://pastebin.com/A3N5LQBw

Note that this exception message includes suggested debugging and workaround options. It may be sufficient to add the suggested static initializer.

>However, this just leads to another exception:
>http://pastebin.com/m0VCTZ4S

My first guess would be a class path problem with the way you are launching TrackMate. Also, it may be helpful to lean on the Fiji Debug launcher[2] to set things up properly. If you can share the exact command you used to launch (or your IDE environment) I can try to reproduce and debug.

Best,

On Sat, Jul 11, 2015 at 4:17 AM, Thorsten Wagner <[hidden email]> wrote:
Just an additional information:

I tried to start it by imagej2:

net.imagej.Main.main(args);
new TrackMatePlugIn_().run( "/home/thorsten/samples/FakeTracks.tif" );

However, this just leads to another exception:
http://pastebin.com/m0VCTZ4S

Cheers,
Thorsten

Am Samstag, den 11.07.2015, 11:14 +0200 schrieb Thorsten Wagner:
> Dear List, dear Brian,
>
> we currently came across problems with ImageJ-OPs and TrackMate.
>
> For some reasons we have to start TrackMate by the following main
> method:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/TrackMatePlugIn_.java#L134
>
> However, this always leads to the a exception at this line:
> https://github.com/thorstenwagner/TrackMate/blob/master/src/main/java
> /f
> iji/plugin/trackmate/detection/findmaxima/FindMaximaSpotDetector.java
> #L
> 123
>
> This is the exception:
> http://pastebin.com/A3N5LQBw
>
> Any ideas?
>
> Cheers,
> Thorsten

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




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