Posted by
ctrueden on
Sep 24, 2014; 5:19pm
URL: http://imagej.273.s1.nabble.com/Using-TrackMate-in-JavaPlugin-no-proper-example-code-tp5009724p5009748.html
Hi George,
> What would really help if someone could point me to a Java tutorial of
> TrackMate or something that can help me use TrackMate in a JavaPlugin
> instead of being stuck with Jython,
The primary TrackMate developers (Jean-Yves and Johannes) might have better
pointers, but in the meantime, converting the Jython examples into Java
seems like a safe bet. If the generic parameters are overwhelming, you can
ignore them and just use raw types -- this is what the Jython code is doing
anyway. It gives you less compile-time type safety but things should work
just the same as in Jython.
It's interesting that you call it "stuck with Jython" -- the goal of such
scripting languages is to make life easier, not harder. The target audience
for Jython is the more casual developer, and people who want to prototype
things more easily and quickly than you could in Java. So I am wondering:
why are you choosing to use Java instead? Especially since you aren't
comfortable with the use of generic parameters...
Regards,
Curtis
On Wed, Sep 24, 2014 at 3:20 AM, George H <
[hidden email]> wrote:
> I just saw this in the TrackMate test classes
>
>
>
https://github.com/fiji/TrackMate/blob/master/src/test/java/fiji/plugin/trackmate/interactivetests/DogDetectorPerformance.java>
> Using UnsignedShortType for the DogDetector
>
> Am I at least on the right track here?
>
> --
> George H
>
[hidden email]
>
> On Tue, Sep 23, 2014 at 3:10 PM, George H <
[hidden email]> wrote:
>
> > Hi,
> >
> > I started using TrackMate and I really like it and it's very powerful.
> > I've already read all documentation on
> >
http://fiji.sc/TrackMate#For_developers_2 and the section for
> developers
> > is very good, but it's all in Jython.
> >
> > I am trying to do similar code in Java, but I am hitting roadblocks
> > because trying to go by the Jython code is very difficult. For example
> >
> > # Configure detector - We use the Strings for the keys
> > settings.detectorFactory = LogDetectorFactory()
> > settings.detectorSettings = {
> > 'DO_SUBPIXEL_LOCALIZATION' : True,
> > 'RADIUS' : 2.5,
> > 'TARGET_CHANNEL' : 1,
> > 'THRESHOLD' : 0.,
> > 'DO_MEDIAN_FILTERING' : False,
> > }
> >
> > In Java it would be
> >
> > Settings settings = new Settings();
> > settings.setFrom(imagePlus);
> > settings.detectorFactory = new LogDetectorFactory<T>();
> > settings.detectorSettings.put(DetectorKeys.KEY_DO_SUBPIXEL_LOCALIZATION,
> > Boolean.TRUE);
> >
> > For LogDetectorFactory I have no idea what RealType or NativeType to use
> > as there are many. And in the Jython example there is none specified.
> >
> > What would really help if someone could point me to a Java tutorial of
> > TrackMate or something that can help me use TrackMate in a JavaPlugin
> > instead of being stuck with Jython,
> >
> > Thanks.
> > --
> > George H
> >
[hidden email]
> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html