trakem2 / TrakEM2

ImageJ plugin for morphological data mining, 3D modeling and image stitching, registration, editing and annotation.
https://imagej.net/TrakEM2
GNU General Public License v3.0
28 stars 32 forks source link

Update pom-scijava to 30.0.0 #27

Closed hinerm closed 3 years ago

hinerm commented 3 years ago

As of pom-scijava 30.0.0, the Simple_Neurite_Tracer] dependency can now be updated to org.morphonets:SNT.

https://github.com/trakem2/TrakEM2/blob/94e44580ebecafe036aeb96fa3150b7e4fa6f7af/pom.xml#L218-L226

Some migration is necessary as TrakEM2 as the ini.trakem2.display.Polyline class is no longer present in SNT.

hinerm commented 3 years ago

@axtimwalde @acardona can one of you make this change? I do not have commit rights and am not sure how Polyline usage should be updated.

imagejan commented 3 years ago

@hinerm wrote:

the ini.trakem2.display.Polyline class is no longer present in SNT.

Polyline is part of TrakEM2.

hinerm commented 3 years ago

Polyline is part of TrakEM2.

argh. Of course, thank you. Polyline itself needs its imports updated to the new packages:

import sc.fiji.snt.Path;
import sc.fiji.snt.SearchInterface;
import sc.fiji.snt.SearchProgressCallback;
import sc.fiji.snt.TracerThread;

And these lines need to be updated for changed API/field visibility.

imagejan commented 3 years ago

https://github.com/trakem2/TrakEM2/blob/94e44580ebecafe036aeb96fa3150b7e4fa6f7af/src/main/java/ini/trakem2/display/Polyline.java#L716

This can be replaced by result.size().

https://github.com/trakem2/TrakEM2/blob/94e44580ebecafe036aeb96fa3150b7e4fa6f7af/src/main/java/ini/trakem2/display/Polyline.java#L717

That one is more difficult. The getXYZUnscaled() method was removed here:

https://github.com/morphonets/SNT/commit/8f74838884911f4276b09764372d277378872ba4#diff-9d18d39571ccc3273052cc8eb8a38f88b03cb2ef6edccde1f06956dab28288ae

@tferr can you suggest an alternative? Or can we re-introduce that method?

hinerm commented 3 years ago

@tferr can you suggest an alternative? Or can we re-introduce that method?

I am assuming the individual X-Y-Z methods can be looped over from 0..result.size()?

tferr commented 3 years ago

Yes! see #25 (https://github.com/trakem2/TrakEM2/pull/25/commits/07d67a947fd7c23d2b608c4b46b55f50338482cf?diff=split&w=1). The PR may be a bit outdated, but it does exactly that.

hinerm commented 3 years ago

Yes! see #25 (07d67a9?diff=split&w=1). The PR may be a bit outdated, but it does exactly that.

@tferr oh perfect. I opened https://github.com/trakem2/TrakEM2/pull/28 which includes your changes and updates the pom as well, now that we have something to pin to.