thorstenwagner / ij-ridgedetection

Detect ridges / lines with imagej
GNU General Public License v2.0
42 stars 27 forks source link

Scripting in Python available #33

Open sebi06 opened 5 years ago

sebi06 commented 5 years ago

Hi,

I was wondering if there is a way to script this plugin ideally in Python or using the macro language?

Cheers,

Sebi

imagejan commented 5 years ago

Doesn't the Ridge Detection command get recorded? From its use of GenericDialog[Plus], I would have guessed so. In any case, I think you can take the Lines_ plugin class as an example:

https://github.com/thorstenwagner/ij-ridgedetection/blob/0f3c0ef1a3ab97d6fd0c143469e5668f82f3d205/src/main/java/de/biomedical_imaging/ij/steger/Lines_.java#L858-L864

... and directly call into the LineDetector API:

https://github.com/thorstenwagner/ij-ridgedetection/blob/0f3c0ef1a3ab97d6fd0c143469e5668f82f3d205/src/main/java/de/biomedical_imaging/ij/steger/LineDetector.java#L106-L135

hdeluna commented 5 years ago

I have kind of a similar problem, I'm trying to use the plugin in a headless mode, and it seems to work, as I can save the resulting image, but I can't find a way to save the summary or any other of the results in text format. Besides, it's throwing a headless exception every time I run it. Sorry if this is a silly question.

I hope you can help me. Thank you so much. Haydee