Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripting in Python available #33

Open
sebi06 opened this issue Feb 12, 2019 · 2 comments
Open

Scripting in Python available #33

sebi06 opened this issue Feb 12, 2019 · 2 comments

Comments

@sebi06
Copy link

sebi06 commented Feb 12, 2019

Hi,

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

Cheers,

Sebi

@imagejan
Copy link

imagejan commented Apr 4, 2019

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:

LineDetector detect = new LineDetector();
detect.bechatty = verbose;
result.add(detect.detectLines(ip, sigma, upperThresh, lowerThresh, minLength, maxLength, isDarkLine,
doCorrectPosition, doEstimateWidth, doExtendLine, overlapOption));
usedOptions = detect.getUsedParamters();
resultJunction.add(detect.getJunctions());

... and directly call into the LineDetector API:

/**
* Detect lines.
*
* @param ip
* the ip
* @param sigma
* the sigma
* @param upperThresh
* the upper thresh
* @param lowerThresh
* the lower thresh
* @param minLength
* the min length
* @param maxLength
* the max length
* @param isDarkLine
* the is dark line
* @param doCorrectPosition
* the do correct position
* @param doEstimateWidth
* the do estimate width
* @param doExtendLine
* the do extend line
* @param overlapOption
* the overlap option
* @return the lines
*/
public Lines detectLines(ImageProcessor ip, double sigma, double upperThresh, double lowerThresh, double minLength,
double maxLength, boolean isDarkLine, boolean doCorrectPosition, boolean doEstimateWidth,
boolean doExtendLine, OverlapOption overlapOption) {

@hdeluna
Copy link

hdeluna commented Apr 22, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants