State:Closed|icon_bug|icon_nuke|database:public|Resolution:Fixed|TargetRelease:14.1v1|BugID:541803|
Problem summary:
BlinkScript documentation contains an incorrect example on using setRange() with two parameters.
Currently, the 2D Ranged Access example states that the following setRange() calls are equivalent, but they do not produce the same results:
src.setRange(-xRadius, -yRadius, xRadius, yRadius);src.setRange(xRadius, yRadius);
kernel TestKernel : ImageComputationKernel<ePixelWise> { Image<eRead, eAccessRanged2D, eEdgeClamped> src; // the Input image Image<eWrite, eAccessPoint> dst; // the Output image param: int xRadius, yRadius; void define() { // In define(), parameters can be given labels and default values. defineParam(xRadius, "X Radius", 100); defineParam(yRadius, "Y Radius", 100); } void init() { src.setRange(xRadius, yRadius); //Based on the docs, this should be equivalent to src.setRange(-xRadius, -yRadius, xRadius, yRadius), but it is not} void process() { dst() = src(0, 0); // Write the result to the output image } };3) Click the Recompile button, View the BlinkScript node, and observe the Edge Clamping (pictured below):
src.setRange(xRadius, yRadius) should produce the same results as src.setRange(-xRadius, -yRadius, xRadius, yRadius) and not Edge Clamp the image.setRange() as described in the documentation.xRadius == yRadius), use src.setRange(-xRadius, xRadius) instead of src.setRange(xRadius, yRadius).We're sorry to hear that
Please tell us why