diff --git a/wpilibj/wpilibJavaDevices/src/main/java/com/ni/vision/NIVision.java b/wpilibj/wpilibJavaDevices/src/main/java/com/ni/vision/NIVision.java index e9a5db39ab..4955a12c83 100644 --- a/wpilibj/wpilibJavaDevices/src/main/java/com/ni/vision/NIVision.java +++ b/wpilibj/wpilibJavaDevices/src/main/java/com/ni/vision/NIVision.java @@ -19452,24 +19452,24 @@ public class NIVision { */ public static int imaqCountParticles(Image image, int connectivity8) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqCountParticles(image.getAddress(), connectivity8, rv_addr+0); + _imaqCountParticles(image.getAddress(), connectivity8, rv_addr+0); int numParticles; numParticles = rv_buf.getInt(0); return numParticles; } - private static native int _imaqCountParticles(long image, int connectivity8, long numParticles); + private static native void _imaqCountParticles(long image, int connectivity8, long numParticles); public static double imaqMeasureParticle(Image image, int particleNumber, int calibrated, MeasurementType measurement) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - double jn_rv = _imaqMeasureParticle(image.getAddress(), particleNumber, calibrated, measurement.getValue(), rv_addr+0); + _imaqMeasureParticle(image.getAddress(), particleNumber, calibrated, measurement.getValue(), rv_addr+0); double value; value = rv_buf.getDouble(0); return value; } - private static native double _imaqMeasureParticle(long image, int particleNumber, int calibrated, int measurement, long value); + private static native void _imaqMeasureParticle(long image, int particleNumber, int calibrated, int measurement, long value); public static MeasureParticlesReport imaqMeasureParticles(Image image, MeasureParticlesCalibrationMode calibrationMode, MeasurementType[] measurements) { int numMeasurements = measurements.length; @@ -19493,14 +19493,14 @@ public class NIVision { criteria[i].setBuffer(criteria_buf, off); criteria[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqParticleFilter4(dest.getAddress(), source.getAddress(), getByteBufferAddress(criteria_buf), criteriaCount, options.getAddress(), roi.getAddress(), rv_addr+0); + _imaqParticleFilter4(dest.getAddress(), source.getAddress(), getByteBufferAddress(criteria_buf), criteriaCount, options.getAddress(), roi.getAddress(), rv_addr+0); int numParticles; numParticles = rv_buf.getInt(0); return numParticles; } - private static native int _imaqParticleFilter4(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles); + private static native void _imaqParticleFilter4(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles); /** * Morphology functions @@ -19552,7 +19552,7 @@ public class NIVision { } public static FindCirclesResult imaqFindCircles(Image dest, Image source, float minRadius, float maxRadius) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqFindCircles(dest.getAddress(), source.getAddress(), minRadius, maxRadius, rv_addr+0); FindCirclesResult rv = new FindCirclesResult(rv_buf, jn_rv); @@ -19561,14 +19561,14 @@ public class NIVision { private static native long _imaqFindCircles(long dest, long source, float minRadius, float maxRadius, long numCircles); public static int imaqLabel2(Image dest, Image source, int connectivity8) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqLabel2(dest.getAddress(), source.getAddress(), connectivity8, rv_addr+0); + _imaqLabel2(dest.getAddress(), source.getAddress(), connectivity8, rv_addr+0); int particleCount; particleCount = rv_buf.getInt(0); return particleCount; } - private static native int _imaqLabel2(long dest, long source, int connectivity8, long particleCount); + private static native void _imaqLabel2(long dest, long source, int connectivity8, long particleCount); public static void imaqMorphology(Image dest, Image source, MorphologyMethod method, StructuringElement structuringElement) { @@ -19632,7 +19632,7 @@ public class NIVision { } public static CopyFromRingResult imaqCopyFromRing(long sessionID, Image image, int imageToCopy, Rect rect) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqCopyFromRing(sessionID, image == null ? 0 : image.getAddress(), imageToCopy, rv_addr+0, rect.getAddress()); CopyFromRingResult rv = new CopyFromRingResult(rv_buf); @@ -19668,7 +19668,7 @@ public class NIVision { } public static ExtractFromRingResult imaqExtractFromRing(long sessionID, int imageToExtract) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqExtractFromRing(sessionID, imageToExtract, rv_addr+0); ExtractFromRingResult rv = new ExtractFromRingResult(rv_buf); @@ -19855,7 +19855,7 @@ public class NIVision { points[i].setBuffer(points_buf, off); points[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqCaliperTool(image.getAddress(), getByteBufferAddress(points_buf), numPoints, edgeOptions.getAddress(), caliperOptions.getAddress(), rv_addr+0); CaliperToolResult rv = new CaliperToolResult(rv_buf, jn_rv); @@ -19873,7 +19873,7 @@ public class NIVision { } public static ConcentricRake2Result imaqConcentricRake2(Image image, ROI roi, ConcentricRakeDirection direction, EdgeProcess process, int stepSize) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqConcentricRake2(image.getAddress(), roi.getAddress(), direction.getValue(), process.getValue(), stepSize, rv_addr+0); ConcentricRake2Result rv = new ConcentricRake2Result(rv_buf); @@ -19911,7 +19911,7 @@ public class NIVision { ByteBuffer pixels_buf = null; pixels_buf = ByteBuffer.allocateDirect(pixels.length*8).order(ByteOrder.nativeOrder()); pixels_buf.asDoubleBuffer().put(pixels).rewind(); - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqDetectExtremes(getByteBufferAddress(pixels_buf), numPixels, mode.getValue(), options.getAddress(), rv_addr+0); DetectExtremesResult rv = new DetectExtremesResult(rv_buf, jn_rv); @@ -19920,14 +19920,14 @@ public class NIVision { private static native long _imaqDetectExtremes(long pixels, int numPixels, int mode, long options, long numExtremes); public static double imaqDetectRotation(Image referenceImage, Image testImage, PointFloat referenceCenter, PointFloat testCenter, int radius, float precision) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - double jn_rv = _imaqDetectRotation(referenceImage.getAddress(), testImage.getAddress(), referenceCenter.getAddress(), testCenter.getAddress(), radius, precision, rv_addr+0); + _imaqDetectRotation(referenceImage.getAddress(), testImage.getAddress(), referenceCenter.getAddress(), testCenter.getAddress(), radius, precision, rv_addr+0); double angle; angle = rv_buf.getDouble(0); return angle; } - private static native double _imaqDetectRotation(long referenceImage, long testImage, long referenceCenter, long testCenter, int radius, float precision, long angle); + private static native void _imaqDetectRotation(long referenceImage, long testImage, long referenceCenter, long testCenter, int radius, float precision, long angle); public static class EdgeTool4Result { public EdgeOptions2 edgeOptions; @@ -19939,7 +19939,7 @@ public class NIVision { } public static EdgeTool4Result imaqEdgeTool4(Image image, ROI roi, EdgeProcess processType, int reverseDirection) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqEdgeTool4(image.getAddress(), roi.getAddress(), processType.getValue(), rv_addr+0, reverseDirection); EdgeTool4Result rv = new EdgeTool4Result(rv_buf); @@ -19971,7 +19971,7 @@ public class NIVision { } public static FindTransformRect2Result imaqFindTransformRect2(Image image, ROI roi, FindTransformMode mode, FindTransformRectOptions2 findTransformOptions, StraightEdgeOptions straightEdgeOptions) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqFindTransformRect2(image.getAddress(), roi.getAddress(), mode.getValue(), rv_addr+0, rv_addr+8, findTransformOptions.getAddress(), straightEdgeOptions.getAddress(), rv_addr+16); FindTransformRect2Result rv = new FindTransformRect2Result(rv_buf); @@ -19994,7 +19994,7 @@ public class NIVision { } public static FindTransformRects2Result imaqFindTransformRects2(Image image, ROI primaryROI, ROI secondaryROI, FindTransformMode mode, FindTransformRectsOptions2 findTransformOptions, StraightEdgeOptions primaryStraightEdgeOptions, StraightEdgeOptions secondaryStraightEdgeOptions) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqFindTransformRects2(image.getAddress(), primaryROI.getAddress(), secondaryROI.getAddress(), mode.getValue(), rv_addr+0, rv_addr+8, findTransformOptions.getAddress(), primaryStraightEdgeOptions.getAddress(), secondaryStraightEdgeOptions.getAddress(), rv_addr+16); FindTransformRects2Result rv = new FindTransformRects2Result(rv_buf); @@ -20003,14 +20003,14 @@ public class NIVision { private static native void _imaqFindTransformRects2(long image, long primaryROI, long secondaryROI, int mode, long baseSystem, long newSystem, long findTransformOptions, long primaryStraightEdgeOptions, long secondaryStraightEdgeOptions, long axisReport); public static float imaqLineGaugeTool2(Image image, Point start, Point end, LineGaugeMethod method, EdgeOptions edgeOptions, CoordinateTransform2 transform) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqLineGaugeTool2(image.getAddress(), start.getAddress(), end.getAddress(), method.getValue(), edgeOptions.getAddress(), transform.getAddress(), rv_addr+0); + _imaqLineGaugeTool2(image.getAddress(), start.getAddress(), end.getAddress(), method.getValue(), edgeOptions.getAddress(), transform.getAddress(), rv_addr+0); float distance; distance = rv_buf.getFloat(0); return distance; } - private static native float _imaqLineGaugeTool2(long image, long start, long end, int method, long edgeOptions, long transform, long distance); + private static native void _imaqLineGaugeTool2(long image, long start, long end, int method, long edgeOptions, long transform, long distance); public static class Rake2Result { public EdgeOptions2 edgeOptions; @@ -20022,7 +20022,7 @@ public class NIVision { } public static Rake2Result imaqRake2(Image image, ROI roi, RakeDirection direction, EdgeProcess process, int stepSize) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqRake2(image.getAddress(), roi.getAddress(), direction.getValue(), process.getValue(), stepSize, rv_addr+0); Rake2Result rv = new Rake2Result(rv_buf); @@ -20063,7 +20063,7 @@ public class NIVision { points[i].setBuffer(points_buf, off); points[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqSimpleEdge(image.getAddress(), getByteBufferAddress(points_buf), numPoints, options.getAddress(), rv_addr+0); SimpleEdgeResult rv = new SimpleEdgeResult(rv_buf, jn_rv); @@ -20081,7 +20081,7 @@ public class NIVision { } public static Spoke2Result imaqSpoke2(Image image, ROI roi, SpokeDirection direction, EdgeProcess process, int stepSize) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqSpoke2(image.getAddress(), roi.getAddress(), direction.getValue(), process.getValue(), stepSize, rv_addr+0); Spoke2Result rv = new Spoke2Result(rv_buf); @@ -20182,14 +20182,14 @@ public class NIVision { text_buf = ByteBuffer.allocateDirect(text_bytes.length+1); putBytes(text_buf, text_bytes, 0, text_bytes.length).put(text_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqDrawTextOnImage(dest.getAddress(), source.getAddress(), coord.getAddress(), text == null ? 0 : getByteBufferAddress(text_buf), options == null ? 0 : options.getAddress(), rv_addr+0); + _imaqDrawTextOnImage(dest.getAddress(), source.getAddress(), coord.getAddress(), text == null ? 0 : getByteBufferAddress(text_buf), options == null ? 0 : options.getAddress(), rv_addr+0); int fontNameUsed; fontNameUsed = rv_buf.getInt(0); return fontNameUsed; } - private static native int _imaqDrawTextOnImage(long dest, long source, long coord, long text, long options, long fontNameUsed); + private static native void _imaqDrawTextOnImage(long dest, long source, long coord, long text, long options, long fontNameUsed); /** * Interlacing functions @@ -20251,7 +20251,7 @@ public class NIVision { } public static EnumerateCustomKeysResult imaqEnumerateCustomKeys(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqEnumerateCustomKeys(image.getAddress(), rv_addr+0); EnumerateCustomKeysResult rv = new EnumerateCustomKeysResult(rv_buf, jn_rv); @@ -20260,35 +20260,35 @@ public class NIVision { private static native long _imaqEnumerateCustomKeys(long image, long size); public static int imaqGetBitDepth(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetBitDepth(image.getAddress(), rv_addr+0); + _imaqGetBitDepth(image.getAddress(), rv_addr+0); int bitDepth; bitDepth = rv_buf.getInt(0); return bitDepth; } - private static native int _imaqGetBitDepth(long image, long bitDepth); + private static native void _imaqGetBitDepth(long image, long bitDepth); public static int imaqGetBytesPerPixel(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetBytesPerPixel(image.getAddress(), rv_addr+0); + _imaqGetBytesPerPixel(image.getAddress(), rv_addr+0); int byteCount; byteCount = rv_buf.getInt(0); return byteCount; } - private static native int _imaqGetBytesPerPixel(long image, long byteCount); + private static native void _imaqGetBytesPerPixel(long image, long byteCount); public static ImageInfo imaqGetImageInfo(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetImageInfo(image.getAddress(), rv_addr+0); + _imaqGetImageInfo(image.getAddress(), rv_addr+0); ImageInfo info; info = new ImageInfo(rv_buf, 0); info.read(); return info; } - private static native long _imaqGetImageInfo(long image, long info); + private static native void _imaqGetImageInfo(long image, long info); public static class GetImageSizeResult { public int width; @@ -20300,7 +20300,7 @@ public class NIVision { } public static GetImageSizeResult imaqGetImageSize(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetImageSize(image.getAddress(), rv_addr+0, rv_addr+8); GetImageSizeResult rv = new GetImageSizeResult(rv_buf); @@ -20309,45 +20309,45 @@ public class NIVision { private static native void _imaqGetImageSize(long image, long width, long height); public static ImageType imaqGetImageType(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetImageType(image.getAddress(), rv_addr+0); + _imaqGetImageType(image.getAddress(), rv_addr+0); ImageType type; type = ImageType.fromValue(rv_buf.getInt(0)); return type; } - private static native int _imaqGetImageType(long image, long type); + private static native void _imaqGetImageType(long image, long type); public static Point imaqGetMaskOffset(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetMaskOffset(image.getAddress(), rv_addr+0); + _imaqGetMaskOffset(image.getAddress(), rv_addr+0); Point offset; offset = new Point(rv_buf, 0); offset.read(); return offset; } - private static native long _imaqGetMaskOffset(long image, long offset); + private static native void _imaqGetMaskOffset(long image, long offset); public static int imaqGetVisionInfoTypes(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetVisionInfoTypes(image.getAddress(), rv_addr+0); + _imaqGetVisionInfoTypes(image.getAddress(), rv_addr+0); int present; present = rv_buf.getInt(0); return present; } - private static native int _imaqGetVisionInfoTypes(long image, long present); + private static native void _imaqGetVisionInfoTypes(long image, long present); public static int imaqIsImageEmpty(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqIsImageEmpty(image.getAddress(), rv_addr+0); + _imaqIsImageEmpty(image.getAddress(), rv_addr+0); int empty; empty = rv_buf.getInt(0); return empty; } - private static native int _imaqIsImageEmpty(long image, long empty); + private static native void _imaqIsImageEmpty(long image, long empty); public static RawData imaqReadCustomData(Image image, String key) { ByteBuffer key_buf = null; @@ -20361,7 +20361,7 @@ public class NIVision { key_buf = ByteBuffer.allocateDirect(key_bytes.length+1); putBytes(key_buf, key_bytes, 0, key_bytes.length).put(key_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqReadCustomData(image.getAddress(), key == null ? 0 : getByteBufferAddress(key_buf), rv_addr+0); int size; @@ -20439,14 +20439,14 @@ public class NIVision { */ public static int imaqAreToolsContextSensitive() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqAreToolsContextSensitive(rv_addr+0); + _imaqAreToolsContextSensitive(rv_addr+0); int sensitive; sensitive = rv_buf.getInt(0); return sensitive; } - private static native int _imaqAreToolsContextSensitive(long sensitive); + private static native void _imaqAreToolsContextSensitive(long sensitive); public static void imaqCloseWindow(int windowNumber) { @@ -20474,7 +20474,7 @@ public class NIVision { } public static GetLastKeyResult imaqGetLastKey() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetLastKey(rv_addr+0, rv_addr+8, rv_addr+16); GetLastKeyResult rv = new GetLastKeyResult(rv_buf); @@ -20483,15 +20483,15 @@ public class NIVision { private static native void _imaqGetLastKey(long keyPressed, long windowNumber, long modifiers); public static Point imaqGetWindowCenterPos(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetWindowCenterPos(windowNumber, rv_addr+0); + _imaqGetWindowCenterPos(windowNumber, rv_addr+0); Point centerPosition; centerPosition = new Point(rv_buf, 0); centerPosition.read(); return centerPosition; } - private static native long _imaqGetWindowCenterPos(int windowNumber, long centerPosition); + private static native void _imaqGetWindowCenterPos(int windowNumber, long centerPosition); public static void imaqSetToolContextSensitivity(int sensitive) { @@ -20526,7 +20526,7 @@ public class NIVision { private static native void _imaqDuplicate(long dest, long source); public static RawData imaqFlatten(Image image, FlattenType type, CompressionType compression, int quality) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqFlatten(image.getAddress(), type.getValue(), compression.getValue(), quality, rv_addr+0); int size; @@ -20634,15 +20634,15 @@ public class NIVision { private static native int _imaqCreateAVI(long fileName, long compressionFilter, int quality, int framesPerSecond, int maxDataSize); public static AVIInfo imaqGetAVIInfo(int session) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetAVIInfo(session, rv_addr+0); + _imaqGetAVIInfo(session, rv_addr+0); AVIInfo info; info = new AVIInfo(rv_buf, 0); info.read(); return info; } - private static native long _imaqGetAVIInfo(int session, long info); + private static native void _imaqGetAVIInfo(int session, long info); public static class GetFileInfoResult { public CalibrationUnit calibrationUnit; @@ -20673,7 +20673,7 @@ public class NIVision { fileName_buf = ByteBuffer.allocateDirect(fileName_bytes.length+1); putBytes(fileName_buf, fileName_bytes, 0, fileName_bytes.length).put(fileName_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(56).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8+8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetFileInfo(fileName == null ? 0 : getByteBufferAddress(fileName_buf), rv_addr+0, rv_addr+8, rv_addr+16, rv_addr+24, rv_addr+32, rv_addr+40); GetFileInfoResult rv = new GetFileInfoResult(rv_buf); @@ -20719,7 +20719,7 @@ public class NIVision { } public static GetFilterNamesResult imaqGetFilterNames() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetFilterNames(rv_addr+0); GetFilterNamesResult rv = new GetFilterNamesResult(rv_buf, jn_rv); @@ -20811,7 +20811,7 @@ public class NIVision { title_buf = ByteBuffer.allocateDirect(title_bytes.length+1); putBytes(title_buf, title_bytes, 0, title_bytes.length).put(title_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqLoadImagePopup(defaultDirectory == null ? 0 : getByteBufferAddress(defaultDirectory_buf), defaultFileSpec == null ? 0 : getByteBufferAddress(defaultFileSpec_buf), fileTypeList == null ? 0 : getByteBufferAddress(fileTypeList_buf), title == null ? 0 : getByteBufferAddress(title_buf), allowMultiplePaths, buttonLabel.getValue(), restrictDirectory, restrictExtension, allowCancel, allowMakeDirectory, rv_addr+0, rv_addr+8); LoadImagePopupResult rv = new LoadImagePopupResult(rv_buf, jn_rv); @@ -20859,7 +20859,7 @@ public class NIVision { fileName_buf = ByteBuffer.allocateDirect(fileName_bytes.length+1); putBytes(fileName_buf, fileName_bytes, 0, fileName_bytes.length).put(fileName_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqReadFile(image.getAddress(), fileName == null ? 0 : getByteBufferAddress(fileName_buf), rv_addr+0, rv_addr+8); ReadFileResult rv = new ReadFileResult(rv_buf); @@ -20889,7 +20889,7 @@ public class NIVision { fileName_buf = ByteBuffer.allocateDirect(fileName_bytes.length+1); putBytes(fileName_buf, fileName_bytes, 0, fileName_bytes.length).put(fileName_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqReadVisionFile(image.getAddress(), fileName == null ? 0 : getByteBufferAddress(fileName_buf), rv_addr+0, rv_addr+8); ReadVisionFileResult rv = new ReadVisionFileResult(rv_buf); @@ -21028,15 +21028,15 @@ public class NIVision { */ public static CoordinateSystem imaqBuildCoordinateSystem(Point points, ReferenceMode mode, AxisOrientation orientation) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqBuildCoordinateSystem(points.getAddress(), mode.getValue(), orientation.getValue(), rv_addr+0); + _imaqBuildCoordinateSystem(points.getAddress(), mode.getValue(), orientation.getValue(), rv_addr+0); CoordinateSystem system; system = new CoordinateSystem(rv_buf, 0); system.read(); return system; } - private static native long _imaqBuildCoordinateSystem(long points, int mode, int orientation, long system); + private static native void _imaqBuildCoordinateSystem(long points, int mode, int orientation, long system); public static BestCircle2 imaqFitCircle2(PointFloat[] points, FitCircleOptions options) { int numPoints = points.length; @@ -21081,14 +21081,14 @@ public class NIVision { private static native long _imaqFitLine(long points, int numPoints, long options); public static float imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqGetAngle(start1.getAddress(), end1.getAddress(), start2.getAddress(), end2.getAddress(), rv_addr+0); + _imaqGetAngle(start1.getAddress(), end1.getAddress(), start2.getAddress(), end2.getAddress(), rv_addr+0); float angle; angle = rv_buf.getFloat(0); return angle; } - private static native float _imaqGetAngle(long start1, long end1, long start2, long end2, long angle); + private static native void _imaqGetAngle(long start1, long end1, long start2, long end2, long angle); public static class GetBisectingLineResult { public PointFloat bisectStart; @@ -21102,7 +21102,7 @@ public class NIVision { } public static GetBisectingLineResult imaqGetBisectingLine(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetBisectingLine(start1.getAddress(), end1.getAddress(), start2.getAddress(), end2.getAddress(), rv_addr+0, rv_addr+8); GetBisectingLineResult rv = new GetBisectingLineResult(rv_buf); @@ -21111,25 +21111,25 @@ public class NIVision { private static native void _imaqGetBisectingLine(long start1, long end1, long start2, long end2, long bisectStart, long bisectEnd); public static float imaqGetDistance(PointFloat point1, PointFloat point2) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqGetDistance(point1.getAddress(), point2.getAddress(), rv_addr+0); + _imaqGetDistance(point1.getAddress(), point2.getAddress(), rv_addr+0); float distance; distance = rv_buf.getFloat(0); return distance; } - private static native float _imaqGetDistance(long point1, long point2, long distance); + private static native void _imaqGetDistance(long point1, long point2, long distance); public static PointFloat imaqGetIntersection(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetIntersection(start1.getAddress(), end1.getAddress(), start2.getAddress(), end2.getAddress(), rv_addr+0); + _imaqGetIntersection(start1.getAddress(), end1.getAddress(), start2.getAddress(), end2.getAddress(), rv_addr+0); PointFloat intersection; intersection = new PointFloat(rv_buf, 0); intersection.read(); return intersection; } - private static native long _imaqGetIntersection(long start1, long end1, long start2, long end2, long intersection); + private static native void _imaqGetIntersection(long start1, long end1, long start2, long end2, long intersection); public static class GetMidLineResult { public PointFloat midLineStart; @@ -21143,7 +21143,7 @@ public class NIVision { } public static GetMidLineResult imaqGetMidLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetMidLine(refLineStart.getAddress(), refLineEnd.getAddress(), point.getAddress(), rv_addr+0, rv_addr+8); GetMidLineResult rv = new GetMidLineResult(rv_buf); @@ -21165,7 +21165,7 @@ public class NIVision { } public static GetPerpendicularLineResult imaqGetPerpendicularLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetPerpendicularLine(refLineStart.getAddress(), refLineEnd.getAddress(), point.getAddress(), rv_addr+0, rv_addr+8, rv_addr+16); GetPerpendicularLineResult rv = new GetPerpendicularLineResult(rv_buf); @@ -21198,7 +21198,7 @@ public class NIVision { } public static GetPointsOnContourResult imaqGetPointsOnContour(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetPointsOnContour(image.getAddress(), rv_addr+0); GetPointsOnContourResult rv = new GetPointsOnContourResult(rv_buf, jn_rv); @@ -21231,7 +21231,7 @@ public class NIVision { } public static GetPointsOnLineResult imaqGetPointsOnLine(Point start, Point end) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetPointsOnLine(start.getAddress(), end.getAddress(), rv_addr+0); GetPointsOnLineResult rv = new GetPointsOnLineResult(rv_buf, jn_rv); @@ -21240,14 +21240,14 @@ public class NIVision { private static native long _imaqGetPointsOnLine(long start, long end, long numPoints); public static float imaqGetPolygonArea(PointFloat points, int numPoints) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqGetPolygonArea(points.getAddress(), numPoints, rv_addr+0); + _imaqGetPolygonArea(points.getAddress(), numPoints, rv_addr+0); float area; area = rv_buf.getFloat(0); return area; } - private static native float _imaqGetPolygonArea(long points, int numPoints, long area); + private static native void _imaqGetPolygonArea(long points, int numPoints, long area); public static class InterpolatePointsResult { public float[] array; @@ -21277,7 +21277,7 @@ public class NIVision { points[i].setBuffer(points_buf, off); points[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqInterpolatePoints(image.getAddress(), getByteBufferAddress(points_buf), numPoints, method.getValue(), subpixel, rv_addr+0); InterpolatePointsResult rv = new InterpolatePointsResult(rv_buf, jn_rv); @@ -21290,15 +21290,15 @@ public class NIVision { */ public static RGBValue imaqClipboardToImage(Image dest) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqClipboardToImage(dest.getAddress(), rv_addr+0); + _imaqClipboardToImage(dest.getAddress(), rv_addr+0); RGBValue palette; palette = new RGBValue(rv_buf, 0); palette.read(); return palette; } - private static native long _imaqClipboardToImage(long dest, long palette); + private static native void _imaqClipboardToImage(long dest, long palette); public static void imaqImageToClipboard(Image image, RGBValue palette) { @@ -21319,14 +21319,14 @@ public class NIVision { private static native void _imaqFillBorder(long image, int method); public static int imaqGetBorderSize(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetBorderSize(image.getAddress(), rv_addr+0); + _imaqGetBorderSize(image.getAddress(), rv_addr+0); int borderSize; borderSize = rv_buf.getInt(0); return borderSize; } - private static native int _imaqGetBorderSize(long image, long borderSize); + private static native void _imaqGetBorderSize(long image, long borderSize); public static void imaqSetBorderSize(Image image, int size) { @@ -21396,14 +21396,14 @@ public class NIVision { private static native long _imaqSupervisedColorSegmentation(long session, long labelImage, long srcImage, long roi, long labelIn, int numLabelIn, int maxDistance, int minIdentificationScore, long segmentOptions); public static int imaqGetColorSegmentationMaxDistance(ClassifierSession session, ColorSegmenationOptions segmentOptions, SegmentationDistanceLevel distLevel) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetColorSegmentationMaxDistance(session.getAddress(), segmentOptions.getAddress(), distLevel.getValue(), rv_addr+0); + _imaqGetColorSegmentationMaxDistance(session.getAddress(), segmentOptions.getAddress(), distLevel.getValue(), rv_addr+0); int maxDistance; maxDistance = rv_buf.getInt(0); return maxDistance; } - private static native int _imaqGetColorSegmentationMaxDistance(long session, long segmentOptions, int distLevel, long maxDistance); + private static native void _imaqGetColorSegmentationMaxDistance(long session, long segmentOptions, int distLevel, long maxDistance); /** * Transform functions @@ -21438,28 +21438,28 @@ public class NIVision { private static native void _imaqMathTransform(long dest, long source, int method, float rangeMin, float rangeMax, float power, long mask); public static int imaqWatershedTransform(Image dest, Image source, int connectivity8) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqWatershedTransform(dest.getAddress(), source.getAddress(), connectivity8, rv_addr+0); + _imaqWatershedTransform(dest.getAddress(), source.getAddress(), connectivity8, rv_addr+0); int zoneCount; zoneCount = rv_buf.getInt(0); return zoneCount; } - private static native int _imaqWatershedTransform(long dest, long source, int connectivity8, long zoneCount); + private static native void _imaqWatershedTransform(long dest, long source, int connectivity8, long zoneCount); /** * Window Management functions */ public static int imaqAreScrollbarsVisible(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqAreScrollbarsVisible(windowNumber, rv_addr+0); + _imaqAreScrollbarsVisible(windowNumber, rv_addr+0); int visible; visible = rv_buf.getInt(0); return visible; } - private static native int _imaqAreScrollbarsVisible(int windowNumber, long visible); + private static native void _imaqAreScrollbarsVisible(int windowNumber, long visible); public static void imaqBringWindowToTop(int windowNumber) { @@ -21479,7 +21479,7 @@ public class NIVision { } public static GetMousePosResult imaqGetMousePos() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetMousePos(rv_addr+0, rv_addr+8); GetMousePosResult rv = new GetMousePosResult(rv_buf); @@ -21503,7 +21503,7 @@ public class NIVision { } public static GetWindowBackgroundResult imaqGetWindowBackground(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(40).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetWindowBackground(windowNumber, rv_addr+0, rv_addr+8, rv_addr+16, rv_addr+24); GetWindowBackgroundResult rv = new GetWindowBackgroundResult(rv_buf); @@ -21512,15 +21512,15 @@ public class NIVision { private static native void _imaqGetWindowBackground(int windowNumber, long fillStyle, long hatchStyle, long fillColor, long backgroundColor); public static DisplayMapping imaqGetWindowDisplayMapping(int windowNum) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetWindowDisplayMapping(windowNum, rv_addr+0); + _imaqGetWindowDisplayMapping(windowNum, rv_addr+0); DisplayMapping mapping; mapping = new DisplayMapping(rv_buf, 0); mapping.read(); return mapping; } - private static native long _imaqGetWindowDisplayMapping(int windowNum, long mapping); + private static native void _imaqGetWindowDisplayMapping(int windowNum, long mapping); public static class GetWindowGridResult { public int xResolution; @@ -21532,7 +21532,7 @@ public class NIVision { } public static GetWindowGridResult imaqGetWindowGrid(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetWindowGrid(windowNumber, rv_addr+0, rv_addr+8); GetWindowGridResult rv = new GetWindowGridResult(rv_buf); @@ -21541,25 +21541,25 @@ public class NIVision { private static native void _imaqGetWindowGrid(int windowNumber, long xResolution, long yResolution); public static int imaqGetWindowHandle() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetWindowHandle(rv_addr+0); + _imaqGetWindowHandle(rv_addr+0); int handle; handle = rv_buf.getInt(0); return handle; } - private static native int _imaqGetWindowHandle(long handle); + private static native void _imaqGetWindowHandle(long handle); public static Point imaqGetWindowPos(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetWindowPos(windowNumber, rv_addr+0); + _imaqGetWindowPos(windowNumber, rv_addr+0); Point position; position = new Point(rv_buf, 0); position.read(); return position; } - private static native long _imaqGetWindowPos(int windowNumber, long position); + private static native void _imaqGetWindowPos(int windowNumber, long position); public static class GetWindowSizeResult { public int width; @@ -21571,7 +21571,7 @@ public class NIVision { } public static GetWindowSizeResult imaqGetWindowSize(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetWindowSize(windowNumber, rv_addr+0, rv_addr+8); GetWindowSizeResult rv = new GetWindowSizeResult(rv_buf); @@ -21597,7 +21597,7 @@ public class NIVision { } public static GetWindowZoom2Result imaqGetWindowZoom2(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetWindowZoom2(windowNumber, rv_addr+0, rv_addr+8); GetWindowZoom2Result rv = new GetWindowZoom2Result(rv_buf); @@ -21606,24 +21606,24 @@ public class NIVision { private static native void _imaqGetWindowZoom2(int windowNumber, long xZoom, long yZoom); public static int imaqIsWindowNonTearing(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqIsWindowNonTearing(windowNumber, rv_addr+0); + _imaqIsWindowNonTearing(windowNumber, rv_addr+0); int nonTearing; nonTearing = rv_buf.getInt(0); return nonTearing; } - private static native int _imaqIsWindowNonTearing(int windowNumber, long nonTearing); + private static native void _imaqIsWindowNonTearing(int windowNumber, long nonTearing); public static int imaqIsWindowVisible(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqIsWindowVisible(windowNumber, rv_addr+0); + _imaqIsWindowVisible(windowNumber, rv_addr+0); int visible; visible = rv_buf.getInt(0); return visible; } - private static native int _imaqIsWindowVisible(int windowNumber, long visible); + private static native void _imaqIsWindowVisible(int windowNumber, long visible); public static void imaqMoveWindow(int windowNumber, Point position) { @@ -21744,14 +21744,14 @@ public class NIVision { */ public static int imaqMulticoreOptions(MulticoreOperation operation) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqMulticoreOptions(operation.getValue(), rv_addr+0); + _imaqMulticoreOptions(operation.getValue(), rv_addr+0); int customNumCores; customNumCores = rv_buf.getInt(0); return customNumCores; } - private static native int _imaqMulticoreOptions(int operation, long customNumCores); + private static native void _imaqMulticoreOptions(int operation, long customNumCores); /** * Tool Window functions @@ -21765,14 +21765,14 @@ public class NIVision { private static native void _imaqCloseToolWindow(); public static Tool imaqGetCurrentTool() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqGetCurrentTool(rv_addr+0); + _imaqGetCurrentTool(rv_addr+0); Tool currentTool; currentTool = Tool.fromValue(rv_buf.getInt(0)); return currentTool; } - private static native int _imaqGetCurrentTool(long currentTool); + private static native void _imaqGetCurrentTool(long currentTool); public static class GetLastEventResult { public WindowEventType type; @@ -21789,7 +21789,7 @@ public class NIVision { } public static GetLastEventResult imaqGetLastEvent() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(40).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetLastEvent(rv_addr+0, rv_addr+8, rv_addr+16, rv_addr+24); GetLastEventResult rv = new GetLastEventResult(rv_buf); @@ -21798,25 +21798,25 @@ public class NIVision { private static native void _imaqGetLastEvent(long type, long windowNumber, long tool, long rect); public static Point imaqGetToolWindowPos() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetToolWindowPos(rv_addr+0); + _imaqGetToolWindowPos(rv_addr+0); Point position; position = new Point(rv_buf, 0); position.read(); return position; } - private static native long _imaqGetToolWindowPos(long position); + private static native void _imaqGetToolWindowPos(long position); public static int imaqIsToolWindowVisible() { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqIsToolWindowVisible(rv_addr+0); + _imaqIsToolWindowVisible(rv_addr+0); int visible; visible = rv_buf.getInt(0); return visible; } - private static native int _imaqIsToolWindowVisible(long visible); + private static native void _imaqIsToolWindowVisible(long visible); public static void imaqMoveToolWindow(Point position) { @@ -21876,7 +21876,7 @@ public class NIVision { } public static ReadMeterResult imaqReadMeter(Image image, MeterArc arcInfo) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqReadMeter(image.getAddress(), arcInfo.getAddress(), rv_addr+0, rv_addr+8); ReadMeterResult rv = new ReadMeterResult(rv_buf); @@ -21912,24 +21912,24 @@ public class NIVision { private static native long _imaqGetCalibrationInfo3(long image, int isGetErrorMap); public static float imaqLearnCalibrationGrid(Image image, ROI roi, LearnCalibrationOptions options, GridDescriptor grid, CoordinateSystem system, RangeFloat range) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqLearnCalibrationGrid(image.getAddress(), roi.getAddress(), options.getAddress(), grid.getAddress(), system.getAddress(), range.getAddress(), rv_addr+0); + _imaqLearnCalibrationGrid(image.getAddress(), roi.getAddress(), options.getAddress(), grid.getAddress(), system.getAddress(), range.getAddress(), rv_addr+0); float quality; quality = rv_buf.getFloat(0); return quality; } - private static native float _imaqLearnCalibrationGrid(long image, long roi, long options, long grid, long system, long range, long quality); + private static native void _imaqLearnCalibrationGrid(long image, long roi, long options, long grid, long system, long range, long quality); public static float imaqLearnCalibrationPoints(Image image, CalibrationPoints points, ROI roi, LearnCalibrationOptions options, GridDescriptor grid, CoordinateSystem system) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqLearnCalibrationPoints(image.getAddress(), points.getAddress(), roi.getAddress(), options.getAddress(), grid.getAddress(), system.getAddress(), rv_addr+0); + _imaqLearnCalibrationPoints(image.getAddress(), points.getAddress(), roi.getAddress(), options.getAddress(), grid.getAddress(), system.getAddress(), rv_addr+0); float quality; quality = rv_buf.getFloat(0); return quality; } - private static native float _imaqLearnCalibrationPoints(long image, long points, long roi, long options, long grid, long system, long quality); + private static native void _imaqLearnCalibrationPoints(long image, long points, long roi, long options, long grid, long system, long quality); public static void imaqSetCoordinateSystem(Image image, CoordinateSystem system) { @@ -21981,15 +21981,15 @@ public class NIVision { private static native void _imaqSetSimpleCalibration2(long image, long gridDescriptor); public static CoordinateSystem imaqCalibrationSetAxisInfo(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqCalibrationSetAxisInfo(image.getAddress(), rv_addr+0); + _imaqCalibrationSetAxisInfo(image.getAddress(), rv_addr+0); CoordinateSystem axisInfo; axisInfo = new CoordinateSystem(rv_buf, 0); axisInfo.read(); return axisInfo; } - private static native long _imaqCalibrationSetAxisInfo(long image, long axisInfo); + private static native void _imaqCalibrationSetAxisInfo(long image, long axisInfo); public static void imaqCalibrationGetThumbnailImage(Image templateImage, Image image, CalibrationThumbnailType type, int index) { @@ -22086,7 +22086,7 @@ public class NIVision { } public static MatchColorResult imaqMatchColor(Image image, ColorInformation info, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchColor(image.getAddress(), info.getAddress(), roi == null ? 0 : roi.getAddress(), rv_addr+0); MatchColorResult rv = new MatchColorResult(rv_buf, jn_rv); @@ -22145,15 +22145,15 @@ public class NIVision { */ public static AIMGradeReport imaqGradeDataMatrixBarcodeAIM(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGradeDataMatrixBarcodeAIM(image.getAddress(), rv_addr+0); + _imaqGradeDataMatrixBarcodeAIM(image.getAddress(), rv_addr+0); AIMGradeReport report; report = new AIMGradeReport(rv_buf, 0); report.read(); return report; } - private static native long _imaqGradeDataMatrixBarcodeAIM(long image, long report); + private static native void _imaqGradeDataMatrixBarcodeAIM(long image, long report); public static BarcodeInfo imaqReadBarcode(Image image, BarcodeType type, ROI roi, int validate) { @@ -22196,7 +22196,7 @@ public class NIVision { } public static ReadPDF417BarcodeResult imaqReadPDF417Barcode(Image image, ROI roi, Barcode2DSearchMode searchMode) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqReadPDF417Barcode(image.getAddress(), roi.getAddress(), searchMode.getValue(), rv_addr+0); ReadPDF417BarcodeResult rv = new ReadPDF417BarcodeResult(rv_buf, jn_rv); @@ -22260,7 +22260,7 @@ public class NIVision { } public static MatchShapeResult imaqMatchShape(Image dest, Image source, Image templateImage, int scaleInvariant, int connectivity8, double tolerance) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchShape(dest.getAddress(), source.getAddress(), templateImage.getAddress(), scaleInvariant, connectivity8, tolerance, rv_addr+0); MatchShapeResult rv = new MatchShapeResult(rv_buf, jn_rv); @@ -22365,15 +22365,15 @@ public class NIVision { private static native int _imaqGetContour(long roi, int index); public static RGBValue imaqGetContourColor(ROI roi, int id) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetContourColor(roi.getAddress(), id, rv_addr+0); + _imaqGetContourColor(roi.getAddress(), id, rv_addr+0); RGBValue contourColor; contourColor = new RGBValue(rv_buf, 0); contourColor.read(); return contourColor; } - private static native long _imaqGetContourColor(long roi, int id, long contourColor); + private static native void _imaqGetContourColor(long roi, int id, long contourColor); public static void imaqGetContourCount(ROI roi) { @@ -22416,14 +22416,14 @@ public class NIVision { */ public static int imaqConstructROI2(Image image, ROI roi, Tool initialTool, ToolWindowOptions tools, ConstructROIOptions2 options) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqConstructROI2(image.getAddress(), roi.getAddress(), initialTool.getValue(), tools.getAddress(), options.getAddress(), rv_addr+0); + _imaqConstructROI2(image.getAddress(), roi.getAddress(), initialTool.getValue(), tools.getAddress(), options.getAddress(), rv_addr+0); int okay; okay = rv_buf.getInt(0); return okay; } - private static native int _imaqConstructROI2(long image, long roi, int initialTool, long tools, long options, long okay); + private static native void _imaqConstructROI2(long image, long roi, int initialTool, long tools, long options, long okay); public static ROI imaqCreateROI() { @@ -22434,26 +22434,26 @@ public class NIVision { private static native long _imaqCreateROI(); public static Rect imaqGetROIBoundingBox(ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetROIBoundingBox(roi.getAddress(), rv_addr+0); + _imaqGetROIBoundingBox(roi.getAddress(), rv_addr+0); Rect boundingBox; boundingBox = new Rect(rv_buf, 0); boundingBox.read(); return boundingBox; } - private static native long _imaqGetROIBoundingBox(long roi, long boundingBox); + private static native void _imaqGetROIBoundingBox(long roi, long boundingBox); public static RGBValue imaqGetROIColor(ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetROIColor(roi.getAddress(), rv_addr+0); + _imaqGetROIColor(roi.getAddress(), rv_addr+0); RGBValue roiColor; roiColor = new RGBValue(rv_buf, 0); roiColor.read(); return roiColor; } - private static native long _imaqGetROIColor(long roi, long roiColor); + private static native void _imaqGetROIColor(long roi, long roiColor); public static ROI imaqGetWindowROI(int windowNumber) { @@ -22482,15 +22482,15 @@ public class NIVision { */ public static PointFloat imaqCentroid(Image image, Image mask) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqCentroid(image.getAddress(), rv_addr+0, mask.getAddress()); + _imaqCentroid(image.getAddress(), rv_addr+0, mask.getAddress()); PointFloat centroid; centroid = new PointFloat(rv_buf, 0); centroid.read(); return centroid; } - private static native long _imaqCentroid(long image, long centroid, long mask); + private static native void _imaqCentroid(long image, long centroid, long mask); public static class ExtractCurvesResult { public Curve[] array; @@ -22517,7 +22517,7 @@ public class NIVision { } public static ExtractCurvesResult imaqExtractCurves(Image image, ROI roi, CurveOptions curveOptions) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqExtractCurves(image.getAddress(), roi.getAddress(), curveOptions.getAddress(), rv_addr+0); ExtractCurvesResult rv = new ExtractCurvesResult(rv_buf, jn_rv); @@ -22636,7 +22636,7 @@ public class NIVision { } public static DetectCirclesResult imaqDetectCircles(Image image, CircleDescriptor circleDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqDetectCircles(image.getAddress(), circleDescriptor.getAddress(), curveOptions.getAddress(), shapeDetectionOptions.getAddress(), roi.getAddress(), rv_addr+0); DetectCirclesResult rv = new DetectCirclesResult(rv_buf, jn_rv); @@ -22669,7 +22669,7 @@ public class NIVision { } public static DetectEllipsesResult imaqDetectEllipses(Image image, EllipseDescriptor ellipseDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqDetectEllipses(image.getAddress(), ellipseDescriptor.getAddress(), curveOptions.getAddress(), shapeDetectionOptions.getAddress(), roi.getAddress(), rv_addr+0); DetectEllipsesResult rv = new DetectEllipsesResult(rv_buf, jn_rv); @@ -22702,7 +22702,7 @@ public class NIVision { } public static DetectLinesResult imaqDetectLines(Image image, LineDescriptor lineDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqDetectLines(image.getAddress(), lineDescriptor.getAddress(), curveOptions.getAddress(), shapeDetectionOptions.getAddress(), roi.getAddress(), rv_addr+0); DetectLinesResult rv = new DetectLinesResult(rv_buf, jn_rv); @@ -22735,7 +22735,7 @@ public class NIVision { } public static DetectRectanglesResult imaqDetectRectangles(Image image, RectangleDescriptor rectangleDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqDetectRectangles(image.getAddress(), rectangleDescriptor.getAddress(), curveOptions.getAddress(), shapeDetectionOptions.getAddress(), roi.getAddress(), rv_addr+0); DetectRectanglesResult rv = new DetectRectanglesResult(rv_buf, jn_rv); @@ -22782,7 +22782,7 @@ public class NIVision { if (featureTypes != null) featureTypes_buf.putInt(off, featureTypes[i].getValue()); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetGeometricFeaturesFromCurves(getByteBufferAddress(curves_buf), numCurves, getByteBufferAddress(featureTypes_buf), numFeatureTypes, rv_addr+0); GetGeometricFeaturesFromCurvesResult rv = new GetGeometricFeaturesFromCurvesResult(rv_buf, jn_rv); @@ -22815,7 +22815,7 @@ public class NIVision { } public static GetGeometricTemplateFeatureInfoResult imaqGetGeometricTemplateFeatureInfo(Image pattern) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetGeometricTemplateFeatureInfo(pattern.getAddress(), rv_addr+0); GetGeometricTemplateFeatureInfoResult rv = new GetGeometricTemplateFeatureInfoResult(rv_buf, jn_rv); @@ -22838,15 +22838,15 @@ public class NIVision { private static native void _imaqLearnGeometricPattern(long image, long originOffset, long curveOptions, long advancedLearnOptions, long mask); public static LearnPatternAdvancedOptions imaqLearnPattern3(Image image, LearningMode learningMode, Image mask) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqLearnPattern3(image.getAddress(), learningMode.getValue(), rv_addr+0, mask.getAddress()); + _imaqLearnPattern3(image.getAddress(), learningMode.getValue(), rv_addr+0, mask.getAddress()); LearnPatternAdvancedOptions advancedOptions; advancedOptions = new LearnPatternAdvancedOptions(rv_buf, 0); advancedOptions.read(); return advancedOptions; } - private static native long _imaqLearnPattern3(long image, int learningMode, long advancedOptions, long mask); + private static native void _imaqLearnPattern3(long image, int learningMode, long advancedOptions, long mask); public static class MatchColorPatternResult { public PatternMatch[] array; @@ -22873,7 +22873,7 @@ public class NIVision { } public static MatchColorPatternResult imaqMatchColorPattern(Image image, Image pattern, MatchColorPatternOptions options, Rect searchRect) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchColorPattern(image.getAddress(), pattern.getAddress(), options.getAddress(), searchRect.getAddress(), rv_addr+0); MatchColorPatternResult rv = new MatchColorPatternResult(rv_buf, jn_rv); @@ -22906,7 +22906,7 @@ public class NIVision { } public static MatchGeometricPattern2Result imaqMatchGeometricPattern2(Image image, Image pattern, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions2 advancedMatchOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchGeometricPattern2(image.getAddress(), pattern.getAddress(), curveOptions.getAddress(), matchOptions.getAddress(), advancedMatchOptions.getAddress(), roi.getAddress(), rv_addr+0); MatchGeometricPattern2Result rv = new MatchGeometricPattern2Result(rv_buf, jn_rv); @@ -22939,7 +22939,7 @@ public class NIVision { } public static MatchMultipleGeometricPatternsResult imaqMatchMultipleGeometricPatterns(Image image, MultipleGeometricPattern multiplePattern, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchMultipleGeometricPatterns(image.getAddress(), multiplePattern.getAddress(), roi.getAddress(), rv_addr+0); MatchMultipleGeometricPatternsResult rv = new MatchMultipleGeometricPatternsResult(rv_buf, jn_rv); @@ -23015,7 +23015,7 @@ public class NIVision { candidatesIn[i].setBuffer(candidatesIn_buf, off); candidatesIn[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqRefineMatches(image.getAddress(), pattern.getAddress(), getByteBufferAddress(candidatesIn_buf), numCandidatesIn, rv_addr+0, rv_addr+8, rv_addr+16); RefineMatchesResult rv = new RefineMatchesResult(rv_buf, jn_rv); @@ -23093,7 +23093,7 @@ public class NIVision { } public static MatchGeometricPattern3Result imaqMatchGeometricPattern3(Image image, Image pattern, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions3 advancedMatchOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchGeometricPattern3(image.getAddress(), pattern.getAddress(), curveOptions.getAddress(), matchOptions.getAddress(), advancedMatchOptions.getAddress(), roi.getAddress(), rv_addr+0); MatchGeometricPattern3Result rv = new MatchGeometricPattern3Result(rv_buf, jn_rv); @@ -23133,7 +23133,7 @@ public class NIVision { } public static MatchPattern3Result imaqMatchPattern3(Image image, Image pattern, MatchPatternOptions options, MatchPatternAdvancedOptions advancedOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchPattern3(image.getAddress(), pattern.getAddress(), options == null ? 0 : options.getAddress(), advancedOptions.getAddress(), roi.getAddress(), rv_addr+0); MatchPattern3Result rv = new MatchPattern3Result(rv_buf, jn_rv); @@ -23191,15 +23191,15 @@ public class NIVision { group_buf = ByteBuffer.allocateDirect(group_bytes.length+1); putBytes(group_buf, group_bytes, 0, group_bytes.length).put(group_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetOverlayProperties(image.getAddress(), group == null ? 0 : getByteBufferAddress(group_buf), rv_addr+0); + _imaqGetOverlayProperties(image.getAddress(), group == null ? 0 : getByteBufferAddress(group_buf), rv_addr+0); TransformBehaviors transformBehaviors; transformBehaviors = new TransformBehaviors(rv_buf, 0); transformBehaviors.read(); return transformBehaviors; } - private static native long _imaqGetOverlayProperties(long image, long group, long transformBehaviors); + private static native void _imaqGetOverlayProperties(long image, long group, long transformBehaviors); public static void imaqMergeOverlay(Image dest, Image source, RGBValue[] palette, String group) { int numColors = palette.length; @@ -23342,14 +23342,14 @@ public class NIVision { private static native void _imaqOverlayOpenContour(long image, long points, int numPoints, long color, long group); public static byte imaqOverlayOval(Image image, Rect boundingBox, RGBValue color, DrawMode drawMode) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - byte jn_rv = _imaqOverlayOval(image.getAddress(), boundingBox.getAddress(), color.getAddress(), drawMode.getValue(), rv_addr+0); + _imaqOverlayOval(image.getAddress(), boundingBox.getAddress(), color.getAddress(), drawMode.getValue(), rv_addr+0); byte group; group = rv_buf.get(0); return group; } - private static native byte _imaqOverlayOval(long image, long boundingBox, long color, int drawMode, long group); + private static native void _imaqOverlayOval(long image, long boundingBox, long color, int drawMode, long group); public static void imaqOverlayPoints(Image image, Point[] points, RGBValue[] colors, PointSymbol symbol, UserPointSymbol userSymbol, String group) { int numPoints = points.length; @@ -23456,15 +23456,15 @@ public class NIVision { group_buf = ByteBuffer.allocateDirect(group_bytes.length+1); putBytes(group_buf, group_bytes, 0, group_bytes.length).put(group_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqSetOverlayProperties(image.getAddress(), group == null ? 0 : getByteBufferAddress(group_buf), rv_addr+0); + _imaqSetOverlayProperties(image.getAddress(), group == null ? 0 : getByteBufferAddress(group_buf), rv_addr+0); TransformBehaviors transformBehaviors; transformBehaviors = new TransformBehaviors(rv_buf, 0); transformBehaviors.read(); return transformBehaviors; } - private static native long _imaqSetOverlayProperties(long image, long group, long transformBehaviors); + private static native void _imaqSetOverlayProperties(long image, long group, long transformBehaviors); /** * OCR functions @@ -23538,7 +23538,7 @@ public class NIVision { for (int i=bytes.length; i<256; i++) setDescription_buf.put(i, (byte)0); // fill with zero } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqReadOCRFile(fileName == null ? 0 : getByteBufferAddress(fileName_buf), set.getAddress(), setDescription == null ? 0 : getByteBufferAddress(setDescription_buf), rv_addr+0, rv_addr+8, rv_addr+16); ReadOCRFileResult rv = new ReadOCRFileResult(rv_buf); @@ -23627,7 +23627,7 @@ public class NIVision { expectedString_buf = ByteBuffer.allocateDirect(expectedString_bytes.length+1); putBytes(expectedString_buf, expectedString_bytes, 0, expectedString_bytes.length).put(expectedString_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqVerifyText(image.getAddress(), set.getAddress(), expectedString == null ? 0 : getByteBufferAddress(expectedString_buf), roi.getAddress(), rv_addr+0); VerifyTextResult rv = new VerifyTextResult(rv_buf, jn_rv); @@ -23677,7 +23677,7 @@ public class NIVision { } public static ExtractContourResult imaqExtractContour(Image image, ROI roi, ExtractContourDirection direction, ConnectionConstraint connectionConstraintParams, int numOfConstraints, ExtractContourSelection selection, Image contourImage) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqExtractContour(image.getAddress(), roi.getAddress(), direction.getValue(), rv_addr+0, connectionConstraintParams.getAddress(), numOfConstraints, selection.getValue(), contourImage.getAddress()); ExtractContourResult rv = new ExtractContourResult(rv_buf); @@ -23775,7 +23775,7 @@ public class NIVision { rangeSettings[i].setBuffer(rangeSettings_buf, off); rangeSettings[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqContourSetupMatchPattern(rv_addr+0, enableSubPixelAccuracy, rv_addr+8, useLearnCurveParameters, getByteBufferAddress(rangeSettings_buf), numRangeSettings); ContourSetupMatchPatternResult rv = new ContourSetupMatchPatternResult(rv_buf); @@ -23792,15 +23792,15 @@ public class NIVision { geometricOptions[i].setBuffer(geometricOptions_buf, off); geometricOptions[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqContourAdvancedSetupMatchPattern(rv_addr+0, getByteBufferAddress(geometricOptions_buf), numGeometricOptions); + _imaqContourAdvancedSetupMatchPattern(rv_addr+0, getByteBufferAddress(geometricOptions_buf), numGeometricOptions); SetupMatchPatternData matchSetupData; matchSetupData = new SetupMatchPatternData(rv_buf, 0); matchSetupData.read(); return matchSetupData; } - private static native long _imaqContourAdvancedSetupMatchPattern(long matchSetupData, long geometricOptions, int numGeometricOptions); + private static native void _imaqContourAdvancedSetupMatchPattern(long matchSetupData, long geometricOptions, int numGeometricOptions); public static ContourFitLineReport imaqContourFitLine(Image image, double pixelRadius) { @@ -23916,7 +23916,7 @@ public class NIVision { } public static MaskToROIResult imaqMaskToROI(Image mask) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMaskToROI(mask.getAddress(), rv_addr+0); MaskToROIResult rv = new MaskToROIResult(rv_buf); @@ -23934,14 +23934,14 @@ public class NIVision { private static native long _imaqROIProfile(long image, long roi); public static int imaqROIToMask(Image mask, ROI roi, int fillValue, Image imageModel) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqROIToMask(mask.getAddress(), roi.getAddress(), fillValue, imageModel == null ? 0 : imageModel.getAddress(), rv_addr+0); + _imaqROIToMask(mask.getAddress(), roi.getAddress(), fillValue, imageModel == null ? 0 : imageModel.getAddress(), rv_addr+0); int inSpace; inSpace = rv_buf.getInt(0); return inSpace; } - private static native int _imaqROIToMask(long mask, long roi, int fillValue, long imageModel, long inSpace); + private static native void _imaqROIToMask(long mask, long roi, int fillValue, long imageModel, long inSpace); public static void imaqTransformROI2(ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem) { @@ -24051,7 +24051,7 @@ public class NIVision { } public static GetClassifierSampleInfoResult imaqGetClassifierSampleInfo(ClassifierSession session, int index) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetClassifierSampleInfo(session.getAddress(), index, rv_addr+0); GetClassifierSampleInfoResult rv = new GetClassifierSampleInfoResult(rv_buf); @@ -24061,26 +24061,26 @@ public class NIVision { private static native long _imaqGetClassifierSampleInfo(long session, int index, long numSamples); public static ColorOptions imaqGetColorClassifierOptions(ClassifierSession session) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetColorClassifierOptions(session.getAddress(), rv_addr+0); + _imaqGetColorClassifierOptions(session.getAddress(), rv_addr+0); ColorOptions options; options = new ColorOptions(rv_buf, 0); options.read(); return options; } - private static native long _imaqGetColorClassifierOptions(long session, long options); + private static native void _imaqGetColorClassifierOptions(long session, long options); public static NearestNeighborOptions imaqGetNearestNeighborOptions(ClassifierSession session) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqGetNearestNeighborOptions(session.getAddress(), rv_addr+0); + _imaqGetNearestNeighborOptions(session.getAddress(), rv_addr+0); NearestNeighborOptions options; options = new NearestNeighborOptions(rv_buf, 0); options.read(); return options; } - private static native long _imaqGetNearestNeighborOptions(long session, long options); + private static native void _imaqGetNearestNeighborOptions(long session, long options); public static class GetParticleClassifierOptions2Result { public ParticleClassifierPreprocessingOptions2 preprocessingOptions; @@ -24094,7 +24094,7 @@ public class NIVision { } public static GetParticleClassifierOptions2Result imaqGetParticleClassifierOptions2(ClassifierSession session) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetParticleClassifierOptions2(session.getAddress(), rv_addr+0, rv_addr+8); GetParticleClassifierOptions2Result rv = new GetParticleClassifierOptions2Result(rv_buf); @@ -24136,7 +24136,7 @@ public class NIVision { for (int i=bytes.length; i<256; i++) description_buf.put(i, (byte)0); // fill with zero } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqReadClassifierFile(session.getAddress(), fileName == null ? 0 : getByteBufferAddress(fileName_buf), mode.getValue(), rv_addr+0, rv_addr+8, description == null ? 0 : getByteBufferAddress(description_buf)); ReadClassifierFileResult rv = new ReadClassifierFileResult(rv_buf); @@ -24289,7 +24289,7 @@ public class NIVision { } public static SelectParticlesResult imaqSelectParticles(Image image, ParticleReport reports, int reportCount, int rejectBorder, SelectParticleCriteria criteria, int criteriaCount) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqSelectParticles(image.getAddress(), reports.getAddress(), reportCount, rejectBorder, criteria.getAddress(), criteriaCount, rv_addr+0); SelectParticlesResult rv = new SelectParticlesResult(rv_buf, jn_rv); @@ -24329,7 +24329,7 @@ public class NIVision { } public static GetParticleInfoResult imaqGetParticleInfo(Image image, int connectivity8, ParticleInfoMode mode) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqGetParticleInfo(image.getAddress(), connectivity8, mode.getValue(), rv_addr+0); GetParticleInfoResult rv = new GetParticleInfoResult(rv_buf, jn_rv); @@ -24338,14 +24338,14 @@ public class NIVision { private static native long _imaqGetParticleInfo(long image, int connectivity8, int mode, long reportCount); public static float imaqCalcCoeff(Image image, ParticleReport report, MeasurementValue parameter) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqCalcCoeff(image.getAddress(), report.getAddress(), parameter.getValue(), rv_addr+0); + _imaqCalcCoeff(image.getAddress(), report.getAddress(), parameter.getValue(), rv_addr+0); float coefficient; coefficient = rv_buf.getFloat(0); return coefficient; } - private static native float _imaqCalcCoeff(long image, long report, int parameter, long coefficient); + private static native void _imaqCalcCoeff(long image, long report, int parameter, long coefficient); public static class EdgeToolResult { public EdgeReport[] array; @@ -24372,7 +24372,7 @@ public class NIVision { } public static EdgeToolResult imaqEdgeTool(Image image, Point points, int numPoints, EdgeOptions options) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqEdgeTool(image.getAddress(), points.getAddress(), numPoints, options.getAddress(), rv_addr+0); EdgeToolResult rv = new EdgeToolResult(rv_buf, jn_rv); @@ -24405,7 +24405,7 @@ public class NIVision { } public static CirclesResult imaqCircles(Image dest, Image source, float minRadius, float maxRadius) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqCircles(dest.getAddress(), source.getAddress(), minRadius, maxRadius, rv_addr+0); CirclesResult rv = new CirclesResult(rv_buf, jn_rv); @@ -24414,14 +24414,14 @@ public class NIVision { private static native long _imaqCircles(long dest, long source, float minRadius, float maxRadius, long numCircles); public static int imaqLabel(Image dest, Image source, int connectivity8) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqLabel(dest.getAddress(), source.getAddress(), connectivity8, rv_addr+0); + _imaqLabel(dest.getAddress(), source.getAddress(), connectivity8, rv_addr+0); int particleCount; particleCount = rv_buf.getInt(0); return particleCount; } - private static native int _imaqLabel(long dest, long source, int connectivity8, long particleCount); + private static native void _imaqLabel(long dest, long source, int connectivity8, long particleCount); public static BestEllipse imaqFitEllipse(PointFloat[] points) { int numPoints = points.length; @@ -24431,15 +24431,15 @@ public class NIVision { points[i].setBuffer(points_buf, off); points[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqFitEllipse(getByteBufferAddress(points_buf), numPoints, rv_addr+0); + _imaqFitEllipse(getByteBufferAddress(points_buf), numPoints, rv_addr+0); BestEllipse ellipse; ellipse = new BestEllipse(rv_buf, 0); ellipse.read(); return ellipse; } - private static native long _imaqFitEllipse(long points, int numPoints, long ellipse); + private static native void _imaqFitEllipse(long points, int numPoints, long ellipse); public static BestCircle imaqFitCircle(PointFloat[] points) { int numPoints = points.length; @@ -24449,15 +24449,15 @@ public class NIVision { points[i].setBuffer(points_buf, off); points[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqFitCircle(getByteBufferAddress(points_buf), numPoints, rv_addr+0); + _imaqFitCircle(getByteBufferAddress(points_buf), numPoints, rv_addr+0); BestCircle circle; circle = new BestCircle(rv_buf, 0); circle.read(); return circle; } - private static native long _imaqFitCircle(long points, int numPoints, long circle); + private static native void _imaqFitCircle(long points, int numPoints, long circle); public static class MatchPatternResult { public PatternMatch[] array; @@ -24484,7 +24484,7 @@ public class NIVision { } public static MatchPatternResult imaqMatchPattern(Image image, Image pattern, MatchPatternOptions options, Rect searchRect) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchPattern(image.getAddress(), pattern.getAddress(), options == null ? 0 : options.getAddress(), searchRect.getAddress(), rv_addr+0); MatchPatternResult rv = new MatchPatternResult(rv_buf, jn_rv); @@ -24500,24 +24500,24 @@ public class NIVision { private static native void _imaqConvex(long dest, long source); public static int imaqIsVisionInfoPresent(Image image, VisionInfoType type) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqIsVisionInfoPresent(image.getAddress(), type.getValue(), rv_addr+0); + _imaqIsVisionInfoPresent(image.getAddress(), type.getValue(), rv_addr+0); int present; present = rv_buf.getInt(0); return present; } - private static native int _imaqIsVisionInfoPresent(long image, int type, long present); + private static native void _imaqIsVisionInfoPresent(long image, int type, long present); public static float imaqLineGaugeTool(Image image, Point start, Point end, LineGaugeMethod method, EdgeOptions edgeOptions, CoordinateTransform reference) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - float jn_rv = _imaqLineGaugeTool(image.getAddress(), start.getAddress(), end.getAddress(), method.getValue(), edgeOptions.getAddress(), reference == null ? 0 : reference.getAddress(), rv_addr+0); + _imaqLineGaugeTool(image.getAddress(), start.getAddress(), end.getAddress(), method.getValue(), edgeOptions.getAddress(), reference == null ? 0 : reference.getAddress(), rv_addr+0); float distance; distance = rv_buf.getFloat(0); return distance; } - private static native float _imaqLineGaugeTool(long image, long start, long end, int method, long edgeOptions, long reference, long distance); + private static native void _imaqLineGaugeTool(long image, long start, long end, int method, long edgeOptions, long reference, long distance); public static class BestCircleResult { public PointFloat center; @@ -24537,7 +24537,7 @@ public class NIVision { points[i].setBuffer(points_buf, off); points[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqBestCircle(getByteBufferAddress(points_buf), numPoints, rv_addr+0, rv_addr+8); BestCircleResult rv = new BestCircleResult(rv_buf); @@ -24597,7 +24597,7 @@ public class NIVision { } public static CoordinateReferenceResult imaqCoordinateReference(Point points, ReferenceMode mode) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqCoordinateReference(points.getAddress(), mode.getValue(), rv_addr+0, rv_addr+8); CoordinateReferenceResult rv = new CoordinateReferenceResult(rv_buf); @@ -24655,7 +24655,7 @@ public class NIVision { } public static GetCalibrationInfoResult imaqGetCalibrationInfo(Image image) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(32).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetCalibrationInfo(image.getAddress(), rv_addr+0, rv_addr+8, rv_addr+16); GetCalibrationInfoResult rv = new GetCalibrationInfoResult(rv_buf); @@ -24664,14 +24664,14 @@ public class NIVision { private static native void _imaqGetCalibrationInfo(long image, long unit, long xDistance, long yDistance); public static int imaqConstructROI(Image image, ROI roi, Tool initialTool, ToolWindowOptions tools, ConstructROIOptions options) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqConstructROI(image.getAddress(), roi.getAddress(), initialTool.getValue(), tools.getAddress(), options.getAddress(), rv_addr+0); + _imaqConstructROI(image.getAddress(), roi.getAddress(), initialTool.getValue(), tools.getAddress(), options.getAddress(), rv_addr+0); int okay; okay = rv_buf.getInt(0); return okay; } - private static native int _imaqConstructROI(long image, long roi, int initialTool, long tools, long options, long okay); + private static native void _imaqConstructROI(long image, long roi, int initialTool, long tools, long options, long okay); public static class GetParticleClassifierOptionsResult { public ParticleClassifierPreprocessingOptions preprocessingOptions; @@ -24685,7 +24685,7 @@ public class NIVision { } public static GetParticleClassifierOptionsResult imaqGetParticleClassifierOptions(ClassifierSession session) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetParticleClassifierOptions(session.getAddress(), rv_addr+0, rv_addr+8); GetParticleClassifierOptionsResult rv = new GetParticleClassifierOptionsResult(rv_buf); @@ -24710,7 +24710,7 @@ public class NIVision { } public static GetWindowZoomResult imaqGetWindowZoom(int windowNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(24).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8+8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); _imaqGetWindowZoom(windowNumber, rv_addr+0, rv_addr+8); GetWindowZoomResult rv = new GetWindowZoomResult(rv_buf); @@ -24719,14 +24719,14 @@ public class NIVision { private static native void _imaqGetWindowZoom(int windowNumber, long xZoom, long yZoom); public static int imaqParticleFilter3(Image dest, Image source, ParticleFilterCriteria2 criteria, int criteriaCount, ParticleFilterOptions options, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqParticleFilter3(dest.getAddress(), source.getAddress(), criteria.getAddress(), criteriaCount, options.getAddress(), roi.getAddress(), rv_addr+0); + _imaqParticleFilter3(dest.getAddress(), source.getAddress(), criteria.getAddress(), criteriaCount, options.getAddress(), roi.getAddress(), rv_addr+0); int numParticles; numParticles = rv_buf.getInt(0); return numParticles; } - private static native int _imaqParticleFilter3(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles); + private static native void _imaqParticleFilter3(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles); public static ReadTextReport2 imaqReadText2(Image image, CharSet set, ROI roi, ReadTextOptions readOptions, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions) { @@ -24737,15 +24737,15 @@ public class NIVision { private static native long _imaqReadText2(long image, long set, long roi, long readOptions, long processingOptions, long spacingOptions); public static LearnPatternAdvancedOptions imaqLearnPattern2(Image image, LearningMode learningMode) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - long jn_rv = _imaqLearnPattern2(image.getAddress(), learningMode.getValue(), rv_addr+0); + _imaqLearnPattern2(image.getAddress(), learningMode.getValue(), rv_addr+0); LearnPatternAdvancedOptions advancedOptions; advancedOptions = new LearnPatternAdvancedOptions(rv_buf, 0); advancedOptions.read(); return advancedOptions; } - private static native long _imaqLearnPattern2(long image, int learningMode, long advancedOptions); + private static native void _imaqLearnPattern2(long image, int learningMode, long advancedOptions); public static void imaqDivide(Image dest, Image sourceA, Image sourceB) { @@ -24810,7 +24810,7 @@ public class NIVision { } public static MatchPattern2Result imaqMatchPattern2(Image image, Image pattern, MatchPatternOptions options, MatchPatternAdvancedOptions advancedOptions, Rect searchRect) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchPattern2(image.getAddress(), pattern.getAddress(), options == null ? 0 : options.getAddress(), advancedOptions.getAddress(), searchRect.getAddress(), rv_addr+0); MatchPattern2Result rv = new MatchPattern2Result(rv_buf, jn_rv); @@ -24840,14 +24840,14 @@ public class NIVision { criteria[i].setBuffer(criteria_buf, off); criteria[i].write(); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _imaqParticleFilter2(dest.getAddress(), source.getAddress(), getByteBufferAddress(criteria_buf), criteriaCount, rejectMatches, connectivity8, rv_addr+0); + _imaqParticleFilter2(dest.getAddress(), source.getAddress(), getByteBufferAddress(criteria_buf), criteriaCount, rejectMatches, connectivity8, rv_addr+0); int numParticles; numParticles = rv_buf.getInt(0); return numParticles; } - private static native int _imaqParticleFilter2(long dest, long source, long criteria, int criteriaCount, int rejectMatches, int connectivity8, long numParticles); + private static native void _imaqParticleFilter2(long dest, long source, long criteria, int criteriaCount, int rejectMatches, int connectivity8, long numParticles); public static class EdgeTool2Result { public EdgeReport[] array; @@ -24874,7 +24874,7 @@ public class NIVision { } public static EdgeTool2Result imaqEdgeTool2(Image image, Point points, int numPoints, EdgeProcess process, EdgeOptions options) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqEdgeTool2(image.getAddress(), points.getAddress(), numPoints, process.getValue(), options.getAddress(), rv_addr+0); EdgeTool2Result rv = new EdgeTool2Result(rv_buf, jn_rv); @@ -24915,7 +24915,7 @@ public class NIVision { } public static ReadDataMatrixBarcodeResult imaqReadDataMatrixBarcode(Image image, ROI roi, DataMatrixOptions options) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqReadDataMatrixBarcode(image.getAddress(), roi.getAddress(), options.getAddress(), rv_addr+0); ReadDataMatrixBarcodeResult rv = new ReadDataMatrixBarcodeResult(rv_buf, jn_rv); @@ -24956,7 +24956,7 @@ public class NIVision { } public static MatchGeometricPatternResult imaqMatchGeometricPattern(Image image, Image pattern, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions advancedMatchOptions, ROI roi) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); long jn_rv = _imaqMatchGeometricPattern(image.getAddress(), pattern.getAddress(), curveOptions.getAddress(), matchOptions.getAddress(), advancedMatchOptions.getAddress(), roi.getAddress(), rv_addr+0); MatchGeometricPatternResult rv = new MatchGeometricPatternResult(rv_buf, jn_rv); @@ -25923,14 +25923,14 @@ public class NIVision { private static native void _IMAQdxConfigureGrab(int id); public static int IMAQdxGrab(int id, Image image, int waitForNextBuffer) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _IMAQdxGrab(id, image.getAddress(), waitForNextBuffer, rv_addr+0); + _IMAQdxGrab(id, image.getAddress(), waitForNextBuffer, rv_addr+0); int actualBufferNumber; actualBufferNumber = rv_buf.getInt(0); return actualBufferNumber; } - private static native int _IMAQdxGrab(int id, long image, int waitForNextBuffer, long actualBufferNumber); + private static native void _IMAQdxGrab(int id, long image, int waitForNextBuffer, long actualBufferNumber); public static void IMAQdxDiscoverEthernetCameras(String address, int timeout) { ByteBuffer address_buf = null; @@ -25978,14 +25978,14 @@ public class NIVision { name_buf = ByteBuffer.allocateDirect(name_bytes.length+1); putBytes(name_buf, name_bytes, 0, name_bytes.length).put(name_bytes.length, (byte)0); } - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _IMAQdxOpenCamera(name == null ? 0 : getByteBufferAddress(name_buf), mode.getValue(), rv_addr+0); + _IMAQdxOpenCamera(name == null ? 0 : getByteBufferAddress(name_buf), mode.getValue(), rv_addr+0); int id; id = rv_buf.getInt(0); return id; } - private static native int _IMAQdxOpenCamera(long name, int mode, long id); + private static native void _IMAQdxOpenCamera(long name, int mode, long id); public static void IMAQdxCloseCamera(int id) { @@ -26009,14 +26009,21 @@ public class NIVision { private static native void _IMAQdxStartAcquisition(int id); public static int IMAQdxGetImage(int id, Image image, IMAQdxBufferNumberMode mode, int desiredBufferNumber) { - ByteBuffer rv_buf = ByteBuffer.allocateDirect(16).order(ByteOrder.nativeOrder()); + ByteBuffer rv_buf = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()); long rv_addr = getByteBufferAddress(rv_buf); - int jn_rv = _IMAQdxGetImage(id, image.getAddress(), mode.getValue(), desiredBufferNumber, rv_addr+0); + _IMAQdxGetImage(id, image.getAddress(), mode.getValue(), desiredBufferNumber, rv_addr+0); int actualBufferNumber; actualBufferNumber = rv_buf.getInt(0); return actualBufferNumber; } - private static native int _IMAQdxGetImage(int id, long image, int mode, int desiredBufferNumber, long actualBufferNumber); + private static native void _IMAQdxGetImage(int id, long image, int mode, int desiredBufferNumber, long actualBufferNumber); + + public static int IMAQdxGetImageData(int id, ByteBuffer buffer, IMAQdxBufferNumberMode mode, int desiredBufferNumber) { + long buffer_addr = getByteBufferAddress(buffer); + int buffer_size = buffer.capacity(); + return _IMAQdxGetImageData(id, buffer_addr, buffer_size, mode.getValue(), desiredBufferNumber); + } + private static native int _IMAQdxGetImageData(int id, long buffer, int bufferSize, int mode, int desiredBufferNumber); public static void IMAQdxStopAcquisition(int id) { @@ -26032,6 +26039,34 @@ public class NIVision { } private static native void _IMAQdxUnconfigureAcquisition(int id); + public static class dxEnumerateVideoModesResult { + public IMAQdxEnumItem[] videoModeArray; + public int currentMode; + private ByteBuffer videoModeArray_buf; + private dxEnumerateVideoModesResult(ByteBuffer rv_buf, ByteBuffer videoModeArray_buf) { + this.videoModeArray_buf = videoModeArray_buf; + int count = rv_buf.getInt(0); + videoModeArray = new IMAQdxEnumItem[count]; + for (int i=0, off=0; iValue); +} +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeBool(IMAQdxSession id, const char* name, bool32 value) +{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeBool, value); +} + + /* * Opaque Structures */ @@ -165,28 +255,26 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqXor(JNIEnv* env, jclass * Particle Analysis functions */ -/* J: int imaqCountParticles(Image image, int connectivity8) - * JN: int imaqCountParticles(long image, int connectivity8, long numParticles) +/* J: void imaqCountParticles(Image image, int connectivity8) + * JN: void imaqCountParticles(long image, int connectivity8, long numParticles) * C: int imaqCountParticles(Image* image, int connectivity8, int* numParticles) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqCountParticles(JNIEnv* env, jclass , jlong image, jint connectivity8, jlong numParticles) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCountParticles(JNIEnv* env, jclass , jlong image, jint connectivity8, jlong numParticles) { int rv = imaqCountParticles((Image*)image, (int)connectivity8, (int*)numParticles); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: double imaqMeasureParticle(Image image, int particleNumber, int calibrated, MeasurementType measurement) - * JN: double imaqMeasureParticle(long image, int particleNumber, int calibrated, int measurement, long value) +/* J: void imaqMeasureParticle(Image image, int particleNumber, int calibrated, MeasurementType measurement) + * JN: void imaqMeasureParticle(long image, int particleNumber, int calibrated, int measurement, long value) * C: int imaqMeasureParticle(Image* image, int particleNumber, int calibrated, MeasurementType measurement, double* value) */ -JNIEXPORT jdouble JNICALL Java_com_ni_vision_NIVision__1imaqMeasureParticle(JNIEnv* env, jclass , jlong image, jint particleNumber, jint calibrated, jint measurement, jlong value) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMeasureParticle(JNIEnv* env, jclass , jlong image, jint particleNumber, jint calibrated, jint measurement, jlong value) { int rv = imaqMeasureParticle((Image*)image, (int)particleNumber, (int)calibrated, (MeasurementType)measurement, (double*)value); if (rv == 0) throwJavaException(env); - return (jdouble)rv; } /* J: MeasureParticlesReport imaqMeasureParticles(Image image, MeasureParticlesCalibrationMode calibrationMode, MeasurementType[] measurements) @@ -201,16 +289,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMeasureParticles(JNIEn return (jlong)rv; } -/* J: int imaqParticleFilter4(Image dest, Image source, ParticleFilterCriteria2[] criteria, ParticleFilterOptions2 options, ROI roi) - * JN: int imaqParticleFilter4(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles) +/* J: void imaqParticleFilter4(Image dest, Image source, ParticleFilterCriteria2[] criteria, ParticleFilterOptions2 options, ROI roi) + * JN: void imaqParticleFilter4(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles) * C: int imaqParticleFilter4(Image* dest, Image* source, const ParticleFilterCriteria2* criteria, int criteriaCount, const ParticleFilterOptions2* options, const ROI* roi, int* numParticles) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter4(JNIEnv* env, jclass , jlong dest, jlong source, jlong criteria, jint criteriaCount, jlong options, jlong roi, jlong numParticles) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter4(JNIEnv* env, jclass , jlong dest, jlong source, jlong criteria, jint criteriaCount, jlong options, jlong roi, jlong numParticles) { int rv = imaqParticleFilter4((Image*)dest, (Image*)source, (const ParticleFilterCriteria2*)criteria, (int)criteriaCount, (const ParticleFilterOptions2*)options, (const ROI*)roi, (int*)numParticles); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* @@ -262,16 +349,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFindCircles(JNIEnv* en return (jlong)rv; } -/* J: int imaqLabel2(Image dest, Image source, int connectivity8) - * JN: int imaqLabel2(long dest, long source, int connectivity8, long particleCount) +/* J: void imaqLabel2(Image dest, Image source, int connectivity8) + * JN: void imaqLabel2(long dest, long source, int connectivity8, long particleCount) * C: int imaqLabel2(Image* dest, Image* source, int connectivity8, int* particleCount) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqLabel2(JNIEnv* env, jclass , jlong dest, jlong source, jint connectivity8, jlong particleCount) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLabel2(JNIEnv* env, jclass , jlong dest, jlong source, jint connectivity8, jlong particleCount) { int rv = imaqLabel2((Image*)dest, (Image*)source, (int)connectivity8, (int*)particleCount); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqMorphology(Image dest, Image source, MorphologyMethod method, StructuringElement structuringElement) @@ -635,16 +721,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqDetectExtremes(JNIEnv* return (jlong)rv; } -/* J: double imaqDetectRotation(Image referenceImage, Image testImage, PointFloat referenceCenter, PointFloat testCenter, int radius, float precision) - * JN: double imaqDetectRotation(long referenceImage, long testImage, long referenceCenter, long testCenter, int radius, float precision, long angle) +/* J: void imaqDetectRotation(Image referenceImage, Image testImage, PointFloat referenceCenter, PointFloat testCenter, int radius, float precision) + * JN: void imaqDetectRotation(long referenceImage, long testImage, long referenceCenter, long testCenter, int radius, float precision, long angle) * C: int imaqDetectRotation(const Image* referenceImage, const Image* testImage, PointFloat referenceCenter, PointFloat testCenter, int radius, float precision, double* angle) */ -JNIEXPORT jdouble JNICALL Java_com_ni_vision_NIVision__1imaqDetectRotation(JNIEnv* env, jclass , jlong referenceImage, jlong testImage, jlong referenceCenter, jlong testCenter, jint radius, jfloat precision, jlong angle) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDetectRotation(JNIEnv* env, jclass , jlong referenceImage, jlong testImage, jlong referenceCenter, jlong testCenter, jint radius, jfloat precision, jlong angle) { int rv = imaqDetectRotation((const Image*)referenceImage, (const Image*)testImage, *((PointFloat*)referenceCenter), *((PointFloat*)testCenter), (int)radius, (float)precision, (double*)angle); if (rv == 0) throwJavaException(env); - return (jdouble)rv; } /* J: EdgeReport2 imaqEdgeTool4(Image image, ROI roi, EdgeProcess processType, int reverseDirection) @@ -693,16 +778,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFindTransformRects2(JNI if (rv == 0) throwJavaException(env); } -/* J: float imaqLineGaugeTool2(Image image, Point start, Point end, LineGaugeMethod method, EdgeOptions edgeOptions, CoordinateTransform2 transform) - * JN: float imaqLineGaugeTool2(long image, long start, long end, int method, long edgeOptions, long transform, long distance) +/* J: void imaqLineGaugeTool2(Image image, Point start, Point end, LineGaugeMethod method, EdgeOptions edgeOptions, CoordinateTransform2 transform) + * JN: void imaqLineGaugeTool2(long image, long start, long end, int method, long edgeOptions, long transform, long distance) * C: int imaqLineGaugeTool2(const Image* image, Point start, Point end, LineGaugeMethod method, const EdgeOptions* edgeOptions, const CoordinateTransform2* transform, float* distance) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqLineGaugeTool2(JNIEnv* env, jclass , jlong image, jlong start, jlong end, jint method, jlong edgeOptions, jlong transform, jlong distance) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLineGaugeTool2(JNIEnv* env, jclass , jlong image, jlong start, jlong end, jint method, jlong edgeOptions, jlong transform, jlong distance) { int rv = imaqLineGaugeTool2((const Image*)image, *((Point*)start), *((Point*)end), (LineGaugeMethod)method, (const EdgeOptions*)edgeOptions, (const CoordinateTransform2*)transform, (float*)distance); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } /* J: RakeReport2 imaqRake2(Image image, ROI roi, RakeDirection direction, EdgeProcess process, int stepSize) @@ -861,16 +945,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDrawShapeOnImage(JNIEnv if (rv == 0) throwJavaException(env); } -/* J: int imaqDrawTextOnImage(Image dest, Image source, Point coord, String text, DrawTextOptions options) - * JN: int imaqDrawTextOnImage(long dest, long source, long coord, long text, long options, long fontNameUsed) +/* J: void imaqDrawTextOnImage(Image dest, Image source, Point coord, String text, DrawTextOptions options) + * JN: void imaqDrawTextOnImage(long dest, long source, long coord, long text, long options, long fontNameUsed) * C: int imaqDrawTextOnImage(Image* dest, const Image* source, Point coord, const char* text, const DrawTextOptions* options, int* fontNameUsed) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqDrawTextOnImage(JNIEnv* env, jclass , jlong dest, jlong source, jlong coord, jlong text, jlong options, jlong fontNameUsed) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDrawTextOnImage(JNIEnv* env, jclass , jlong dest, jlong source, jlong coord, jlong text, jlong options, jlong fontNameUsed) { int rv = imaqDrawTextOnImage((Image*)dest, (const Image*)source, *((Point*)coord), (const char*)text, (const DrawTextOptions*)options, (int*)fontNameUsed); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* @@ -915,40 +998,37 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEnumerateCustomKeys(JN return (jlong)rv; } -/* J: int imaqGetBitDepth(Image image) - * JN: int imaqGetBitDepth(long image, long bitDepth) +/* J: void imaqGetBitDepth(Image image) + * JN: void imaqGetBitDepth(long image, long bitDepth) * C: int imaqGetBitDepth(const Image* image, unsigned int* bitDepth) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetBitDepth(JNIEnv* env, jclass , jlong image, jlong bitDepth) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBitDepth(JNIEnv* env, jclass , jlong image, jlong bitDepth) { int rv = imaqGetBitDepth((const Image*)image, (unsigned int*)bitDepth); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: int imaqGetBytesPerPixel(Image image) - * JN: int imaqGetBytesPerPixel(long image, long byteCount) +/* J: void imaqGetBytesPerPixel(Image image) + * JN: void imaqGetBytesPerPixel(long image, long byteCount) * C: int imaqGetBytesPerPixel(const Image* image, int* byteCount) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetBytesPerPixel(JNIEnv* env, jclass , jlong image, jlong byteCount) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBytesPerPixel(JNIEnv* env, jclass , jlong image, jlong byteCount) { int rv = imaqGetBytesPerPixel((const Image*)image, (int*)byteCount); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: ImageInfo imaqGetImageInfo(Image image) - * JN: long imaqGetImageInfo(long image, long info) +/* J: void imaqGetImageInfo(Image image) + * JN: void imaqGetImageInfo(long image, long info) * C: int imaqGetImageInfo(const Image* image, ImageInfo* info) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetImageInfo(JNIEnv* env, jclass , jlong image, jlong info) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetImageInfo(JNIEnv* env, jclass , jlong image, jlong info) { int rv = imaqGetImageInfo((const Image*)image, (ImageInfo*)info); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetImageSize(Image image) @@ -962,52 +1042,48 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetImageSize(JNIEnv* en if (rv == 0) throwJavaException(env); } -/* J: ImageType imaqGetImageType(Image image) - * JN: int imaqGetImageType(long image, long type) +/* J: void imaqGetImageType(Image image) + * JN: void imaqGetImageType(long image, long type) * C: int imaqGetImageType(const Image* image, ImageType* type) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetImageType(JNIEnv* env, jclass , jlong image, jlong type) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetImageType(JNIEnv* env, jclass , jlong image, jlong type) { int rv = imaqGetImageType((const Image*)image, (ImageType*)type); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: Point imaqGetMaskOffset(Image image) - * JN: long imaqGetMaskOffset(long image, long offset) +/* J: void imaqGetMaskOffset(Image image) + * JN: void imaqGetMaskOffset(long image, long offset) * C: int imaqGetMaskOffset(const Image* image, Point* offset) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetMaskOffset(JNIEnv* env, jclass , jlong image, jlong offset) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetMaskOffset(JNIEnv* env, jclass , jlong image, jlong offset) { int rv = imaqGetMaskOffset((const Image*)image, (Point*)offset); if (rv == 0) throwJavaException(env); - return (jlong)rv; } -/* J: int imaqGetVisionInfoTypes(Image image) - * JN: int imaqGetVisionInfoTypes(long image, long present) +/* J: void imaqGetVisionInfoTypes(Image image) + * JN: void imaqGetVisionInfoTypes(long image, long present) * C: int imaqGetVisionInfoTypes(const Image* image, unsigned int* present) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetVisionInfoTypes(JNIEnv* env, jclass , jlong image, jlong present) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetVisionInfoTypes(JNIEnv* env, jclass , jlong image, jlong present) { int rv = imaqGetVisionInfoTypes((const Image*)image, (unsigned int*)present); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: int imaqIsImageEmpty(Image image) - * JN: int imaqIsImageEmpty(long image, long empty) +/* J: void imaqIsImageEmpty(Image image) + * JN: void imaqIsImageEmpty(long image, long empty) * C: int imaqIsImageEmpty(const Image* image, int* empty) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqIsImageEmpty(JNIEnv* env, jclass , jlong image, jlong empty) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsImageEmpty(JNIEnv* env, jclass , jlong image, jlong empty) { int rv = imaqIsImageEmpty((const Image*)image, (int*)empty); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: RawData imaqReadCustomData(Image image, String key) @@ -1092,16 +1168,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteCustomData(JNIEnv* * Display functions */ -/* J: int imaqAreToolsContextSensitive() - * JN: int imaqAreToolsContextSensitive(long sensitive) +/* J: void imaqAreToolsContextSensitive() + * JN: void imaqAreToolsContextSensitive(long sensitive) * C: int imaqAreToolsContextSensitive(int* sensitive) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAreToolsContextSensitive(JNIEnv* env, jclass , jlong sensitive) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAreToolsContextSensitive(JNIEnv* env, jclass , jlong sensitive) { int rv = imaqAreToolsContextSensitive((int*)sensitive); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqCloseWindow(int windowNumber) @@ -1137,16 +1212,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetLastKey(JNIEnv* env, if (rv == 0) throwJavaException(env); } -/* J: Point imaqGetWindowCenterPos(int windowNumber) - * JN: long imaqGetWindowCenterPos(int windowNumber, long centerPosition) +/* J: void imaqGetWindowCenterPos(int windowNumber) + * JN: void imaqGetWindowCenterPos(int windowNumber, long centerPosition) * C: int imaqGetWindowCenterPos(int windowNumber, Point* centerPosition) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowCenterPos(JNIEnv* env, jclass , jint windowNumber, jlong centerPosition) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowCenterPos(JNIEnv* env, jclass , jint windowNumber, jlong centerPosition) { int rv = imaqGetWindowCenterPos((int)windowNumber, (Point*)centerPosition); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqSetToolContextSensitivity(int sensitive) @@ -1324,16 +1398,15 @@ JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqCreateAVI(JNIEnv* env, return (jint)rv; } -/* J: AVIInfo imaqGetAVIInfo(int session) - * JN: long imaqGetAVIInfo(int session, long info) +/* J: void imaqGetAVIInfo(int session) + * JN: void imaqGetAVIInfo(int session, long info) * C: int imaqGetAVIInfo(AVISession session, AVIInfo* info) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetAVIInfo(JNIEnv* env, jclass , jint session, jlong info) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetAVIInfo(JNIEnv* env, jclass , jint session, jlong info) { int rv = imaqGetAVIInfo((AVISession)session, (AVIInfo*)info); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetFileInfo(String fileName) @@ -1497,16 +1570,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteVisionFile(JNIEnv* * Analytic Geometry functions */ -/* J: CoordinateSystem imaqBuildCoordinateSystem(Point points, ReferenceMode mode, AxisOrientation orientation) - * JN: long imaqBuildCoordinateSystem(long points, int mode, int orientation, long system) +/* J: void imaqBuildCoordinateSystem(Point points, ReferenceMode mode, AxisOrientation orientation) + * JN: void imaqBuildCoordinateSystem(long points, int mode, int orientation, long system) * C: int imaqBuildCoordinateSystem(const Point* points, ReferenceMode mode, AxisOrientation orientation, CoordinateSystem* system) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqBuildCoordinateSystem(JNIEnv* env, jclass , jlong points, jint mode, jint orientation, jlong system) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqBuildCoordinateSystem(JNIEnv* env, jclass , jlong points, jint mode, jint orientation, jlong system) { int rv = imaqBuildCoordinateSystem((const Point*)points, (ReferenceMode)mode, (AxisOrientation)orientation, (CoordinateSystem*)system); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: BestCircle2 imaqFitCircle2(PointFloat[] points, FitCircleOptions options) @@ -1545,16 +1617,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFitLine(JNIEnv* env, j return (jlong)rv; } -/* J: float imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) - * JN: float imaqGetAngle(long start1, long end1, long start2, long end2, long angle) +/* J: void imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) + * JN: void imaqGetAngle(long start1, long end1, long start2, long end2, long angle) * C: int imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2, float* angle) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqGetAngle(JNIEnv* env, jclass , jlong start1, jlong end1, jlong start2, jlong end2, jlong angle) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetAngle(JNIEnv* env, jclass , jlong start1, jlong end1, jlong start2, jlong end2, jlong angle) { int rv = imaqGetAngle(*((PointFloat*)start1), *((PointFloat*)end1), *((PointFloat*)start2), *((PointFloat*)end2), (float*)angle); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } /* J: void imaqGetBisectingLine(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) @@ -1568,28 +1639,26 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBisectingLine(JNIEnv if (rv == 0) throwJavaException(env); } -/* J: float imaqGetDistance(PointFloat point1, PointFloat point2) - * JN: float imaqGetDistance(long point1, long point2, long distance) +/* J: void imaqGetDistance(PointFloat point1, PointFloat point2) + * JN: void imaqGetDistance(long point1, long point2, long distance) * C: int imaqGetDistance(PointFloat point1, PointFloat point2, float* distance) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqGetDistance(JNIEnv* env, jclass , jlong point1, jlong point2, jlong distance) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetDistance(JNIEnv* env, jclass , jlong point1, jlong point2, jlong distance) { int rv = imaqGetDistance(*((PointFloat*)point1), *((PointFloat*)point2), (float*)distance); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } -/* J: PointFloat imaqGetIntersection(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) - * JN: long imaqGetIntersection(long start1, long end1, long start2, long end2, long intersection) +/* J: void imaqGetIntersection(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2) + * JN: void imaqGetIntersection(long start1, long end1, long start2, long end2, long intersection) * C: int imaqGetIntersection(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2, PointFloat* intersection) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetIntersection(JNIEnv* env, jclass , jlong start1, jlong end1, jlong start2, jlong end2, jlong intersection) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetIntersection(JNIEnv* env, jclass , jlong start1, jlong end1, jlong start2, jlong end2, jlong intersection) { int rv = imaqGetIntersection(*((PointFloat*)start1), *((PointFloat*)end1), *((PointFloat*)start2), *((PointFloat*)end2), (PointFloat*)intersection); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetMidLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point) @@ -1638,16 +1707,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetPointsOnLine(JNIEnv return (jlong)rv; } -/* J: float imaqGetPolygonArea(PointFloat points, int numPoints) - * JN: float imaqGetPolygonArea(long points, int numPoints, long area) +/* J: void imaqGetPolygonArea(PointFloat points, int numPoints) + * JN: void imaqGetPolygonArea(long points, int numPoints, long area) * C: int imaqGetPolygonArea(const PointFloat* points, int numPoints, float* area) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqGetPolygonArea(JNIEnv* env, jclass , jlong points, jint numPoints, jlong area) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetPolygonArea(JNIEnv* env, jclass , jlong points, jint numPoints, jlong area) { int rv = imaqGetPolygonArea((const PointFloat*)points, (int)numPoints, (float*)area); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } /* J: InterpolatePointsResult imaqInterpolatePoints(Image image, Point[] points, InterpolationMethod method, int subpixel) @@ -1666,16 +1734,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqInterpolatePoints(JNIE * Clipboard functions */ -/* J: RGBValue imaqClipboardToImage(Image dest) - * JN: long imaqClipboardToImage(long dest, long palette) +/* J: void imaqClipboardToImage(Image dest) + * JN: void imaqClipboardToImage(long dest, long palette) * C: int imaqClipboardToImage(Image* dest, RGBValue* palette) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqClipboardToImage(JNIEnv* env, jclass , jlong dest, jlong palette) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqClipboardToImage(JNIEnv* env, jclass , jlong dest, jlong palette) { int rv = imaqClipboardToImage((Image*)dest, (RGBValue*)palette); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqImageToClipboard(Image image, RGBValue palette) @@ -1704,16 +1771,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFillBorder(JNIEnv* env, if (rv == 0) throwJavaException(env); } -/* J: int imaqGetBorderSize(Image image) - * JN: int imaqGetBorderSize(long image, long borderSize) +/* J: void imaqGetBorderSize(Image image) + * JN: void imaqGetBorderSize(long image, long borderSize) * C: int imaqGetBorderSize(const Image* image, int* borderSize) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetBorderSize(JNIEnv* env, jclass , jlong image, jlong borderSize) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBorderSize(JNIEnv* env, jclass , jlong image, jlong borderSize) { int rv = imaqGetBorderSize((const Image*)image, (int*)borderSize); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqSetBorderSize(Image image, int size) @@ -1815,16 +1881,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSupervisedColorSegment return (jlong)rv; } -/* J: int imaqGetColorSegmentationMaxDistance(ClassifierSession session, ColorSegmenationOptions segmentOptions, SegmentationDistanceLevel distLevel) - * JN: int imaqGetColorSegmentationMaxDistance(long session, long segmentOptions, int distLevel, long maxDistance) +/* J: void imaqGetColorSegmentationMaxDistance(ClassifierSession session, ColorSegmenationOptions segmentOptions, SegmentationDistanceLevel distLevel) + * JN: void imaqGetColorSegmentationMaxDistance(long session, long segmentOptions, int distLevel, long maxDistance) * C: int imaqGetColorSegmentationMaxDistance(ClassifierSession* session, const ColorSegmenationOptions* segmentOptions, SegmentationDistanceLevel distLevel, int* maxDistance) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetColorSegmentationMaxDistance(JNIEnv* env, jclass , jlong session, jlong segmentOptions, jint distLevel, jlong maxDistance) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetColorSegmentationMaxDistance(JNIEnv* env, jclass , jlong session, jlong segmentOptions, jint distLevel, jlong maxDistance) { int rv = imaqGetColorSegmentationMaxDistance((ClassifierSession*)session, (const ColorSegmenationOptions*)segmentOptions, (SegmentationDistanceLevel)distLevel, (int*)maxDistance); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* @@ -1875,32 +1940,30 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMathTransform(JNIEnv* e if (rv == 0) throwJavaException(env); } -/* J: int imaqWatershedTransform(Image dest, Image source, int connectivity8) - * JN: int imaqWatershedTransform(long dest, long source, int connectivity8, long zoneCount) +/* J: void imaqWatershedTransform(Image dest, Image source, int connectivity8) + * JN: void imaqWatershedTransform(long dest, long source, int connectivity8, long zoneCount) * C: int imaqWatershedTransform(Image* dest, const Image* source, int connectivity8, int* zoneCount) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqWatershedTransform(JNIEnv* env, jclass , jlong dest, jlong source, jint connectivity8, jlong zoneCount) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWatershedTransform(JNIEnv* env, jclass , jlong dest, jlong source, jint connectivity8, jlong zoneCount) { int rv = imaqWatershedTransform((Image*)dest, (const Image*)source, (int)connectivity8, (int*)zoneCount); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* * Window Management functions */ -/* J: int imaqAreScrollbarsVisible(int windowNumber) - * JN: int imaqAreScrollbarsVisible(int windowNumber, long visible) +/* J: void imaqAreScrollbarsVisible(int windowNumber) + * JN: void imaqAreScrollbarsVisible(int windowNumber, long visible) * C: int imaqAreScrollbarsVisible(int windowNumber, int* visible) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAreScrollbarsVisible(JNIEnv* env, jclass , jint windowNumber, jlong visible) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAreScrollbarsVisible(JNIEnv* env, jclass , jint windowNumber, jlong visible) { int rv = imaqAreScrollbarsVisible((int)windowNumber, (int*)visible); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqBringWindowToTop(int windowNumber) @@ -1936,16 +1999,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowBackground(JNI if (rv == 0) throwJavaException(env); } -/* J: DisplayMapping imaqGetWindowDisplayMapping(int windowNum) - * JN: long imaqGetWindowDisplayMapping(int windowNum, long mapping) +/* J: void imaqGetWindowDisplayMapping(int windowNum) + * JN: void imaqGetWindowDisplayMapping(int windowNum, long mapping) * C: int imaqGetWindowDisplayMapping(int windowNum, DisplayMapping* mapping) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowDisplayMapping(JNIEnv* env, jclass , jint windowNum, jlong mapping) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowDisplayMapping(JNIEnv* env, jclass , jint windowNum, jlong mapping) { int rv = imaqGetWindowDisplayMapping((int)windowNum, (DisplayMapping*)mapping); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetWindowGrid(int windowNumber) @@ -1959,28 +2021,26 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowGrid(JNIEnv* e if (rv == 0) throwJavaException(env); } -/* J: int imaqGetWindowHandle() - * JN: int imaqGetWindowHandle(long handle) +/* J: void imaqGetWindowHandle() + * JN: void imaqGetWindowHandle(long handle) * C: int imaqGetWindowHandle(int* handle) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowHandle(JNIEnv* env, jclass , jlong handle) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowHandle(JNIEnv* env, jclass , jlong handle) { int rv = imaqGetWindowHandle((int*)handle); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: Point imaqGetWindowPos(int windowNumber) - * JN: long imaqGetWindowPos(int windowNumber, long position) +/* J: void imaqGetWindowPos(int windowNumber) + * JN: void imaqGetWindowPos(int windowNumber, long position) * C: int imaqGetWindowPos(int windowNumber, Point* position) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowPos(JNIEnv* env, jclass , jint windowNumber, jlong position) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowPos(JNIEnv* env, jclass , jint windowNumber, jlong position) { int rv = imaqGetWindowPos((int)windowNumber, (Point*)position); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetWindowSize(int windowNumber) @@ -2017,28 +2077,26 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowZoom2(JNIEnv* if (rv == 0) throwJavaException(env); } -/* J: int imaqIsWindowNonTearing(int windowNumber) - * JN: int imaqIsWindowNonTearing(int windowNumber, long nonTearing) +/* J: void imaqIsWindowNonTearing(int windowNumber) + * JN: void imaqIsWindowNonTearing(int windowNumber, long nonTearing) * C: int imaqIsWindowNonTearing(int windowNumber, int* nonTearing) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqIsWindowNonTearing(JNIEnv* env, jclass , jint windowNumber, jlong nonTearing) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsWindowNonTearing(JNIEnv* env, jclass , jint windowNumber, jlong nonTearing) { int rv = imaqIsWindowNonTearing((int)windowNumber, (int*)nonTearing); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: int imaqIsWindowVisible(int windowNumber) - * JN: int imaqIsWindowVisible(int windowNumber, long visible) +/* J: void imaqIsWindowVisible(int windowNumber) + * JN: void imaqIsWindowVisible(int windowNumber, long visible) * C: int imaqIsWindowVisible(int windowNumber, int* visible) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqIsWindowVisible(JNIEnv* env, jclass , jint windowNumber, jlong visible) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsWindowVisible(JNIEnv* env, jclass , jint windowNumber, jlong visible) { int rv = imaqIsWindowVisible((int)windowNumber, (int*)visible); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqMoveWindow(int windowNumber, Point position) @@ -2199,16 +2257,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqZoomWindow2(JNIEnv* env * Utilities functions */ -/* J: int imaqMulticoreOptions(MulticoreOperation operation) - * JN: int imaqMulticoreOptions(int operation, long customNumCores) +/* J: void imaqMulticoreOptions(MulticoreOperation operation) + * JN: void imaqMulticoreOptions(int operation, long customNumCores) * C: int imaqMulticoreOptions(MulticoreOperation operation, unsigned int* customNumCores) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqMulticoreOptions(JNIEnv* env, jclass , jint operation, jlong customNumCores) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMulticoreOptions(JNIEnv* env, jclass , jint operation, jlong customNumCores) { int rv = imaqMulticoreOptions((MulticoreOperation)operation, (unsigned int*)customNumCores); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* @@ -2226,16 +2283,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCloseToolWindow(JNIEnv* if (rv == 0) throwJavaException(env); } -/* J: Tool imaqGetCurrentTool() - * JN: int imaqGetCurrentTool(long currentTool) +/* J: void imaqGetCurrentTool() + * JN: void imaqGetCurrentTool(long currentTool) * C: int imaqGetCurrentTool(Tool* currentTool) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetCurrentTool(JNIEnv* env, jclass , jlong currentTool) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetCurrentTool(JNIEnv* env, jclass , jlong currentTool) { int rv = imaqGetCurrentTool((Tool*)currentTool); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqGetLastEvent() @@ -2249,28 +2305,26 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetLastEvent(JNIEnv* en if (rv == 0) throwJavaException(env); } -/* J: Point imaqGetToolWindowPos() - * JN: long imaqGetToolWindowPos(long position) +/* J: void imaqGetToolWindowPos() + * JN: void imaqGetToolWindowPos(long position) * C: int imaqGetToolWindowPos(Point* position) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetToolWindowPos(JNIEnv* env, jclass , jlong position) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetToolWindowPos(JNIEnv* env, jclass , jlong position) { int rv = imaqGetToolWindowPos((Point*)position); if (rv == 0) throwJavaException(env); - return (jlong)rv; } -/* J: int imaqIsToolWindowVisible() - * JN: int imaqIsToolWindowVisible(long visible) +/* J: void imaqIsToolWindowVisible() + * JN: void imaqIsToolWindowVisible(long visible) * C: int imaqIsToolWindowVisible(int* visible) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqIsToolWindowVisible(JNIEnv* env, jclass , jlong visible) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsToolWindowVisible(JNIEnv* env, jclass , jlong visible) { int rv = imaqIsToolWindowVisible((int*)visible); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqMoveToolWindow(Point position) @@ -2394,28 +2448,26 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetCalibrationInfo3(JN return (jlong)rv; } -/* J: float imaqLearnCalibrationGrid(Image image, ROI roi, LearnCalibrationOptions options, GridDescriptor grid, CoordinateSystem system, RangeFloat range) - * JN: float imaqLearnCalibrationGrid(long image, long roi, long options, long grid, long system, long range, long quality) +/* J: void imaqLearnCalibrationGrid(Image image, ROI roi, LearnCalibrationOptions options, GridDescriptor grid, CoordinateSystem system, RangeFloat range) + * JN: void imaqLearnCalibrationGrid(long image, long roi, long options, long grid, long system, long range, long quality) * C: int imaqLearnCalibrationGrid(Image* image, const ROI* roi, const LearnCalibrationOptions* options, const GridDescriptor* grid, const CoordinateSystem* system, const RangeFloat* range, float* quality) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqLearnCalibrationGrid(JNIEnv* env, jclass , jlong image, jlong roi, jlong options, jlong grid, jlong system, jlong range, jlong quality) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnCalibrationGrid(JNIEnv* env, jclass , jlong image, jlong roi, jlong options, jlong grid, jlong system, jlong range, jlong quality) { int rv = imaqLearnCalibrationGrid((Image*)image, (const ROI*)roi, (const LearnCalibrationOptions*)options, (const GridDescriptor*)grid, (const CoordinateSystem*)system, (const RangeFloat*)range, (float*)quality); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } -/* J: float imaqLearnCalibrationPoints(Image image, CalibrationPoints points, ROI roi, LearnCalibrationOptions options, GridDescriptor grid, CoordinateSystem system) - * JN: float imaqLearnCalibrationPoints(long image, long points, long roi, long options, long grid, long system, long quality) +/* J: void imaqLearnCalibrationPoints(Image image, CalibrationPoints points, ROI roi, LearnCalibrationOptions options, GridDescriptor grid, CoordinateSystem system) + * JN: void imaqLearnCalibrationPoints(long image, long points, long roi, long options, long grid, long system, long quality) * C: int imaqLearnCalibrationPoints(Image* image, const CalibrationPoints* points, const ROI* roi, const LearnCalibrationOptions* options, const GridDescriptor* grid, const CoordinateSystem* system, float* quality) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqLearnCalibrationPoints(JNIEnv* env, jclass , jlong image, jlong points, jlong roi, jlong options, jlong grid, jlong system, jlong quality) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnCalibrationPoints(JNIEnv* env, jclass , jlong image, jlong points, jlong roi, jlong options, jlong grid, jlong system, jlong quality) { int rv = imaqLearnCalibrationPoints((Image*)image, (const CalibrationPoints*)points, (const ROI*)roi, (const LearnCalibrationOptions*)options, (const GridDescriptor*)grid, (const CoordinateSystem*)system, (float*)quality); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } /* J: void imaqSetCoordinateSystem(Image image, CoordinateSystem system) @@ -2475,16 +2527,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetSimpleCalibration2(J if (rv == 0) throwJavaException(env); } -/* J: CoordinateSystem imaqCalibrationSetAxisInfo(Image image) - * JN: long imaqCalibrationSetAxisInfo(long image, long axisInfo) +/* J: void imaqCalibrationSetAxisInfo(Image image) + * JN: void imaqCalibrationSetAxisInfo(long image, long axisInfo) * C: int imaqCalibrationSetAxisInfo(Image* image, CoordinateSystem* axisInfo) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationSetAxisInfo(JNIEnv* env, jclass , jlong image, jlong axisInfo) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationSetAxisInfo(JNIEnv* env, jclass , jlong image, jlong axisInfo) { int rv = imaqCalibrationSetAxisInfo((Image*)image, (CoordinateSystem*)axisInfo); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqCalibrationGetThumbnailImage(Image templateImage, Image image, CalibrationThumbnailType type, int index) @@ -2683,16 +2734,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqTruncate(JNIEnv* env, j * Barcode I/O functions */ -/* J: AIMGradeReport imaqGradeDataMatrixBarcodeAIM(Image image) - * JN: long imaqGradeDataMatrixBarcodeAIM(long image, long report) +/* J: void imaqGradeDataMatrixBarcodeAIM(Image image) + * JN: void imaqGradeDataMatrixBarcodeAIM(long image, long report) * C: int imaqGradeDataMatrixBarcodeAIM(const Image* image, AIMGradeReport* report) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGradeDataMatrixBarcodeAIM(JNIEnv* env, jclass , jlong image, jlong report) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGradeDataMatrixBarcodeAIM(JNIEnv* env, jclass , jlong image, jlong report) { int rv = imaqGradeDataMatrixBarcodeAIM((const Image*)image, (AIMGradeReport*)report); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: BarcodeInfo imaqReadBarcode(Image image, BarcodeType type, ROI roi, int validate) @@ -2910,16 +2960,15 @@ JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetContour(JNIEnv* env, return (jint)rv; } -/* J: RGBValue imaqGetContourColor(ROI roi, int id) - * JN: long imaqGetContourColor(long roi, int id, long contourColor) +/* J: void imaqGetContourColor(ROI roi, int id) + * JN: void imaqGetContourColor(long roi, int id, long contourColor) * C: int imaqGetContourColor(const ROI* roi, ContourID id, RGBValue* contourColor) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetContourColor(JNIEnv* env, jclass , jlong roi, jint id, jlong contourColor) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetContourColor(JNIEnv* env, jclass , jlong roi, jint id, jlong contourColor) { int rv = imaqGetContourColor((const ROI*)roi, (ContourID)id, (RGBValue*)contourColor); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetContourCount(ROI roi) @@ -2982,16 +3031,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetContourColor(JNIEnv* * Regions of Interest functions */ -/* J: int imaqConstructROI2(Image image, ROI roi, Tool initialTool, ToolWindowOptions tools, ConstructROIOptions2 options) - * JN: int imaqConstructROI2(long image, long roi, int initialTool, long tools, long options, long okay) +/* J: void imaqConstructROI2(Image image, ROI roi, Tool initialTool, ToolWindowOptions tools, ConstructROIOptions2 options) + * JN: void imaqConstructROI2(long image, long roi, int initialTool, long tools, long options, long okay) * C: int imaqConstructROI2(const Image* image, ROI* roi, Tool initialTool, const ToolWindowOptions* tools, const ConstructROIOptions2* options, int* okay) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqConstructROI2(JNIEnv* env, jclass , jlong image, jlong roi, jint initialTool, jlong tools, jlong options, jlong okay) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConstructROI2(JNIEnv* env, jclass , jlong image, jlong roi, jint initialTool, jlong tools, jlong options, jlong okay) { int rv = imaqConstructROI2((const Image*)image, (ROI*)roi, (Tool)initialTool, (const ToolWindowOptions*)tools, (const ConstructROIOptions2*)options, (int*)okay); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: ROI imaqCreateROI() @@ -3006,28 +3054,26 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateROI(JNIEnv* env, return (jlong)rv; } -/* J: Rect imaqGetROIBoundingBox(ROI roi) - * JN: long imaqGetROIBoundingBox(long roi, long boundingBox) +/* J: void imaqGetROIBoundingBox(ROI roi) + * JN: void imaqGetROIBoundingBox(long roi, long boundingBox) * C: int imaqGetROIBoundingBox(const ROI* roi, Rect* boundingBox) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetROIBoundingBox(JNIEnv* env, jclass , jlong roi, jlong boundingBox) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetROIBoundingBox(JNIEnv* env, jclass , jlong roi, jlong boundingBox) { int rv = imaqGetROIBoundingBox((const ROI*)roi, (Rect*)boundingBox); if (rv == 0) throwJavaException(env); - return (jlong)rv; } -/* J: RGBValue imaqGetROIColor(ROI roi) - * JN: long imaqGetROIColor(long roi, long roiColor) +/* J: void imaqGetROIColor(ROI roi) + * JN: void imaqGetROIColor(long roi, long roiColor) * C: int imaqGetROIColor(const ROI* roi, RGBValue* roiColor) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetROIColor(JNIEnv* env, jclass , jlong roi, jlong roiColor) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetROIColor(JNIEnv* env, jclass , jlong roi, jlong roiColor) { int rv = imaqGetROIColor((const ROI*)roi, (RGBValue*)roiColor); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: ROI imaqGetWindowROI(int windowNumber) @@ -3068,16 +3114,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowROI(JNIEnv* en * Image Analysis functions */ -/* J: PointFloat imaqCentroid(Image image, Image mask) - * JN: long imaqCentroid(long image, long centroid, long mask) +/* J: void imaqCentroid(Image image, Image mask) + * JN: void imaqCentroid(long image, long centroid, long mask) * C: int imaqCentroid(const Image* image, PointFloat* centroid, const Image* mask) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCentroid(JNIEnv* env, jclass , jlong image, jlong centroid, jlong mask) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCentroid(JNIEnv* env, jclass , jlong image, jlong centroid, jlong mask) { int rv = imaqCentroid((const Image*)image, (PointFloat*)centroid, (const Image*)mask); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: ExtractCurvesResult imaqExtractCurves(Image image, ROI roi, CurveOptions curveOptions) @@ -3302,16 +3347,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnGeometricPattern(J if (rv == 0) throwJavaException(env); } -/* J: LearnPatternAdvancedOptions imaqLearnPattern3(Image image, LearningMode learningMode, Image mask) - * JN: long imaqLearnPattern3(long image, int learningMode, long advancedOptions, long mask) +/* J: void imaqLearnPattern3(Image image, LearningMode learningMode, Image mask) + * JN: void imaqLearnPattern3(long image, int learningMode, long advancedOptions, long mask) * C: int imaqLearnPattern3(Image* image, LearningMode learningMode, LearnPatternAdvancedOptions* advancedOptions, const Image* mask) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern3(JNIEnv* env, jclass , jlong image, jint learningMode, jlong advancedOptions, jlong mask) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern3(JNIEnv* env, jclass , jlong image, jint learningMode, jlong advancedOptions, jlong mask) { int rv = imaqLearnPattern3((Image*)image, (LearningMode)learningMode, (LearnPatternAdvancedOptions*)advancedOptions, (const Image*)mask); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: MatchColorPatternResult imaqMatchColorPattern(Image image, Image pattern, MatchColorPatternOptions options, Rect searchRect) @@ -3457,16 +3501,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCopyOverlay(JNIEnv* env if (rv == 0) throwJavaException(env); } -/* J: TransformBehaviors imaqGetOverlayProperties(Image image, String group) - * JN: long imaqGetOverlayProperties(long image, long group, long transformBehaviors) +/* J: void imaqGetOverlayProperties(Image image, String group) + * JN: void imaqGetOverlayProperties(long image, long group, long transformBehaviors) * C: int imaqGetOverlayProperties(const Image* image, const char* group, TransformBehaviors* transformBehaviors) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetOverlayProperties(JNIEnv* env, jclass , jlong image, jlong group, jlong transformBehaviors) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetOverlayProperties(JNIEnv* env, jclass , jlong image, jlong group, jlong transformBehaviors) { int rv = imaqGetOverlayProperties((const Image*)image, (const char*)group, (TransformBehaviors*)transformBehaviors); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqMergeOverlay(Image dest, Image source, RGBValue[] palette, String group) @@ -3546,16 +3589,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayOpenContour(JNIE if (rv == 0) throwJavaException(env); } -/* J: byte imaqOverlayOval(Image image, Rect boundingBox, RGBValue color, DrawMode drawMode) - * JN: byte imaqOverlayOval(long image, long boundingBox, long color, int drawMode, long group) +/* J: void imaqOverlayOval(Image image, Rect boundingBox, RGBValue color, DrawMode drawMode) + * JN: void imaqOverlayOval(long image, long boundingBox, long color, int drawMode, long group) * C: int imaqOverlayOval(Image* image, Rect boundingBox, const RGBValue* color, DrawMode drawMode, char* group) */ -JNIEXPORT jbyte JNICALL Java_com_ni_vision_NIVision__1imaqOverlayOval(JNIEnv* env, jclass , jlong image, jlong boundingBox, jlong color, jint drawMode, jlong group) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayOval(JNIEnv* env, jclass , jlong image, jlong boundingBox, jlong color, jint drawMode, jlong group) { int rv = imaqOverlayOval((Image*)image, *((Rect*)boundingBox), (const RGBValue*)color, (DrawMode)drawMode, (char*)group); if (rv == 0) throwJavaException(env); - return (jbyte)rv; } /* J: void imaqOverlayPoints(Image image, Point[] points, RGBValue[] colors, PointSymbol symbol, UserPointSymbol userSymbol, String group) @@ -3602,16 +3644,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayText(JNIEnv* env if (rv == 0) throwJavaException(env); } -/* J: TransformBehaviors imaqSetOverlayProperties(Image image, String group) - * JN: long imaqSetOverlayProperties(long image, long group, long transformBehaviors) +/* J: void imaqSetOverlayProperties(Image image, String group) + * JN: void imaqSetOverlayProperties(long image, long group, long transformBehaviors) * C: int imaqSetOverlayProperties(Image* image, const char* group, TransformBehaviors* transformBehaviors) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSetOverlayProperties(JNIEnv* env, jclass , jlong image, jlong group, jlong transformBehaviors) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetOverlayProperties(JNIEnv* env, jclass , jlong image, jlong group, jlong transformBehaviors) { int rv = imaqSetOverlayProperties((Image*)image, (const char*)group, (TransformBehaviors*)transformBehaviors); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* @@ -3842,16 +3883,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourSetupMatchPatte return (jlong)rv; } -/* J: SetupMatchPatternData imaqContourAdvancedSetupMatchPattern(GeometricAdvancedSetupDataOption[] geometricOptions) - * JN: long imaqContourAdvancedSetupMatchPattern(long matchSetupData, long geometricOptions, int numGeometricOptions) +/* J: void imaqContourAdvancedSetupMatchPattern(GeometricAdvancedSetupDataOption[] geometricOptions) + * JN: void imaqContourAdvancedSetupMatchPattern(long matchSetupData, long geometricOptions, int numGeometricOptions) * C: int imaqContourAdvancedSetupMatchPattern(SetupMatchPatternData* matchSetupData, GeometricAdvancedSetupDataOption* geometricOptions, unsigned int numGeometricOptions) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourAdvancedSetupMatchPattern(JNIEnv* env, jclass , jlong matchSetupData, jlong geometricOptions, jint numGeometricOptions) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqContourAdvancedSetupMatchPattern(JNIEnv* env, jclass , jlong matchSetupData, jlong geometricOptions, jint numGeometricOptions) { int rv = imaqContourAdvancedSetupMatchPattern((SetupMatchPatternData*)matchSetupData, (GeometricAdvancedSetupDataOption*)geometricOptions, (unsigned int)numGeometricOptions); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: ContourFitLineReport imaqContourFitLine(Image image, double pixelRadius) @@ -4011,16 +4051,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqROIProfile(JNIEnv* env return (jlong)rv; } -/* J: int imaqROIToMask(Image mask, ROI roi, int fillValue, Image imageModel) - * JN: int imaqROIToMask(long mask, long roi, int fillValue, long imageModel, long inSpace) +/* J: void imaqROIToMask(Image mask, ROI roi, int fillValue, Image imageModel) + * JN: void imaqROIToMask(long mask, long roi, int fillValue, long imageModel, long inSpace) * C: int imaqROIToMask(Image* mask, const ROI* roi, int fillValue, const Image* imageModel, int* inSpace) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqROIToMask(JNIEnv* env, jclass , jlong mask, jlong roi, jint fillValue, jlong imageModel, jlong inSpace) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqROIToMask(JNIEnv* env, jclass , jlong mask, jlong roi, jint fillValue, jlong imageModel, jlong inSpace) { int rv = imaqROIToMask((Image*)mask, (const ROI*)roi, (int)fillValue, (const Image*)imageModel, (int*)inSpace); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqTransformROI2(ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem) @@ -4147,28 +4186,26 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetClassifierSampleInf return (jlong)rv; } -/* J: ColorOptions imaqGetColorClassifierOptions(ClassifierSession session) - * JN: long imaqGetColorClassifierOptions(long session, long options) +/* J: void imaqGetColorClassifierOptions(ClassifierSession session) + * JN: void imaqGetColorClassifierOptions(long session, long options) * C: int imaqGetColorClassifierOptions(const ClassifierSession* session, ColorOptions* options) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetColorClassifierOptions(JNIEnv* env, jclass , jlong session, jlong options) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetColorClassifierOptions(JNIEnv* env, jclass , jlong session, jlong options) { int rv = imaqGetColorClassifierOptions((const ClassifierSession*)session, (ColorOptions*)options); if (rv == 0) throwJavaException(env); - return (jlong)rv; } -/* J: NearestNeighborOptions imaqGetNearestNeighborOptions(ClassifierSession session) - * JN: long imaqGetNearestNeighborOptions(long session, long options) +/* J: void imaqGetNearestNeighborOptions(ClassifierSession session) + * JN: void imaqGetNearestNeighborOptions(long session, long options) * C: int imaqGetNearestNeighborOptions(const ClassifierSession* session, NearestNeighborOptions* options) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetNearestNeighborOptions(JNIEnv* env, jclass , jlong session, jlong options) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetNearestNeighborOptions(JNIEnv* env, jclass , jlong session, jlong options) { int rv = imaqGetNearestNeighborOptions((const ClassifierSession*)session, (NearestNeighborOptions*)options); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqGetParticleClassifierOptions2(ClassifierSession session) @@ -4342,16 +4379,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetParticleInfo(JNIEnv return (jlong)rv; } -/* J: float imaqCalcCoeff(Image image, ParticleReport report, MeasurementValue parameter) - * JN: float imaqCalcCoeff(long image, long report, int parameter, long coefficient) +/* J: void imaqCalcCoeff(Image image, ParticleReport report, MeasurementValue parameter) + * JN: void imaqCalcCoeff(long image, long report, int parameter, long coefficient) * C: int imaqCalcCoeff(const Image* image, const ParticleReport* report, MeasurementValue parameter, float* coefficient) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqCalcCoeff(JNIEnv* env, jclass , jlong image, jlong report, jint parameter, jlong coefficient) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCalcCoeff(JNIEnv* env, jclass , jlong image, jlong report, jint parameter, jlong coefficient) { int rv = imaqCalcCoeff((const Image*)image, (const ParticleReport*)report, (MeasurementValue)parameter, (float*)coefficient); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } /* J: EdgeToolResult imaqEdgeTool(Image image, Point points, int numPoints, EdgeOptions options) @@ -4378,40 +4414,37 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCircles(JNIEnv* env, j return (jlong)rv; } -/* J: int imaqLabel(Image dest, Image source, int connectivity8) - * JN: int imaqLabel(long dest, long source, int connectivity8, long particleCount) +/* J: void imaqLabel(Image dest, Image source, int connectivity8) + * JN: void imaqLabel(long dest, long source, int connectivity8, long particleCount) * C: int imaqLabel(Image* dest, Image* source, int connectivity8, int* particleCount) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqLabel(JNIEnv* env, jclass , jlong dest, jlong source, jint connectivity8, jlong particleCount) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLabel(JNIEnv* env, jclass , jlong dest, jlong source, jint connectivity8, jlong particleCount) { int rv = imaqLabel((Image*)dest, (Image*)source, (int)connectivity8, (int*)particleCount); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: BestEllipse imaqFitEllipse(PointFloat[] points) - * JN: long imaqFitEllipse(long points, int numPoints, long ellipse) +/* J: void imaqFitEllipse(PointFloat[] points) + * JN: void imaqFitEllipse(long points, int numPoints, long ellipse) * C: int imaqFitEllipse(const PointFloat* points, int numPoints, BestEllipse* ellipse) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFitEllipse(JNIEnv* env, jclass , jlong points, jint numPoints, jlong ellipse) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFitEllipse(JNIEnv* env, jclass , jlong points, jint numPoints, jlong ellipse) { int rv = imaqFitEllipse((const PointFloat*)points, (int)numPoints, (BestEllipse*)ellipse); if (rv == 0) throwJavaException(env); - return (jlong)rv; } -/* J: BestCircle imaqFitCircle(PointFloat[] points) - * JN: long imaqFitCircle(long points, int numPoints, long circle) +/* J: void imaqFitCircle(PointFloat[] points) + * JN: void imaqFitCircle(long points, int numPoints, long circle) * C: int imaqFitCircle(const PointFloat* points, int numPoints, BestCircle* circle) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFitCircle(JNIEnv* env, jclass , jlong points, jint numPoints, jlong circle) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFitCircle(JNIEnv* env, jclass , jlong points, jint numPoints, jlong circle) { int rv = imaqFitCircle((const PointFloat*)points, (int)numPoints, (BestCircle*)circle); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: MatchPatternResult imaqMatchPattern(Image image, Image pattern, MatchPatternOptions options, Rect searchRect) @@ -4437,28 +4470,26 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConvex(JNIEnv* env, jcl if (rv == 0) throwJavaException(env); } -/* J: int imaqIsVisionInfoPresent(Image image, VisionInfoType type) - * JN: int imaqIsVisionInfoPresent(long image, int type, long present) +/* J: void imaqIsVisionInfoPresent(Image image, VisionInfoType type) + * JN: void imaqIsVisionInfoPresent(long image, int type, long present) * C: int imaqIsVisionInfoPresent(const Image* image, VisionInfoType type, int* present) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqIsVisionInfoPresent(JNIEnv* env, jclass , jlong image, jint type, jlong present) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsVisionInfoPresent(JNIEnv* env, jclass , jlong image, jint type, jlong present) { int rv = imaqIsVisionInfoPresent((const Image*)image, (VisionInfoType)type, (int*)present); if (rv == 0) throwJavaException(env); - return (jint)rv; } -/* J: float imaqLineGaugeTool(Image image, Point start, Point end, LineGaugeMethod method, EdgeOptions edgeOptions, CoordinateTransform reference) - * JN: float imaqLineGaugeTool(long image, long start, long end, int method, long edgeOptions, long reference, long distance) +/* J: void imaqLineGaugeTool(Image image, Point start, Point end, LineGaugeMethod method, EdgeOptions edgeOptions, CoordinateTransform reference) + * JN: void imaqLineGaugeTool(long image, long start, long end, int method, long edgeOptions, long reference, long distance) * C: int imaqLineGaugeTool(const Image* image, Point start, Point end, LineGaugeMethod method, const EdgeOptions* edgeOptions, const CoordinateTransform* reference, float* distance) */ -JNIEXPORT jfloat JNICALL Java_com_ni_vision_NIVision__1imaqLineGaugeTool(JNIEnv* env, jclass , jlong image, jlong start, jlong end, jint method, jlong edgeOptions, jlong reference, jlong distance) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLineGaugeTool(JNIEnv* env, jclass , jlong image, jlong start, jlong end, jint method, jlong edgeOptions, jlong reference, jlong distance) { int rv = imaqLineGaugeTool((const Image*)image, *((Point*)start), *((Point*)end), (LineGaugeMethod)method, (const EdgeOptions*)edgeOptions, (const CoordinateTransform*)reference, (float*)distance); if (rv == 0) throwJavaException(env); - return (jfloat)rv; } /* J: void imaqBestCircle(PointFloat[] points) @@ -4585,16 +4616,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetCalibrationInfo(JNIE if (rv == 0) throwJavaException(env); } -/* J: int imaqConstructROI(Image image, ROI roi, Tool initialTool, ToolWindowOptions tools, ConstructROIOptions options) - * JN: int imaqConstructROI(long image, long roi, int initialTool, long tools, long options, long okay) +/* J: void imaqConstructROI(Image image, ROI roi, Tool initialTool, ToolWindowOptions tools, ConstructROIOptions options) + * JN: void imaqConstructROI(long image, long roi, int initialTool, long tools, long options, long okay) * C: int imaqConstructROI(const Image* image, ROI* roi, Tool initialTool, const ToolWindowOptions* tools, const ConstructROIOptions* options, int* okay) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqConstructROI(JNIEnv* env, jclass , jlong image, jlong roi, jint initialTool, jlong tools, jlong options, jlong okay) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConstructROI(JNIEnv* env, jclass , jlong image, jlong roi, jint initialTool, jlong tools, jlong options, jlong okay) { int rv = imaqConstructROI((const Image*)image, (ROI*)roi, (Tool)initialTool, (const ToolWindowOptions*)tools, (const ConstructROIOptions*)options, (int*)okay); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: void imaqGetParticleClassifierOptions(ClassifierSession session) @@ -4630,16 +4660,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowZoom(JNIEnv* e if (rv == 0) throwJavaException(env); } -/* J: int imaqParticleFilter3(Image dest, Image source, ParticleFilterCriteria2 criteria, int criteriaCount, ParticleFilterOptions options, ROI roi) - * JN: int imaqParticleFilter3(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles) +/* J: void imaqParticleFilter3(Image dest, Image source, ParticleFilterCriteria2 criteria, int criteriaCount, ParticleFilterOptions options, ROI roi) + * JN: void imaqParticleFilter3(long dest, long source, long criteria, int criteriaCount, long options, long roi, long numParticles) * C: int imaqParticleFilter3(Image* dest, Image* source, const ParticleFilterCriteria2* criteria, int criteriaCount, const ParticleFilterOptions* options, const ROI* roi, int* numParticles) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter3(JNIEnv* env, jclass , jlong dest, jlong source, jlong criteria, jint criteriaCount, jlong options, jlong roi, jlong numParticles) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter3(JNIEnv* env, jclass , jlong dest, jlong source, jlong criteria, jint criteriaCount, jlong options, jlong roi, jlong numParticles) { int rv = imaqParticleFilter3((Image*)dest, (Image*)source, (const ParticleFilterCriteria2*)criteria, (int)criteriaCount, (const ParticleFilterOptions*)options, (const ROI*)roi, (int*)numParticles); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: ReadTextReport2 imaqReadText2(Image image, CharSet set, ROI roi, ReadTextOptions readOptions, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions) @@ -4654,16 +4683,15 @@ JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadText2(JNIEnv* env, return (jlong)rv; } -/* J: LearnPatternAdvancedOptions imaqLearnPattern2(Image image, LearningMode learningMode) - * JN: long imaqLearnPattern2(long image, int learningMode, long advancedOptions) +/* J: void imaqLearnPattern2(Image image, LearningMode learningMode) + * JN: void imaqLearnPattern2(long image, int learningMode, long advancedOptions) * C: int imaqLearnPattern2(Image* image, LearningMode learningMode, LearnPatternAdvancedOptions* advancedOptions) */ -JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern2(JNIEnv* env, jclass , jlong image, jint learningMode, jlong advancedOptions) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern2(JNIEnv* env, jclass , jlong image, jint learningMode, jlong advancedOptions) { int rv = imaqLearnPattern2((Image*)image, (LearningMode)learningMode, (LearnPatternAdvancedOptions*)advancedOptions); if (rv == 0) throwJavaException(env); - return (jlong)rv; } /* J: void imaqDivide(Image dest, Image sourceA, Image sourceB) @@ -4758,16 +4786,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCopyCalibrationInfo(JNI if (rv == 0) throwJavaException(env); } -/* J: int imaqParticleFilter2(Image dest, Image source, ParticleFilterCriteria2[] criteria, int rejectMatches, int connectivity8) - * JN: int imaqParticleFilter2(long dest, long source, long criteria, int criteriaCount, int rejectMatches, int connectivity8, long numParticles) +/* J: void imaqParticleFilter2(Image dest, Image source, ParticleFilterCriteria2[] criteria, int rejectMatches, int connectivity8) + * JN: void imaqParticleFilter2(long dest, long source, long criteria, int criteriaCount, int rejectMatches, int connectivity8, long numParticles) * C: int imaqParticleFilter2(Image* dest, Image* source, const ParticleFilterCriteria2* criteria, int criteriaCount, int rejectMatches, int connectivity8, int* numParticles) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter2(JNIEnv* env, jclass , jlong dest, jlong source, jlong criteria, jint criteriaCount, jint rejectMatches, jint connectivity8, jlong numParticles) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter2(JNIEnv* env, jclass , jlong dest, jlong source, jlong criteria, jint criteriaCount, jint rejectMatches, jint connectivity8, jlong numParticles) { int rv = imaqParticleFilter2((Image*)dest, (Image*)source, (const ParticleFilterCriteria2*)criteria, (int)criteriaCount, (int)rejectMatches, (int)connectivity8, (int*)numParticles); if (rv == 0) throwJavaException(env); - return (jint)rv; } /* J: EdgeTool2Result imaqEdgeTool2(Image image, Point points, int numPoints, EdgeProcess process, EdgeOptions options) @@ -5031,16 +5058,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxConfigureGrab(JNIEnv* if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } -/* J: int IMAQdxGrab(int id, Image image, int waitForNextBuffer) - * JN: int IMAQdxGrab(int id, long image, int waitForNextBuffer, long actualBufferNumber) +/* J: void IMAQdxGrab(int id, Image image, int waitForNextBuffer) + * JN: void IMAQdxGrab(int id, long image, int waitForNextBuffer, long actualBufferNumber) * C: IMAQdxError IMAQdxGrab(IMAQdxSession id, Image* image, bool32 waitForNextBuffer, uInt32* actualBufferNumber) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxGrab(JNIEnv* env, jclass , jint id, jlong image, jint waitForNextBuffer, jlong actualBufferNumber) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGrab(JNIEnv* env, jclass , jint id, jlong image, jint waitForNextBuffer, jlong actualBufferNumber) { IMAQdxError rv = IMAQdxGrab((IMAQdxSession)id, (Image*)image, (bool32)waitForNextBuffer, (uInt32*)actualBufferNumber); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; } /* J: void IMAQdxDiscoverEthernetCameras(String address, int timeout) @@ -5065,16 +5091,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxResetCamera(JNIEnv* e if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } -/* J: int IMAQdxOpenCamera(String name, IMAQdxCameraControlMode mode) - * JN: int IMAQdxOpenCamera(long name, int mode, long id) +/* J: void IMAQdxOpenCamera(String name, IMAQdxCameraControlMode mode) + * JN: void IMAQdxOpenCamera(long name, int mode, long id) * C: IMAQdxError IMAQdxOpenCamera(const char* name, IMAQdxCameraControlMode mode, IMAQdxSession* id) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxOpenCamera(JNIEnv* env, jclass , jlong name, jint mode, jlong id) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxOpenCamera(JNIEnv* env, jclass , jlong name, jint mode, jlong id) { IMAQdxError rv = IMAQdxOpenCamera((const char*)name, (IMAQdxCameraControlMode)mode, (IMAQdxSession*)id); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; } /* J: void IMAQdxCloseCamera(int id) @@ -5110,16 +5135,23 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxStartAcquisition(JNIE if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } -/* J: int IMAQdxGetImage(int id, Image image, IMAQdxBufferNumberMode mode, int desiredBufferNumber) - * JN: int IMAQdxGetImage(int id, long image, int mode, int desiredBufferNumber, long actualBufferNumber) +/* J: void IMAQdxGetImage(int id, Image image, IMAQdxBufferNumberMode mode, int desiredBufferNumber) + * JN: void IMAQdxGetImage(int id, long image, int mode, int desiredBufferNumber, long actualBufferNumber) * C: IMAQdxError IMAQdxGetImage(IMAQdxSession id, Image* image, IMAQdxBufferNumberMode mode, uInt32 desiredBufferNumber, uInt32* actualBufferNumber) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetImage(JNIEnv* env, jclass , jint id, jlong image, jint mode, jint desiredBufferNumber, jlong actualBufferNumber) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetImage(JNIEnv* env, jclass , jint id, jlong image, jint mode, jint desiredBufferNumber, jlong actualBufferNumber) { IMAQdxError rv = IMAQdxGetImage((IMAQdxSession)id, (Image*)image, (IMAQdxBufferNumberMode)mode, (uInt32)desiredBufferNumber, (uInt32*)actualBufferNumber); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; +} + +JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetImageData(JNIEnv* env, jclass , jint id, jlong buffer, jint bufferSize, jint mode, jint desiredBufferNumber) +{ + uInt32 actualBufferNumber; + IMAQdxError rv = IMAQdxGetImageData((IMAQdxSession)id, (void*)buffer, (uInt32)bufferSize, (IMAQdxBufferNumberMode)mode, (uInt32)desiredBufferNumber, &actualBufferNumber); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); + return (jint)actualBufferNumber; } /* J: void IMAQdxStopAcquisition(int id) @@ -5144,40 +5176,43 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxUnconfigureAcquisitio if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } -/* J: IMAQdxAttributeType IMAQdxGetAttributeType(int id, String name) - * JN: int IMAQdxGetAttributeType(int id, long name, long type) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxEnumerateVideoModes(JNIEnv* env, jclass , jint id, jlong videoModeArray, jlong count, jlong currentMode) +{ + IMAQdxError rv = IMAQdxEnumerateVideoModes((IMAQdxSession)id, (IMAQdxVideoMode*)videoModeArray, (uInt32*)count, (uInt32*)currentMode); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeType(int id, String name) + * JN: void IMAQdxGetAttributeType(int id, long name, long type) * C: IMAQdxError IMAQdxGetAttributeType(IMAQdxSession id, const char* name, IMAQdxAttributeType* type) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeType(JNIEnv* env, jclass , jint id, jlong name, jlong type) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeType(JNIEnv* env, jclass , jint id, jlong name, jlong type) { IMAQdxError rv = IMAQdxGetAttributeType((IMAQdxSession)id, (const char*)name, (IMAQdxAttributeType*)type); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; } -/* J: int IMAQdxIsAttributeReadable(int id, String name) - * JN: int IMAQdxIsAttributeReadable(int id, long name, long readable) +/* J: void IMAQdxIsAttributeReadable(int id, String name) + * JN: void IMAQdxIsAttributeReadable(int id, long name, long readable) * C: IMAQdxError IMAQdxIsAttributeReadable(IMAQdxSession id, const char* name, bool32* readable) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxIsAttributeReadable(JNIEnv* env, jclass , jint id, jlong name, jlong readable) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxIsAttributeReadable(JNIEnv* env, jclass , jint id, jlong name, jlong readable) { IMAQdxError rv = IMAQdxIsAttributeReadable((IMAQdxSession)id, (const char*)name, (bool32*)readable); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; } -/* J: int IMAQdxIsAttributeWritable(int id, String name) - * JN: int IMAQdxIsAttributeWritable(int id, long name, long writable) +/* J: void IMAQdxIsAttributeWritable(int id, String name) + * JN: void IMAQdxIsAttributeWritable(int id, long name, long writable) * C: IMAQdxError IMAQdxIsAttributeWritable(IMAQdxSession id, const char* name, bool32* writable) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxIsAttributeWritable(JNIEnv* env, jclass , jint id, jlong name, jlong writable) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxIsAttributeWritable(JNIEnv* env, jclass , jint id, jlong name, jlong writable) { IMAQdxError rv = IMAQdxIsAttributeWritable((IMAQdxSession)id, (const char*)name, (bool32*)writable); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; } /* J: void IMAQdxWriteRegister(int id, int offset, int value) @@ -5191,16 +5226,15 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxWriteRegister(JNIEnv* if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } -/* J: int IMAQdxReadRegister(int id, int offset) - * JN: int IMAQdxReadRegister(int id, int offset, long value) +/* J: void IMAQdxReadRegister(int id, int offset) + * JN: void IMAQdxReadRegister(int id, int offset, long value) * C: IMAQdxError IMAQdxReadRegister(IMAQdxSession id, uInt32 offset, uInt32* value) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxReadRegister(JNIEnv* env, jclass , jint id, jint offset, jlong value) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxReadRegister(JNIEnv* env, jclass , jint id, jint offset, jlong value) { IMAQdxError rv = IMAQdxReadRegister((IMAQdxSession)id, (uInt32)offset, (uInt32*)value); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; } /* J: void IMAQdxWriteAttributes(int id, String filename) @@ -5236,15 +5270,245 @@ JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxResetEthernetCameraAd if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } -/* J: IMAQdxAttributeVisibility IMAQdxGetAttributeVisibility(int id, String name) - * JN: int IMAQdxGetAttributeVisibility(int id, long name, long visibility) +/* J: void IMAQdxGetAttributeVisibility(int id, String name) + * JN: void IMAQdxGetAttributeVisibility(int id, long name, long visibility) * C: IMAQdxError IMAQdxGetAttributeVisibility(IMAQdxSession id, const char* name, IMAQdxAttributeVisibility* visibility) */ -JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeVisibility(JNIEnv* env, jclass , jint id, jlong name, jlong visibility) +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeVisibility(JNIEnv* env, jclass , jint id, jlong name, jlong visibility) { IMAQdxError rv = IMAQdxGetAttributeVisibility((IMAQdxSession)id, (const char*)name, (IMAQdxAttributeVisibility*)visibility); if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); - return (jint)rv; +} + +/* J: void IMAQdxGetAttributeU32(int id, String name) + * JN: void IMAQdxGetAttributeU32(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeU32(IMAQdxSession id, const char* name, uInt32* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeU32(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeU32((IMAQdxSession)id, (const char*)name, (uInt32*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeI64(int id, String name) + * JN: void IMAQdxGetAttributeI64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeI64(IMAQdxSession id, const char* name, Int64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeI64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeI64((IMAQdxSession)id, (const char*)name, (Int64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeF64(int id, String name) + * JN: void IMAQdxGetAttributeF64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeF64(IMAQdxSession id, const char* name, float64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeF64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeF64((IMAQdxSession)id, (const char*)name, (float64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeString(int id, String name) + * JN: void IMAQdxGetAttributeString(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeString(IMAQdxSession id, const char* name, char value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeString(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeString((IMAQdxSession)id, (const char*)name, (char*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeEnum(int id, String name) + * JN: void IMAQdxGetAttributeEnum(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeEnum(IMAQdxSession id, const char* name, IMAQdxEnumItem* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeEnum(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeEnum((IMAQdxSession)id, (const char*)name, (IMAQdxEnumItem*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeBool(int id, String name) + * JN: void IMAQdxGetAttributeBool(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeBool(IMAQdxSession id, const char* name, bool32* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeBool(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeBool((IMAQdxSession)id, (const char*)name, (bool32*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeMinimumU32(int id, String name) + * JN: void IMAQdxGetAttributeMinimumU32(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeMinimumU32(IMAQdxSession id, const char* name, uInt32* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeMinimumU32(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeMinimumU32((IMAQdxSession)id, (const char*)name, (uInt32*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeMinimumI64(int id, String name) + * JN: void IMAQdxGetAttributeMinimumI64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeMinimumI64(IMAQdxSession id, const char* name, Int64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeMinimumI64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeMinimumI64((IMAQdxSession)id, (const char*)name, (Int64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeMinimumF64(int id, String name) + * JN: void IMAQdxGetAttributeMinimumF64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeMinimumF64(IMAQdxSession id, const char* name, float64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeMinimumF64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeMinimumF64((IMAQdxSession)id, (const char*)name, (float64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeMaximumU32(int id, String name) + * JN: void IMAQdxGetAttributeMaximumU32(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeMaximumU32(IMAQdxSession id, const char* name, uInt32* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeMaximumU32(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeMaximumU32((IMAQdxSession)id, (const char*)name, (uInt32*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeMaximumI64(int id, String name) + * JN: void IMAQdxGetAttributeMaximumI64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeMaximumI64(IMAQdxSession id, const char* name, Int64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeMaximumI64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeMaximumI64((IMAQdxSession)id, (const char*)name, (Int64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeMaximumF64(int id, String name) + * JN: void IMAQdxGetAttributeMaximumF64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeMaximumF64(IMAQdxSession id, const char* name, float64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeMaximumF64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeMaximumF64((IMAQdxSession)id, (const char*)name, (float64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeIncrementU32(int id, String name) + * JN: void IMAQdxGetAttributeIncrementU32(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeIncrementU32(IMAQdxSession id, const char* name, uInt32* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeIncrementU32(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeIncrementU32((IMAQdxSession)id, (const char*)name, (uInt32*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeIncrementI64(int id, String name) + * JN: void IMAQdxGetAttributeIncrementI64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeIncrementI64(IMAQdxSession id, const char* name, Int64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeIncrementI64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeIncrementI64((IMAQdxSession)id, (const char*)name, (Int64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxGetAttributeIncrementF64(int id, String name) + * JN: void IMAQdxGetAttributeIncrementF64(int id, long name, long value) + * C: IMAQdxError IMAQdxGetAttributeIncrementF64(IMAQdxSession id, const char* name, float64* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeIncrementF64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxGetAttributeIncrementF64((IMAQdxSession)id, (const char*)name, (float64*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxSetAttributeU32(int id, String name, int value) + * JN: void IMAQdxSetAttributeU32(int id, long name, int value) + * C: IMAQdxError IMAQdxSetAttributeU32(IMAQdxSession id, const char* name, uInt32 value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSetAttributeU32(JNIEnv* env, jclass , jint id, jlong name, jint value) +{ + IMAQdxError rv = IMAQdxSetAttributeU32((IMAQdxSession)id, (const char*)name, (uInt32)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxSetAttributeI64(int id, String name, long value) + * JN: void IMAQdxSetAttributeI64(int id, long name, long value) + * C: IMAQdxError IMAQdxSetAttributeI64(IMAQdxSession id, const char* name, Int64 value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSetAttributeI64(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxSetAttributeI64((IMAQdxSession)id, (const char*)name, (Int64)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxSetAttributeF64(int id, String name, double value) + * JN: void IMAQdxSetAttributeF64(int id, long name, double value) + * C: IMAQdxError IMAQdxSetAttributeF64(IMAQdxSession id, const char* name, float64 value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSetAttributeF64(JNIEnv* env, jclass , jint id, jlong name, jdouble value) +{ + IMAQdxError rv = IMAQdxSetAttributeF64((IMAQdxSession)id, (const char*)name, (float64)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxSetAttributeString(int id, String name, String value) + * JN: void IMAQdxSetAttributeString(int id, long name, long value) + * C: IMAQdxError IMAQdxSetAttributeString(IMAQdxSession id, const char* name, const char* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSetAttributeString(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxSetAttributeString((IMAQdxSession)id, (const char*)name, (const char*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxSetAttributeEnum(int id, String name, IMAQdxEnumItem value) + * JN: void IMAQdxSetAttributeEnum(int id, long name, long value) + * C: IMAQdxError IMAQdxSetAttributeEnum(IMAQdxSession id, const char* name, const IMAQdxEnumItem* value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSetAttributeEnum(JNIEnv* env, jclass , jint id, jlong name, jlong value) +{ + IMAQdxError rv = IMAQdxSetAttributeEnum((IMAQdxSession)id, (const char*)name, (const IMAQdxEnumItem*)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); +} + +/* J: void IMAQdxSetAttributeBool(int id, String name, int value) + * JN: void IMAQdxSetAttributeBool(int id, long name, int value) + * C: IMAQdxError IMAQdxSetAttributeBool(IMAQdxSession id, const char* name, bool32 value) + */ + +JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSetAttributeBool(JNIEnv* env, jclass , jint id, jlong name, jint value) +{ + IMAQdxError rv = IMAQdxSetAttributeBool((IMAQdxSession)id, (const char*)name, (bool32)value); + if (rv != IMAQdxErrorSuccess) dxthrowJavaException(env, rv); } } diff --git a/wpilibj/wpilibJavaJNI/nivision/dxattr.h b/wpilibj/wpilibJavaJNI/nivision/dxattr.h new file mode 100644 index 0000000000..56a38d9ede --- /dev/null +++ b/wpilibj/wpilibJavaJNI/nivision/dxattr.h @@ -0,0 +1,27 @@ + +IMAQdxError NI_FUNC IMAQdxGetAttributeU32(IMAQdxSession id, const char* name, uInt32* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeI64(IMAQdxSession id, const char* name, Int64* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeF64(IMAQdxSession id, const char* name, float64* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeString(IMAQdxSession id, const char* name, char value[IMAQDX_MAX_API_STRING_LENGTH]); +IMAQdxError NI_FUNC IMAQdxGetAttributeEnum(IMAQdxSession id, const char* name, IMAQdxEnumItem* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeBool(IMAQdxSession id, const char* name, bool32* value); + +IMAQdxError NI_FUNC IMAQdxGetAttributeMinimumU32(IMAQdxSession id, const char* name, uInt32* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeMinimumI64(IMAQdxSession id, const char* name, Int64* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeMinimumF64(IMAQdxSession id, const char* name, float64* value); + +IMAQdxError NI_FUNC IMAQdxGetAttributeMaximumU32(IMAQdxSession id, const char* name, uInt32* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeMaximumI64(IMAQdxSession id, const char* name, Int64* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeMaximumF64(IMAQdxSession id, const char* name, float64* value); + +IMAQdxError NI_FUNC IMAQdxGetAttributeIncrementU32(IMAQdxSession id, const char* name, uInt32* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeIncrementI64(IMAQdxSession id, const char* name, Int64* value); +IMAQdxError NI_FUNC IMAQdxGetAttributeIncrementF64(IMAQdxSession id, const char* name, float64* value); + +IMAQdxError NI_FUNC IMAQdxSetAttributeU32(IMAQdxSession id, const char* name, uInt32 value); +IMAQdxError NI_FUNC IMAQdxSetAttributeI64(IMAQdxSession id, const char* name, Int64 value); +IMAQdxError NI_FUNC IMAQdxSetAttributeF64(IMAQdxSession id, const char* name, float64 value); +IMAQdxError NI_FUNC IMAQdxSetAttributeString(IMAQdxSession id, const char* name, const char* value); +IMAQdxError NI_FUNC IMAQdxSetAttributeEnum(IMAQdxSession id, const char* name, const IMAQdxEnumItem* value); +IMAQdxError NI_FUNC IMAQdxSetAttributeBool(IMAQdxSession id, const char* name, bool32 value); + diff --git a/wpilibj/wpilibJavaJNI/nivision/dxattr.ini b/wpilibj/wpilibJavaJNI/nivision/dxattr.ini new file mode 100644 index 0000000000..f0db5efee1 --- /dev/null +++ b/wpilibj/wpilibJavaJNI/nivision/dxattr.ini @@ -0,0 +1,5 @@ +[IMAQdxGetAttributeString] +outparams=value + +[Block Comment] +exclude= diff --git a/wpilibj/wpilibJavaJNI/nivision/gen_java.py b/wpilibj/wpilibJavaJNI/nivision/gen_java.py index 55159b9486..4c53601a98 100644 --- a/wpilibj/wpilibJavaJNI/nivision/gen_java.py +++ b/wpilibj/wpilibJavaJNI/nivision/gen_java.py @@ -1154,7 +1154,97 @@ extern "C" {{ JNIEXPORT void JNICALL Java_{package}_{classname}_imaqDispose(JNIEnv* , jclass , jlong addr) {{ imaqDispose((void*)addr); -}}""".format(packagepath=self.package.replace(".", "/"), +}} + +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeU32(IMAQdxSession id, const char* name, uInt32* value) +{{ + return IMAQdxGetAttribute(id, name, IMAQdxValueTypeU32, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeI64(IMAQdxSession id, const char* name, Int64* value) +{{ + return IMAQdxGetAttribute(id, name, IMAQdxValueTypeI64, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeF64(IMAQdxSession id, const char* name, float64* value) +{{ + return IMAQdxGetAttribute(id, name, IMAQdxValueTypeF64, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeString(IMAQdxSession id, const char* name, char value[IMAQDX_MAX_API_STRING_LENGTH]) +{{ + return IMAQdxGetAttribute(id, name, IMAQdxValueTypeString, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeEnum(IMAQdxSession id, const char* name, IMAQdxEnumItem* value) +{{ + return IMAQdxGetAttribute(id, name, IMAQdxValueTypeEnumItem, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeBool(IMAQdxSession id, const char* name, bool32* value) +{{ + return IMAQdxGetAttribute(id, name, IMAQdxValueTypeBool, (void*)value); +}} + +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeMinimumU32(IMAQdxSession id, const char* name, uInt32* value) +{{ + return IMAQdxGetAttributeMinimum(id, name, IMAQdxValueTypeU32, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeMinimumI64(IMAQdxSession id, const char* name, Int64* value) +{{ + return IMAQdxGetAttributeMinimum(id, name, IMAQdxValueTypeI64, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeMinimumF64(IMAQdxSession id, const char* name, float64* value) +{{ + return IMAQdxGetAttributeMinimum(id, name, IMAQdxValueTypeF64, (void*)value); +}} + +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeMaximumU32(IMAQdxSession id, const char* name, uInt32* value) +{{ + return IMAQdxGetAttributeMaximum(id, name, IMAQdxValueTypeU32, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeMaximumI64(IMAQdxSession id, const char* name, Int64* value) +{{ + return IMAQdxGetAttributeMaximum(id, name, IMAQdxValueTypeI64, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeMaximumF64(IMAQdxSession id, const char* name, float64* value) +{{ + return IMAQdxGetAttributeMaximum(id, name, IMAQdxValueTypeF64, (void*)value); +}} + +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeIncrementU32(IMAQdxSession id, const char* name, uInt32* value) +{{ + return IMAQdxGetAttributeIncrement(id, name, IMAQdxValueTypeU32, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeIncrementI64(IMAQdxSession id, const char* name, Int64* value) +{{ + return IMAQdxGetAttributeIncrement(id, name, IMAQdxValueTypeI64, (void*)value); +}} +static inline IMAQdxError NI_FUNC IMAQdxGetAttributeIncrementF64(IMAQdxSession id, const char* name, float64* value) +{{ + return IMAQdxGetAttributeIncrement(id, name, IMAQdxValueTypeF64, (void*)value); +}} + +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeU32(IMAQdxSession id, const char* name, uInt32 value) +{{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeU32, value); +}} +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeI64(IMAQdxSession id, const char* name, Int64 value) +{{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeI64, value); +}} +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeF64(IMAQdxSession id, const char* name, float64 value) +{{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeF64, value); +}} +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeString(IMAQdxSession id, const char* name, const char* value) +{{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeString, value); +}} +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeEnum(IMAQdxSession id, const char* name, const IMAQdxEnumItem* value) +{{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeU32, value->Value); +}} +static inline IMAQdxError NI_FUNC IMAQdxSetAttributeBool(IMAQdxSession id, const char* name, bool32 value) +{{ + return IMAQdxSetAttribute(id, name, IMAQdxValueTypeBool, value); +}} +""".format(packagepath=self.package.replace(".", "/"), package=self.package.replace(".", "_"), classname=self.classname), file=self.outc) @@ -1346,6 +1436,61 @@ JNIEXPORT void JNICALL Java_{package}_{classname}_imaqDispose(JNIEnv* , jclass , raise NotImplementedError("typedef function not implemented") def function(self, name, restype, params): + if name == "IMAQdxEnumerateVideoModes": + # full custom code + print(""" + public static class dxEnumerateVideoModesResult {{ + public IMAQdxEnumItem[] videoModeArray; + public int currentMode; + private ByteBuffer videoModeArray_buf; + private dxEnumerateVideoModesResult(ByteBuffer rv_buf, ByteBuffer videoModeArray_buf) {{ + this.videoModeArray_buf = videoModeArray_buf; + int count = rv_buf.getInt(0); + videoModeArray = new IMAQdxEnumItem[count]; + for (int i=0, off=0; i