fiji / SNT

Legacy project superseded by https://github.com/morphonets/SNT
GNU General Public License v3.0
11 stars 30 forks source link

replace macro script with autoclass methods #41

Closed carshadi closed 5 years ago

carshadi commented 5 years ago
tferr commented 5 years ago

It is also possible that certain Java API calls may crash the program (i.e. segfault).

Nah. pyimagej is so incredible, that will never happen :) This would be a template script as a proof-of-principle that it is possible to analyze SNT data in numpy, a request we get often. It does not impact on SNT functionality directly. @carshadi's effort was also useful to shape SNT's API to be more script-friendly.

But now that I think about it, having it as a Script Editor's Template may not be useful as it is not a jython script. @ctrueden, do you think we should place it somewhere else?

ctrueden commented 5 years ago

pyimagej is so incredible, that will never happen

I'm happy you like pyimagej. :-) But speaking from experience, it is not hard to crash the Python kernel with cells as simple as:

from jnius import autoclass
IJ = autoclass('ij.IJ')
IJ.getImage()

(at least for me, on macOS)

do you think we should place it somewhere else?

I agree that putting it in script_templates is misleading, since it will not run as-is from the Script Editor. So putting it somewhere else makes sense to me.

tferr commented 5 years ago

Hi @carshadi ,

The performance profiling was great! At this point, I would propose the following:

  1. Have a _performancetesting notebook with your findings (for those who want/need to debug and optimize code)
  2. Have a simpler notebook that makes the convex hull calculations (for those that are just interested in morphometry analysis)

As per discussion above, both could be moved to a notebooks folder at the root of the project. Let me know if you need help or feedback

carshadi commented 5 years ago

sure can do