I am seeing a problem with the LarsonSekanina process when it is invoked from a script.
When invoked from a script it always sets the centerX and centerY parameters to their default values of zero, it does not use the specified values.
Here is a sample script that produces the problem:
function main()
{
console.abortEnabled = true;
console.show();
var P = new LarsonSekanina();
P.interpolation = LarsonSekanina.prototype.Bicubic;
P.radiusIncrement = 2;
P.angleIncrement = 3;
P.centerX = 2400;
P.centerY = 1390;
P.amount = 0.75;
P.threshold = 0.0;
P.deringing = 0.00;
P.rangeLow = 0.0000000;
P.rangeHigh = 0.0500000;
P.useLuminance = true;
P.highPass = false;
P.disableExtension = false;
P.executeOn( ImageWindow.activeWindow.currentView );
}
main();
Run this script on an image that is suitable for processing with LarsonSekanina. Set the centerX and centerY parameters to values appropriate for your image. Set the radiusIncrement, angleIncrement and amount parameters to somewhat extreme values so that you will be able to see that your parameters are being used and not the default values. Run the script on your image. Observe that your specified centerX and centerY parameter values were not used. Instead the default values of zero were used. Observe that your specified values for all parameters except centerX and centerY were used. Needless to say, this problem makes the LarsonSekanina process unusable from a script unless the centerX,centerY for your image just happens to be 0,0!
Some questions and comments:
1) Are others able to reproduce this problem? Or am I the only one seeing it?
2) In JavaScript the LarsonSekanina process has separate centerX and centerY parameters, i.e. they are two separate and distinct values. But in PCL in LarsonSekaninaInstance there is only a single parameter called center which is of type DPoint (which is typedef'ed to F64Point in Point.h). It looks like something is getting lost in translation in passing the parameters from PJSR into PCL.
3) Is this a problem that can be fixed quickly with an update for the fix released in the short term?
4) If this can’t be fixed/updated quickly, is there some sort of workaround I can use to make LarsonSekanina work correctly when invoked from a script? I don’t care how ugly or dirty the workaround is as long as it works!
Thanks,
Dan Carlson