2014-12-09 00:48:57 -08:00
//
// This file is auto-generated by wpilibj/wpilibJavaJNI/nivision/gen_java.py
// Please do not edit!
//
# include <stdlib.h>
# include <string.h>
# include <assert.h>
# include <jni.h>
# include <nivision.h>
2014-12-12 22:52:31 -08:00
# include <NIIMAQdx.h>
2014-12-09 00:48:57 -08:00
// throw java exception
static void throwJavaException ( JNIEnv * env ) {
jclass je = env - > FindClass ( " com/ni/vision/VisionException " ) ;
int err = imaqGetLastError ( ) ;
char * err_text = imaqGetErrorText ( err ) ;
char * full_err_msg = ( char * ) malloc ( 30 + strlen ( err_text ) ) ;
sprintf ( full_err_msg , " imaqError: %d: %s " , err , err_text ) ;
imaqDispose ( err_text ) ;
env - > ThrowNew ( je , full_err_msg ) ;
free ( full_err_msg ) ;
}
2014-12-12 22:52:31 -08:00
// throw IMAQdx java exception
static void dxthrowJavaException ( JNIEnv * env , IMAQdxError err ) {
jclass je = env - > FindClass ( " com/ni/vision/VisionException " ) ;
char * err_text = ( char * ) malloc ( 200 ) ;
IMAQdxGetErrorString ( err , err_text , 200 ) ;
char * full_err_msg = ( char * ) malloc ( 250 ) ;
sprintf ( full_err_msg , " IMAQdxError: %d: %s " , err , err_text ) ;
free ( err_text ) ;
env - > ThrowNew ( je , full_err_msg ) ;
free ( full_err_msg ) ;
}
2014-12-09 00:48:57 -08:00
extern " C " {
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision_imaqDispose ( JNIEnv * , jclass , jlong addr )
2014-12-09 00:48:57 -08:00
{
imaqDispose ( ( void * ) addr ) ;
}
2015-01-02 23:14:02 -08:00
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 ) ;
}
2014-12-09 00:48:57 -08:00
/*
* Opaque Structures
*/
/*
* Manifest Constants
*/
/*
* Predefined Valid Characters
*/
/*
* Enumerated Types
*/
/*
* Forward Declare Data Structures
*/
/*
* Data Structures
*/
/*
* Globals
*/
/*
* Logical functions
*/
/* J: void imaqAnd(Image dest, Image sourceA, Image sourceB)
* JN : void imaqAnd ( long dest , long sourceA , long sourceB )
* C : int imaqAnd ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAnd ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqAnd ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCompare(Image dest, Image source, Image compareImage, ComparisonFunction compare)
* JN : void imaqCompare ( long dest , long source , long compareImage , int compare )
* C : int imaqCompare ( Image * dest , const Image * source , const Image * compareImage , ComparisonFunction compare )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCompare ( JNIEnv * env , jclass , jlong dest , jlong source , jlong compareImage , jint compare )
{
int rv = imaqCompare ( ( Image * ) dest , ( const Image * ) source , ( const Image * ) compareImage , ( ComparisonFunction ) compare ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqLogicalDifference(Image dest, Image sourceA, Image sourceB)
* JN : void imaqLogicalDifference ( long dest , long sourceA , long sourceB )
* C : int imaqLogicalDifference ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLogicalDifference ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqLogicalDifference ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqNand(Image dest, Image sourceA, Image sourceB)
* JN : void imaqNand ( long dest , long sourceA , long sourceB )
* C : int imaqNand ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqNand ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqNand ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqNor(Image dest, Image sourceA, Image sourceB)
* JN : void imaqNor ( long dest , long sourceA , long sourceB )
* C : int imaqNor ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqNor ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqNor ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOr(Image dest, Image sourceA, Image sourceB)
* JN : void imaqOr ( long dest , long sourceA , long sourceB )
* C : int imaqOr ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOr ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqOr ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqXnor(Image dest, Image sourceA, Image sourceB)
* JN : void imaqXnor ( long dest , long sourceA , long sourceB )
* C : int imaqXnor ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqXnor ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqXnor ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqXor(Image dest, Image sourceA, Image sourceB)
* JN : void imaqXor ( long dest , long sourceA , long sourceB )
* C : int imaqXor ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqXor ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqXor ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Particle Analysis functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqCountParticles(Image image, int connectivity8)
* JN : void imaqCountParticles ( long image , int connectivity8 , long numParticles )
2014-12-09 00:48:57 -08:00
* C : int imaqCountParticles ( Image * image , int connectivity8 , int * numParticles )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCountParticles ( JNIEnv * env , jclass , jlong image , jint connectivity8 , jlong numParticles )
2014-12-09 00:48:57 -08:00
{
int rv = imaqCountParticles ( ( Image * ) image , ( int ) connectivity8 , ( int * ) numParticles ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqMeasureParticle(Image image, int particleNumber, int calibrated, MeasurementType measurement)
* JN : void imaqMeasureParticle ( long image , int particleNumber , int calibrated , int measurement , long value )
2014-12-09 00:48:57 -08:00
* C : int imaqMeasureParticle ( Image * image , int particleNumber , int calibrated , MeasurementType measurement , double * value )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMeasureParticle ( JNIEnv * env , jclass , jlong image , jint particleNumber , jint calibrated , jint measurement , jlong value )
2014-12-09 00:48:57 -08:00
{
int rv = imaqMeasureParticle ( ( Image * ) image , ( int ) particleNumber , ( int ) calibrated , ( MeasurementType ) measurement , ( double * ) value ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: MeasureParticlesReport imaqMeasureParticles(Image image, MeasureParticlesCalibrationMode calibrationMode, MeasurementType[] measurements)
* JN : long imaqMeasureParticles ( long image , int calibrationMode , long measurements , int numMeasurements )
* C : MeasureParticlesReport * imaqMeasureParticles ( Image * image , MeasureParticlesCalibrationMode calibrationMode , const MeasurementType * measurements , size_t numMeasurements )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMeasureParticles ( JNIEnv * env , jclass , jlong image , jint calibrationMode , jlong measurements , jint numMeasurements )
{
MeasureParticlesReport * rv = imaqMeasureParticles ( ( Image * ) image , ( MeasureParticlesCalibrationMode ) calibrationMode , ( const MeasurementType * ) measurements , ( size_t ) numMeasurements ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqParticleFilter4 ( Image * dest , Image * source , const ParticleFilterCriteria2 * criteria , int criteriaCount , const ParticleFilterOptions2 * options , const ROI * roi , int * numParticles )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
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 ) ;
}
/*
* Morphology functions
*/
/* J: void imaqConvexHull(Image dest, Image source, int connectivity8)
* JN : void imaqConvexHull ( long dest , long source , int connectivity8 )
* C : int imaqConvexHull ( Image * dest , Image * source , int connectivity8 )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConvexHull ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 )
{
int rv = imaqConvexHull ( ( Image * ) dest , ( Image * ) source , ( int ) connectivity8 ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqDanielssonDistance(Image dest, Image source)
* JN : void imaqDanielssonDistance ( long dest , long source )
* C : int imaqDanielssonDistance ( Image * dest , Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDanielssonDistance ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqDanielssonDistance ( ( Image * ) dest , ( Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqFillHoles(Image dest, Image source, int connectivity8)
* JN : void imaqFillHoles ( long dest , long source , int connectivity8 )
* C : int imaqFillHoles ( Image * dest , const Image * source , int connectivity8 )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFillHoles ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 )
{
int rv = imaqFillHoles ( ( Image * ) dest , ( const Image * ) source , ( int ) connectivity8 ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: FindCirclesResult imaqFindCircles(Image dest, Image source, float minRadius, float maxRadius)
* JN : long imaqFindCircles ( long dest , long source , float minRadius , float maxRadius , long numCircles )
* C : CircleReport * imaqFindCircles ( Image * dest , Image * source , float minRadius , float maxRadius , int * numCircles )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFindCircles ( JNIEnv * env , jclass , jlong dest , jlong source , jfloat minRadius , jfloat maxRadius , jlong numCircles )
{
CircleReport * rv = imaqFindCircles ( ( Image * ) dest , ( Image * ) source , ( float ) minRadius , ( float ) maxRadius , ( int * ) numCircles ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqLabel2(Image dest, Image source, int connectivity8)
* JN : void imaqLabel2 ( long dest , long source , int connectivity8 , long particleCount )
2014-12-09 00:48:57 -08:00
* C : int imaqLabel2 ( Image * dest , Image * source , int connectivity8 , int * particleCount )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLabel2 ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 , jlong particleCount )
2014-12-09 00:48:57 -08:00
{
int rv = imaqLabel2 ( ( Image * ) dest , ( Image * ) source , ( int ) connectivity8 , ( int * ) particleCount ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMorphology(Image dest, Image source, MorphologyMethod method, StructuringElement structuringElement)
* JN : void imaqMorphology ( long dest , long source , int method , long structuringElement )
* C : int imaqMorphology ( Image * dest , Image * source , MorphologyMethod method , const StructuringElement * structuringElement )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMorphology ( JNIEnv * env , jclass , jlong dest , jlong source , jint method , jlong structuringElement )
{
int rv = imaqMorphology ( ( Image * ) dest , ( Image * ) source , ( MorphologyMethod ) method , ( const StructuringElement * ) structuringElement ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqRejectBorder(Image dest, Image source, int connectivity8)
* JN : void imaqRejectBorder ( long dest , long source , int connectivity8 )
* C : int imaqRejectBorder ( Image * dest , Image * source , int connectivity8 )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqRejectBorder ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 )
{
int rv = imaqRejectBorder ( ( Image * ) dest , ( Image * ) source , ( int ) connectivity8 ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSegmentation(Image dest, Image source)
* JN : void imaqSegmentation ( long dest , long source )
* C : int imaqSegmentation ( Image * dest , Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSegmentation ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqSegmentation ( ( Image * ) dest , ( Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSeparation(Image dest, Image source, int erosions, StructuringElement structuringElement)
* JN : void imaqSeparation ( long dest , long source , int erosions , long structuringElement )
* C : int imaqSeparation ( Image * dest , Image * source , int erosions , const StructuringElement * structuringElement )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSeparation ( JNIEnv * env , jclass , jlong dest , jlong source , jint erosions , jlong structuringElement )
{
int rv = imaqSeparation ( ( Image * ) dest , ( Image * ) source , ( int ) erosions , ( const StructuringElement * ) structuringElement ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSimpleDistance(Image dest, Image source, StructuringElement structuringElement)
* JN : void imaqSimpleDistance ( long dest , long source , long structuringElement )
* C : int imaqSimpleDistance ( Image * dest , Image * source , const StructuringElement * structuringElement )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSimpleDistance ( JNIEnv * env , jclass , jlong dest , jlong source , jlong structuringElement )
{
int rv = imaqSimpleDistance ( ( Image * ) dest , ( Image * ) source , ( const StructuringElement * ) structuringElement ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSizeFilter(Image dest, Image source, int connectivity8, int erosions, SizeType keepSize, StructuringElement structuringElement)
* JN : void imaqSizeFilter ( long dest , long source , int connectivity8 , int erosions , int keepSize , long structuringElement )
* C : int imaqSizeFilter ( Image * dest , Image * source , int connectivity8 , int erosions , SizeType keepSize , const StructuringElement * structuringElement )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSizeFilter ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 , jint erosions , jint keepSize , jlong structuringElement )
{
int rv = imaqSizeFilter ( ( Image * ) dest , ( Image * ) source , ( int ) connectivity8 , ( int ) erosions , ( SizeType ) keepSize , ( const StructuringElement * ) structuringElement ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSkeleton(Image dest, Image source, SkeletonMethod method)
* JN : void imaqSkeleton ( long dest , long source , int method )
* C : int imaqSkeleton ( Image * dest , Image * source , SkeletonMethod method )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSkeleton ( JNIEnv * env , jclass , jlong dest , jlong source , jint method )
{
int rv = imaqSkeleton ( ( Image * ) dest , ( Image * ) source , ( SkeletonMethod ) method ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Acquisition functions
*/
/* J: Image imaqCopyFromRing(long sessionID, Image image, int imageToCopy, Rect rect)
* JN : long imaqCopyFromRing ( long sessionID , long image , int imageToCopy , long imageNumber , long rect )
* C : Image * imaqCopyFromRing ( SESSION_ID sessionID , Image * image , int imageToCopy , int * imageNumber , Rect rect )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCopyFromRing ( JNIEnv * env , jclass , jlong sessionID , jlong image , jint imageToCopy , jlong imageNumber , jlong rect )
{
Image * rv = imaqCopyFromRing ( ( SESSION_ID ) sessionID , ( Image * ) image , ( int ) imageToCopy , ( int * ) imageNumber , * ( ( Rect * ) rect ) ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: Image imaqEasyAcquire(String interfaceName)
* JN : long imaqEasyAcquire ( long interfaceName )
* C : Image * imaqEasyAcquire ( const char * interfaceName )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEasyAcquire ( JNIEnv * env , jclass , jlong interfaceName )
{
Image * rv = imaqEasyAcquire ( ( const char * ) interfaceName ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: Image imaqExtractFromRing(long sessionID, int imageToExtract)
* JN : long imaqExtractFromRing ( long sessionID , int imageToExtract , long imageNumber )
* C : Image * imaqExtractFromRing ( SESSION_ID sessionID , int imageToExtract , int * imageNumber )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqExtractFromRing ( JNIEnv * env , jclass , jlong sessionID , jint imageToExtract , jlong imageNumber )
{
Image * rv = imaqExtractFromRing ( ( SESSION_ID ) sessionID , ( int ) imageToExtract , ( int * ) imageNumber ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: Image imaqGrab(long sessionID, Image image, int immediate)
* JN : long imaqGrab ( long sessionID , long image , int immediate )
* C : Image * imaqGrab ( SESSION_ID sessionID , Image * image , int immediate )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGrab ( JNIEnv * env , jclass , jlong sessionID , jlong image , jint immediate )
{
Image * rv = imaqGrab ( ( SESSION_ID ) sessionID , ( Image * ) image , ( int ) immediate ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqReleaseImage(long sessionID)
* JN : void imaqReleaseImage ( long sessionID )
* C : int imaqReleaseImage ( SESSION_ID sessionID )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReleaseImage ( JNIEnv * env , jclass , jlong sessionID )
{
int rv = imaqReleaseImage ( ( SESSION_ID ) sessionID ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetupGrab(long sessionID, Rect rect)
* JN : void imaqSetupGrab ( long sessionID , long rect )
* C : int imaqSetupGrab ( SESSION_ID sessionID , Rect rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetupGrab ( JNIEnv * env , jclass , jlong sessionID , jlong rect )
{
int rv = imaqSetupGrab ( ( SESSION_ID ) sessionID , * ( ( Rect * ) rect ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetupRing(long sessionID, Image[] images, int skipCount, Rect rect)
* JN : void imaqSetupRing ( long sessionID , long images , int numImages , int skipCount , long rect )
* C : int imaqSetupRing ( SESSION_ID sessionID , Image * * images , int numImages , int skipCount , Rect rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetupRing ( JNIEnv * env , jclass , jlong sessionID , jlong images , jint numImages , jint skipCount , jlong rect )
{
int rv = imaqSetupRing ( ( SESSION_ID ) sessionID , ( Image * * ) images , ( int ) numImages , ( int ) skipCount , * ( ( Rect * ) rect ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetupSequence(long sessionID, Image[] images, int skipCount, Rect rect)
* JN : void imaqSetupSequence ( long sessionID , long images , int numImages , int skipCount , long rect )
* C : int imaqSetupSequence ( SESSION_ID sessionID , Image * * images , int numImages , int skipCount , Rect rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetupSequence ( JNIEnv * env , jclass , jlong sessionID , jlong images , jint numImages , jint skipCount , jlong rect )
{
int rv = imaqSetupSequence ( ( SESSION_ID ) sessionID , ( Image * * ) images , ( int ) numImages , ( int ) skipCount , * ( ( Rect * ) rect ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: Image imaqSnap(long sessionID, Image image, Rect rect)
* JN : long imaqSnap ( long sessionID , long image , long rect )
* C : Image * imaqSnap ( SESSION_ID sessionID , Image * image , Rect rect )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSnap ( JNIEnv * env , jclass , jlong sessionID , jlong image , jlong rect )
{
Image * rv = imaqSnap ( ( SESSION_ID ) sessionID , ( Image * ) image , * ( ( Rect * ) rect ) ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqStartAcquisition(long sessionID)
* JN : void imaqStartAcquisition ( long sessionID )
* C : int imaqStartAcquisition ( SESSION_ID sessionID )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqStartAcquisition ( JNIEnv * env , jclass , jlong sessionID )
{
int rv = imaqStartAcquisition ( ( SESSION_ID ) sessionID ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqStopAcquisition(long sessionID)
* JN : void imaqStopAcquisition ( long sessionID )
* C : int imaqStopAcquisition ( SESSION_ID sessionID )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqStopAcquisition ( JNIEnv * env , jclass , jlong sessionID )
{
int rv = imaqStopAcquisition ( ( SESSION_ID ) sessionID ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Arithmetic functions
*/
/* J: void imaqAbsoluteDifference(Image dest, Image sourceA, Image sourceB)
* JN : void imaqAbsoluteDifference ( long dest , long sourceA , long sourceB )
* C : int imaqAbsoluteDifference ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAbsoluteDifference ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqAbsoluteDifference ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqAdd(Image dest, Image sourceA, Image sourceB)
* JN : void imaqAdd ( long dest , long sourceA , long sourceB )
* C : int imaqAdd ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAdd ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqAdd ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqAverage(Image dest, Image sourceA, Image sourceB)
* JN : void imaqAverage ( long dest , long sourceA , long sourceB )
* C : int imaqAverage ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAverage ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqAverage ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqDivide2(Image dest, Image sourceA, Image sourceB, RoundingMode roundingMode)
* JN : void imaqDivide2 ( long dest , long sourceA , long sourceB , int roundingMode )
* C : int imaqDivide2 ( Image * dest , const Image * sourceA , const Image * sourceB , RoundingMode roundingMode )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDivide2 ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB , jint roundingMode )
{
int rv = imaqDivide2 ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB , ( RoundingMode ) roundingMode ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMax(Image dest, Image sourceA, Image sourceB)
* JN : void imaqMax ( long dest , long sourceA , long sourceB )
* C : int imaqMax ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMax ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqMax ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMin(Image dest, Image sourceA, Image sourceB)
* JN : void imaqMin ( long dest , long sourceA , long sourceB )
* C : int imaqMin ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMin ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqMin ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqModulo(Image dest, Image sourceA, Image sourceB)
* JN : void imaqModulo ( long dest , long sourceA , long sourceB )
* C : int imaqModulo ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqModulo ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqModulo ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMulDiv(Image dest, Image sourceA, Image sourceB, float value)
* JN : void imaqMulDiv ( long dest , long sourceA , long sourceB , float value )
* C : int imaqMulDiv ( Image * dest , const Image * sourceA , const Image * sourceB , float value )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMulDiv ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB , jfloat value )
{
int rv = imaqMulDiv ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB , ( float ) value ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMultiply(Image dest, Image sourceA, Image sourceB)
* JN : void imaqMultiply ( long dest , long sourceA , long sourceB )
* C : int imaqMultiply ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMultiply ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqMultiply ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSubtract(Image dest, Image sourceA, Image sourceB)
* JN : void imaqSubtract ( long dest , long sourceA , long sourceB )
* C : int imaqSubtract ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSubtract ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqSubtract ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Caliper functions
*/
/* J: CaliperToolResult imaqCaliperTool(Image image, Point[] points, EdgeOptions edgeOptions, CaliperOptions caliperOptions)
* JN : long imaqCaliperTool ( long image , long points , int numPoints , long edgeOptions , long caliperOptions , long numEdgePairs )
* C : CaliperReport * imaqCaliperTool ( const Image * image , const Point * points , int numPoints , const EdgeOptions * edgeOptions , const CaliperOptions * caliperOptions , int * numEdgePairs )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCaliperTool ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jlong edgeOptions , jlong caliperOptions , jlong numEdgePairs )
{
CaliperReport * rv = imaqCaliperTool ( ( const Image * ) image , ( const Point * ) points , ( int ) numPoints , ( const EdgeOptions * ) edgeOptions , ( const CaliperOptions * ) caliperOptions , ( int * ) numEdgePairs ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ConcentricRakeReport2 imaqConcentricRake2(Image image, ROI roi, ConcentricRakeDirection direction, EdgeProcess process, int stepSize)
* JN : long imaqConcentricRake2 ( long image , long roi , int direction , int process , int stepSize , long edgeOptions )
* C : ConcentricRakeReport2 * imaqConcentricRake2 ( Image * image , ROI * roi , ConcentricRakeDirection direction , EdgeProcess process , int stepSize , EdgeOptions2 * edgeOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqConcentricRake2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jint process , jint stepSize , jlong edgeOptions )
{
ConcentricRakeReport2 * rv = imaqConcentricRake2 ( ( Image * ) image , ( ROI * ) roi , ( ConcentricRakeDirection ) direction , ( EdgeProcess ) process , ( int ) stepSize , ( EdgeOptions2 * ) edgeOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: DetectExtremesResult imaqDetectExtremes(double[] pixels, DetectionMode mode, DetectExtremesOptions options)
* JN : long imaqDetectExtremes ( long pixels , int numPixels , int mode , long options , long numExtremes )
* C : ExtremeReport * imaqDetectExtremes ( const double * pixels , int numPixels , DetectionMode mode , const DetectExtremesOptions * options , int * numExtremes )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqDetectExtremes ( JNIEnv * env , jclass , jlong pixels , jint numPixels , jint mode , jlong options , jlong numExtremes )
{
ExtremeReport * rv = imaqDetectExtremes ( ( const double * ) pixels , ( int ) numPixels , ( DetectionMode ) mode , ( const DetectExtremesOptions * ) options , ( int * ) numExtremes ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqDetectRotation ( const Image * referenceImage , const Image * testImage , PointFloat referenceCenter , PointFloat testCenter , int radius , float precision , double * angle )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
int rv = imaqDetectRotation ( ( const Image * ) referenceImage , ( const Image * ) testImage , * ( ( PointFloat * ) referenceCenter ) , * ( ( PointFloat * ) testCenter ) , ( int ) radius , ( float ) precision , ( double * ) angle ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: EdgeReport2 imaqEdgeTool4(Image image, ROI roi, EdgeProcess processType, int reverseDirection)
* JN : long imaqEdgeTool4 ( long image , long roi , int processType , long edgeOptions , int reverseDirection )
* C : EdgeReport2 * imaqEdgeTool4 ( Image * image , ROI * roi , EdgeProcess processType , EdgeOptions2 * edgeOptions , const unsigned int reverseDirection )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEdgeTool4 ( JNIEnv * env , jclass , jlong image , jlong roi , jint processType , jlong edgeOptions , jint reverseDirection )
{
EdgeReport2 * rv = imaqEdgeTool4 ( ( Image * ) image , ( ROI * ) roi , ( EdgeProcess ) processType , ( EdgeOptions2 * ) edgeOptions , ( const unsigned int ) reverseDirection ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: FindEdgeReport imaqFindEdge2(Image image, ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem, FindEdgeOptions2 findEdgeOptions, StraightEdgeOptions straightEdgeOptions)
* JN : long imaqFindEdge2 ( long image , long roi , long baseSystem , long newSystem , long findEdgeOptions , long straightEdgeOptions )
* C : FindEdgeReport * imaqFindEdge2 ( Image * image , const ROI * roi , const CoordinateSystem * baseSystem , const CoordinateSystem * newSystem , const FindEdgeOptions2 * findEdgeOptions , const StraightEdgeOptions * straightEdgeOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFindEdge2 ( JNIEnv * env , jclass , jlong image , jlong roi , jlong baseSystem , jlong newSystem , jlong findEdgeOptions , jlong straightEdgeOptions )
{
FindEdgeReport * rv = imaqFindEdge2 ( ( Image * ) image , ( const ROI * ) roi , ( const CoordinateSystem * ) baseSystem , ( const CoordinateSystem * ) newSystem , ( const FindEdgeOptions2 * ) findEdgeOptions , ( const StraightEdgeOptions * ) straightEdgeOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqFindTransformRect2(Image image, ROI roi, FindTransformMode mode, FindTransformRectOptions2 findTransformOptions, StraightEdgeOptions straightEdgeOptions)
* JN : void imaqFindTransformRect2 ( long image , long roi , int mode , long baseSystem , long newSystem , long findTransformOptions , long straightEdgeOptions , long axisReport )
* C : int imaqFindTransformRect2 ( Image * image , const ROI * roi , FindTransformMode mode , CoordinateSystem * baseSystem , CoordinateSystem * newSystem , const FindTransformRectOptions2 * findTransformOptions , const StraightEdgeOptions * straightEdgeOptions , AxisReport * axisReport )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFindTransformRect2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint mode , jlong baseSystem , jlong newSystem , jlong findTransformOptions , jlong straightEdgeOptions , jlong axisReport )
{
int rv = imaqFindTransformRect2 ( ( Image * ) image , ( const ROI * ) roi , ( FindTransformMode ) mode , ( CoordinateSystem * ) baseSystem , ( CoordinateSystem * ) newSystem , ( const FindTransformRectOptions2 * ) findTransformOptions , ( const StraightEdgeOptions * ) straightEdgeOptions , ( AxisReport * ) axisReport ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqFindTransformRects2(Image image, ROI primaryROI, ROI secondaryROI, FindTransformMode mode, FindTransformRectsOptions2 findTransformOptions, StraightEdgeOptions primaryStraightEdgeOptions, StraightEdgeOptions secondaryStraightEdgeOptions)
* JN : void imaqFindTransformRects2 ( long image , long primaryROI , long secondaryROI , int mode , long baseSystem , long newSystem , long findTransformOptions , long primaryStraightEdgeOptions , long secondaryStraightEdgeOptions , long axisReport )
* C : int imaqFindTransformRects2 ( Image * image , const ROI * primaryROI , const ROI * secondaryROI , FindTransformMode mode , CoordinateSystem * baseSystem , CoordinateSystem * newSystem , const FindTransformRectsOptions2 * findTransformOptions , const StraightEdgeOptions * primaryStraightEdgeOptions , const StraightEdgeOptions * secondaryStraightEdgeOptions , AxisReport * axisReport )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFindTransformRects2 ( JNIEnv * env , jclass , jlong image , jlong primaryROI , jlong secondaryROI , jint mode , jlong baseSystem , jlong newSystem , jlong findTransformOptions , jlong primaryStraightEdgeOptions , jlong secondaryStraightEdgeOptions , jlong axisReport )
{
int rv = imaqFindTransformRects2 ( ( Image * ) image , ( const ROI * ) primaryROI , ( const ROI * ) secondaryROI , ( FindTransformMode ) mode , ( CoordinateSystem * ) baseSystem , ( CoordinateSystem * ) newSystem , ( const FindTransformRectsOptions2 * ) findTransformOptions , ( const StraightEdgeOptions * ) primaryStraightEdgeOptions , ( const StraightEdgeOptions * ) secondaryStraightEdgeOptions , ( AxisReport * ) axisReport ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqLineGaugeTool2 ( const Image * image , Point start , Point end , LineGaugeMethod method , const EdgeOptions * edgeOptions , const CoordinateTransform2 * transform , float * distance )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
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 ) ;
}
/* J: RakeReport2 imaqRake2(Image image, ROI roi, RakeDirection direction, EdgeProcess process, int stepSize)
* JN : long imaqRake2 ( long image , long roi , int direction , int process , int stepSize , long edgeOptions )
* C : RakeReport2 * imaqRake2 ( Image * image , ROI * roi , RakeDirection direction , EdgeProcess process , int stepSize , EdgeOptions2 * edgeOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqRake2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jint process , jint stepSize , jlong edgeOptions )
{
RakeReport2 * rv = imaqRake2 ( ( Image * ) image , ( ROI * ) roi , ( RakeDirection ) direction , ( EdgeProcess ) process , ( int ) stepSize , ( EdgeOptions2 * ) edgeOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: SimpleEdgeResult imaqSimpleEdge(Image image, Point[] points, SimpleEdgeOptions options)
* JN : long imaqSimpleEdge ( long image , long points , int numPoints , long options , long numEdges )
* C : PointFloat * imaqSimpleEdge ( const Image * image , const Point * points , int numPoints , const SimpleEdgeOptions * options , int * numEdges )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSimpleEdge ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jlong options , jlong numEdges )
{
PointFloat * rv = imaqSimpleEdge ( ( const Image * ) image , ( const Point * ) points , ( int ) numPoints , ( const SimpleEdgeOptions * ) options , ( int * ) numEdges ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: SpokeReport2 imaqSpoke2(Image image, ROI roi, SpokeDirection direction, EdgeProcess process, int stepSize)
* JN : long imaqSpoke2 ( long image , long roi , int direction , int process , int stepSize , long edgeOptions )
* C : SpokeReport2 * imaqSpoke2 ( Image * image , ROI * roi , SpokeDirection direction , EdgeProcess process , int stepSize , EdgeOptions2 * edgeOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSpoke2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jint process , jint stepSize , jlong edgeOptions )
{
SpokeReport2 * rv = imaqSpoke2 ( ( Image * ) image , ( ROI * ) roi , ( SpokeDirection ) direction , ( EdgeProcess ) process , ( int ) stepSize , ( EdgeOptions2 * ) edgeOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: StraightEdgeReport2 imaqStraightEdge(Image image, ROI roi, SearchDirection searchDirection, EdgeOptions2 edgeOptions, StraightEdgeOptions straightEdgeOptions)
* JN : long imaqStraightEdge ( long image , long roi , int searchDirection , long edgeOptions , long straightEdgeOptions )
* C : StraightEdgeReport2 * imaqStraightEdge ( const Image * image , const ROI * roi , SearchDirection searchDirection , const EdgeOptions2 * edgeOptions , const StraightEdgeOptions * straightEdgeOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqStraightEdge ( JNIEnv * env , jclass , jlong image , jlong roi , jint searchDirection , jlong edgeOptions , jlong straightEdgeOptions )
{
StraightEdgeReport2 * rv = imaqStraightEdge ( ( const Image * ) image , ( const ROI * ) roi , ( SearchDirection ) searchDirection , ( const EdgeOptions2 * ) edgeOptions , ( const StraightEdgeOptions * ) straightEdgeOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: StraightEdgeReport2 imaqStraightEdge2(Image image, ROI roi, SearchDirection searchDirection, EdgeOptions2 edgeOptions, StraightEdgeOptions straightEdgeOptions, int optimizedMode)
* JN : long imaqStraightEdge2 ( long image , long roi , int searchDirection , long edgeOptions , long straightEdgeOptions , int optimizedMode )
* C : StraightEdgeReport2 * imaqStraightEdge2 ( const Image * image , const ROI * roi , SearchDirection searchDirection , const EdgeOptions2 * edgeOptions , const StraightEdgeOptions * straightEdgeOptions , unsigned int optimizedMode )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqStraightEdge2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint searchDirection , jlong edgeOptions , jlong straightEdgeOptions , jint optimizedMode )
{
StraightEdgeReport2 * rv = imaqStraightEdge2 ( ( const Image * ) image , ( const ROI * ) roi , ( SearchDirection ) searchDirection , ( const EdgeOptions2 * ) edgeOptions , ( const StraightEdgeOptions * ) straightEdgeOptions , ( unsigned int ) optimizedMode ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Spatial Filters functions
*/
/* J: void imaqCannyEdgeFilter(Image dest, Image source, CannyOptions options)
* JN : void imaqCannyEdgeFilter ( long dest , long source , long options )
* C : int imaqCannyEdgeFilter ( Image * dest , const Image * source , const CannyOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCannyEdgeFilter ( JNIEnv * env , jclass , jlong dest , jlong source , jlong options )
{
int rv = imaqCannyEdgeFilter ( ( Image * ) dest , ( const Image * ) source , ( const CannyOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCorrelate(Image dest, Image source, Image templateImage, Rect rect)
* JN : void imaqCorrelate ( long dest , long source , long templateImage , long rect )
* C : int imaqCorrelate ( Image * dest , Image * source , const Image * templateImage , Rect rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCorrelate ( JNIEnv * env , jclass , jlong dest , jlong source , jlong templateImage , jlong rect )
{
int rv = imaqCorrelate ( ( Image * ) dest , ( Image * ) source , ( const Image * ) templateImage , * ( ( Rect * ) rect ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqEdgeFilter(Image dest, Image source, OutlineMethod method, Image mask)
* JN : void imaqEdgeFilter ( long dest , long source , int method , long mask )
* C : int imaqEdgeFilter ( Image * dest , Image * source , OutlineMethod method , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqEdgeFilter ( JNIEnv * env , jclass , jlong dest , jlong source , jint method , jlong mask )
{
int rv = imaqEdgeFilter ( ( Image * ) dest , ( Image * ) source , ( OutlineMethod ) method , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqLowPass(Image dest, Image source, int width, int height, float tolerance, Image mask)
* JN : void imaqLowPass ( long dest , long source , int width , int height , float tolerance , long mask )
* C : int imaqLowPass ( Image * dest , Image * source , int width , int height , float tolerance , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLowPass ( JNIEnv * env , jclass , jlong dest , jlong source , jint width , jint height , jfloat tolerance , jlong mask )
{
int rv = imaqLowPass ( ( Image * ) dest , ( Image * ) source , ( int ) width , ( int ) height , ( float ) tolerance , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMedianFilter(Image dest, Image source, int width, int height, Image mask)
* JN : void imaqMedianFilter ( long dest , long source , int width , int height , long mask )
* C : int imaqMedianFilter ( Image * dest , Image * source , int width , int height , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMedianFilter ( JNIEnv * env , jclass , jlong dest , jlong source , jint width , jint height , jlong mask )
{
int rv = imaqMedianFilter ( ( Image * ) dest , ( Image * ) source , ( int ) width , ( int ) height , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqNthOrderFilter(Image dest, Image source, int width, int height, int n, Image mask)
* JN : void imaqNthOrderFilter ( long dest , long source , int width , int height , int n , long mask )
* C : int imaqNthOrderFilter ( Image * dest , Image * source , int width , int height , int n , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqNthOrderFilter ( JNIEnv * env , jclass , jlong dest , jlong source , jint width , jint height , jint n , jlong mask )
{
int rv = imaqNthOrderFilter ( ( Image * ) dest , ( Image * ) source , ( int ) width , ( int ) height , ( int ) n , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Drawing functions
*/
/* J: void imaqDrawLineOnImage(Image dest, Image source, DrawMode mode, Point start, Point end, float newPixelValue)
* JN : void imaqDrawLineOnImage ( long dest , long source , int mode , long start , long end , float newPixelValue )
* C : int imaqDrawLineOnImage ( Image * dest , const Image * source , DrawMode mode , Point start , Point end , float newPixelValue )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDrawLineOnImage ( JNIEnv * env , jclass , jlong dest , jlong source , jint mode , jlong start , jlong end , jfloat newPixelValue )
{
int rv = imaqDrawLineOnImage ( ( Image * ) dest , ( const Image * ) source , ( DrawMode ) mode , * ( ( Point * ) start ) , * ( ( Point * ) end ) , ( float ) newPixelValue ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqDrawShapeOnImage(Image dest, Image source, Rect rect, DrawMode mode, ShapeMode shape, float newPixelValue)
* JN : void imaqDrawShapeOnImage ( long dest , long source , long rect , int mode , int shape , float newPixelValue )
* C : int imaqDrawShapeOnImage ( Image * dest , const Image * source , Rect rect , DrawMode mode , ShapeMode shape , float newPixelValue )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDrawShapeOnImage ( JNIEnv * env , jclass , jlong dest , jlong source , jlong rect , jint mode , jint shape , jfloat newPixelValue )
{
int rv = imaqDrawShapeOnImage ( ( Image * ) dest , ( const Image * ) source , * ( ( Rect * ) rect ) , ( DrawMode ) mode , ( ShapeMode ) shape , ( float ) newPixelValue ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqDrawTextOnImage ( Image * dest , const Image * source , Point coord , const char * text , const DrawTextOptions * options , int * fontNameUsed )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDrawTextOnImage ( JNIEnv * env , jclass , jlong dest , jlong source , jlong coord , jlong text , jlong options , jlong fontNameUsed )
2014-12-09 00:48:57 -08:00
{
int rv = imaqDrawTextOnImage ( ( Image * ) dest , ( const Image * ) source , * ( ( Point * ) coord ) , ( const char * ) text , ( const DrawTextOptions * ) options , ( int * ) fontNameUsed ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Interlacing functions
*/
/* J: void imaqInterlaceCombine(Image frame, Image odd, Image even)
* JN : void imaqInterlaceCombine ( long frame , long odd , long even )
* C : int imaqInterlaceCombine ( Image * frame , const Image * odd , const Image * even )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqInterlaceCombine ( JNIEnv * env , jclass , jlong frame , jlong odd , jlong even )
{
int rv = imaqInterlaceCombine ( ( Image * ) frame , ( const Image * ) odd , ( const Image * ) even ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqInterlaceSeparate(Image frame, Image odd, Image even)
* JN : void imaqInterlaceSeparate ( long frame , long odd , long even )
* C : int imaqInterlaceSeparate ( const Image * frame , Image * odd , Image * even )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqInterlaceSeparate ( JNIEnv * env , jclass , jlong frame , jlong odd , jlong even )
{
int rv = imaqInterlaceSeparate ( ( const Image * ) frame , ( Image * ) odd , ( Image * ) even ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Image Information functions
*/
2014-12-11 22:19:08 -08:00
/* J: EnumerateCustomKeysResult imaqEnumerateCustomKeys(Image image)
* JN : long imaqEnumerateCustomKeys ( long image , long size )
* C : char * * imaqEnumerateCustomKeys ( const Image * image , unsigned int * size )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEnumerateCustomKeys ( JNIEnv * env , jclass , jlong image , jlong size )
{
char * * rv = imaqEnumerateCustomKeys ( ( const Image * ) image , ( unsigned int * ) size ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetBitDepth(Image image)
* JN : void imaqGetBitDepth ( long image , long bitDepth )
2014-12-09 00:48:57 -08:00
* C : int imaqGetBitDepth ( const Image * image , unsigned int * bitDepth )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBitDepth ( JNIEnv * env , jclass , jlong image , jlong bitDepth )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetBitDepth ( ( const Image * ) image , ( unsigned int * ) bitDepth ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetBytesPerPixel(Image image)
* JN : void imaqGetBytesPerPixel ( long image , long byteCount )
2014-12-09 00:48:57 -08:00
* C : int imaqGetBytesPerPixel ( const Image * image , int * byteCount )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBytesPerPixel ( JNIEnv * env , jclass , jlong image , jlong byteCount )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetBytesPerPixel ( ( const Image * ) image , ( int * ) byteCount ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetImageInfo(Image image)
* JN : void imaqGetImageInfo ( long image , long info )
2014-12-09 00:48:57 -08:00
* C : int imaqGetImageInfo ( const Image * image , ImageInfo * info )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetImageInfo ( JNIEnv * env , jclass , jlong image , jlong info )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetImageInfo ( ( const Image * ) image , ( ImageInfo * ) info ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetImageSize(Image image)
* JN : void imaqGetImageSize ( long image , long width , long height )
* C : int imaqGetImageSize ( const Image * image , int * width , int * height )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetImageSize ( JNIEnv * env , jclass , jlong image , jlong width , jlong height )
{
int rv = imaqGetImageSize ( ( const Image * ) image , ( int * ) width , ( int * ) height ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetImageType(Image image)
* JN : void imaqGetImageType ( long image , long type )
2014-12-09 00:48:57 -08:00
* C : int imaqGetImageType ( const Image * image , ImageType * type )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetImageType ( JNIEnv * env , jclass , jlong image , jlong type )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetImageType ( ( const Image * ) image , ( ImageType * ) type ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetMaskOffset(Image image)
* JN : void imaqGetMaskOffset ( long image , long offset )
2014-12-09 00:48:57 -08:00
* C : int imaqGetMaskOffset ( const Image * image , Point * offset )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetMaskOffset ( JNIEnv * env , jclass , jlong image , jlong offset )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetMaskOffset ( ( const Image * ) image , ( Point * ) offset ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetVisionInfoTypes(Image image)
* JN : void imaqGetVisionInfoTypes ( long image , long present )
2014-12-09 00:48:57 -08:00
* C : int imaqGetVisionInfoTypes ( const Image * image , unsigned int * present )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetVisionInfoTypes ( JNIEnv * env , jclass , jlong image , jlong present )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetVisionInfoTypes ( ( const Image * ) image , ( unsigned int * ) present ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqIsImageEmpty(Image image)
* JN : void imaqIsImageEmpty ( long image , long empty )
2014-12-09 00:48:57 -08:00
* C : int imaqIsImageEmpty ( const Image * image , int * empty )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsImageEmpty ( JNIEnv * env , jclass , jlong image , jlong empty )
2014-12-09 00:48:57 -08:00
{
int rv = imaqIsImageEmpty ( ( const Image * ) image , ( int * ) empty ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: RawData imaqReadCustomData(Image image, String key)
* JN : long imaqReadCustomData ( long image , long key , long size )
* C : void * imaqReadCustomData ( const Image * image , const char * key , unsigned int * size )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadCustomData ( JNIEnv * env , jclass , jlong image , jlong key , jlong size )
{
void * rv = imaqReadCustomData ( ( const Image * ) image , ( const char * ) key , ( unsigned int * ) size ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqRemoveCustomData(Image image, String key)
* JN : void imaqRemoveCustomData ( long image , long key )
* C : int imaqRemoveCustomData ( Image * image , const char * key )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqRemoveCustomData ( JNIEnv * env , jclass , jlong image , jlong key )
{
int rv = imaqRemoveCustomData ( ( Image * ) image , ( const char * ) key ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqRemoveVisionInfo2(Image image, int info)
* JN : void imaqRemoveVisionInfo2 ( long image , int info )
* C : int imaqRemoveVisionInfo2 ( const Image * image , unsigned int info )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqRemoveVisionInfo2 ( JNIEnv * env , jclass , jlong image , jint info )
{
int rv = imaqRemoveVisionInfo2 ( ( const Image * ) image , ( unsigned int ) info ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetBitDepth(Image image, int bitDepth)
* JN : void imaqSetBitDepth ( long image , int bitDepth )
* C : int imaqSetBitDepth ( Image * image , unsigned int bitDepth )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetBitDepth ( JNIEnv * env , jclass , jlong image , jint bitDepth )
{
int rv = imaqSetBitDepth ( ( Image * ) image , ( unsigned int ) bitDepth ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetImageSize(Image image, int width, int height)
* JN : void imaqSetImageSize ( long image , int width , int height )
* C : int imaqSetImageSize ( Image * image , int width , int height )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetImageSize ( JNIEnv * env , jclass , jlong image , jint width , jint height )
{
int rv = imaqSetImageSize ( ( Image * ) image , ( int ) width , ( int ) height ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetMaskOffset(Image image, Point offset)
* JN : void imaqSetMaskOffset ( long image , long offset )
* C : int imaqSetMaskOffset ( Image * image , Point offset )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetMaskOffset ( JNIEnv * env , jclass , jlong image , jlong offset )
{
int rv = imaqSetMaskOffset ( ( Image * ) image , * ( ( Point * ) offset ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: void imaqWriteCustomData(Image image, String key, RawData data, int size)
* JN : void imaqWriteCustomData ( long image , long key , long data , int size )
* C : int imaqWriteCustomData ( Image * image , const char * key , const void * data , unsigned int size )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteCustomData ( JNIEnv * env , jclass , jlong image , jlong key , jlong data , jint size )
{
int rv = imaqWriteCustomData ( ( Image * ) image , ( const char * ) key , ( const void * ) data , ( unsigned int ) size ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-09 00:48:57 -08:00
/*
* Display functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqAreToolsContextSensitive()
* JN : void imaqAreToolsContextSensitive ( long sensitive )
2014-12-09 00:48:57 -08:00
* C : int imaqAreToolsContextSensitive ( int * sensitive )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAreToolsContextSensitive ( JNIEnv * env , jclass , jlong sensitive )
2014-12-09 00:48:57 -08:00
{
int rv = imaqAreToolsContextSensitive ( ( int * ) sensitive ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCloseWindow(int windowNumber)
* JN : void imaqCloseWindow ( int windowNumber )
* C : int imaqCloseWindow ( int windowNumber )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCloseWindow ( JNIEnv * env , jclass , jint windowNumber )
{
int rv = imaqCloseWindow ( ( int ) windowNumber ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqDisplayImage(Image image, int windowNumber, int resize)
* JN : void imaqDisplayImage ( long image , int windowNumber , int resize )
* C : int imaqDisplayImage ( const Image * image , int windowNumber , int resize )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDisplayImage ( JNIEnv * env , jclass , jlong image , jint windowNumber , jint resize )
{
int rv = imaqDisplayImage ( ( const Image * ) image , ( int ) windowNumber , ( int ) resize ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetLastKey()
* JN : void imaqGetLastKey ( long keyPressed , long windowNumber , long modifiers )
* C : int imaqGetLastKey ( char * keyPressed , int * windowNumber , int * modifiers )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetLastKey ( JNIEnv * env , jclass , jlong keyPressed , jlong windowNumber , jlong modifiers )
{
int rv = imaqGetLastKey ( ( char * ) keyPressed , ( int * ) windowNumber , ( int * ) modifiers ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetWindowCenterPos(int windowNumber)
* JN : void imaqGetWindowCenterPos ( int windowNumber , long centerPosition )
2014-12-09 00:48:57 -08:00
* C : int imaqGetWindowCenterPos ( int windowNumber , Point * centerPosition )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowCenterPos ( JNIEnv * env , jclass , jint windowNumber , jlong centerPosition )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetWindowCenterPos ( ( int ) windowNumber , ( Point * ) centerPosition ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetToolContextSensitivity(int sensitive)
* JN : void imaqSetToolContextSensitivity ( int sensitive )
* C : int imaqSetToolContextSensitivity ( int sensitive )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetToolContextSensitivity ( JNIEnv * env , jclass , jint sensitive )
{
int rv = imaqSetToolContextSensitivity ( ( int ) sensitive ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqShowWindow(int windowNumber, int visible)
* JN : void imaqShowWindow ( int windowNumber , int visible )
* C : int imaqShowWindow ( int windowNumber , int visible )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqShowWindow ( JNIEnv * env , jclass , jint windowNumber , jint visible )
{
int rv = imaqShowWindow ( ( int ) windowNumber , ( int ) visible ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Image Manipulation functions
*/
/* J: void imaqCopyRect(Image dest, Image source, Rect rect, Point destLoc)
* JN : void imaqCopyRect ( long dest , long source , long rect , long destLoc )
* C : int imaqCopyRect ( Image * dest , const Image * source , Rect rect , Point destLoc )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCopyRect ( JNIEnv * env , jclass , jlong dest , jlong source , jlong rect , jlong destLoc )
{
int rv = imaqCopyRect ( ( Image * ) dest , ( const Image * ) source , * ( ( Rect * ) rect ) , * ( ( Point * ) destLoc ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqDuplicate(Image dest, Image source)
* JN : void imaqDuplicate ( long dest , long source )
* C : int imaqDuplicate ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDuplicate ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqDuplicate ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: RawData imaqFlatten(Image image, FlattenType type, CompressionType compression, int quality)
* JN : long imaqFlatten ( long image , int type , int compression , int quality , long size )
* C : void * imaqFlatten ( const Image * image , FlattenType type , CompressionType compression , int quality , unsigned int * size )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFlatten ( JNIEnv * env , jclass , jlong image , jint type , jint compression , jint quality , jlong size )
{
void * rv = imaqFlatten ( ( const Image * ) image , ( FlattenType ) type , ( CompressionType ) compression , ( int ) quality , ( unsigned int * ) size ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqFlip(Image dest, Image source, FlipAxis axis)
* JN : void imaqFlip ( long dest , long source , int axis )
* C : int imaqFlip ( Image * dest , const Image * source , FlipAxis axis )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFlip ( JNIEnv * env , jclass , jlong dest , jlong source , jint axis )
{
int rv = imaqFlip ( ( Image * ) dest , ( const Image * ) source , ( FlipAxis ) axis ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMask(Image dest, Image source, Image mask)
* JN : void imaqMask ( long dest , long source , long mask )
* C : int imaqMask ( Image * dest , const Image * source , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMask ( JNIEnv * env , jclass , jlong dest , jlong source , jlong mask )
{
int rv = imaqMask ( ( Image * ) dest , ( const Image * ) source , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqResample(Image dest, Image source, int newWidth, int newHeight, InterpolationMethod method, Rect rect)
* JN : void imaqResample ( long dest , long source , int newWidth , int newHeight , int method , long rect )
* C : int imaqResample ( Image * dest , const Image * source , int newWidth , int newHeight , InterpolationMethod method , Rect rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqResample ( JNIEnv * env , jclass , jlong dest , jlong source , jint newWidth , jint newHeight , jint method , jlong rect )
{
int rv = imaqResample ( ( Image * ) dest , ( const Image * ) source , ( int ) newWidth , ( int ) newHeight , ( InterpolationMethod ) method , * ( ( Rect * ) rect ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqScale(Image dest, Image source, int xScale, int yScale, ScalingMode scaleMode, Rect rect)
* JN : void imaqScale ( long dest , long source , int xScale , int yScale , int scaleMode , long rect )
* C : int imaqScale ( Image * dest , const Image * source , int xScale , int yScale , ScalingMode scaleMode , Rect rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqScale ( JNIEnv * env , jclass , jlong dest , jlong source , jint xScale , jint yScale , jint scaleMode , jlong rect )
{
int rv = imaqScale ( ( Image * ) dest , ( const Image * ) source , ( int ) xScale , ( int ) yScale , ( ScalingMode ) scaleMode , * ( ( Rect * ) rect ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqTranspose(Image dest, Image source)
* JN : void imaqTranspose ( long dest , long source )
* C : int imaqTranspose ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqTranspose ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqTranspose ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: void imaqUnflatten(Image image, RawData data, int size)
* JN : void imaqUnflatten ( long image , long data , int size )
* C : int imaqUnflatten ( Image * image , const void * data , unsigned int size )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqUnflatten ( JNIEnv * env , jclass , jlong image , jlong data , jint size )
{
int rv = imaqUnflatten ( ( Image * ) image , ( const void * ) data , ( unsigned int ) size ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqUnwrapImage(Image dest, Image source, Annulus annulus, RectOrientation orientation, InterpolationMethod method)
* JN : void imaqUnwrapImage ( long dest , long source , long annulus , int orientation , int method )
* C : int imaqUnwrapImage ( Image * dest , const Image * source , Annulus annulus , RectOrientation orientation , InterpolationMethod method )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqUnwrapImage ( JNIEnv * env , jclass , jlong dest , jlong source , jlong annulus , jint orientation , jint method )
{
int rv = imaqUnwrapImage ( ( Image * ) dest , ( const Image * ) source , * ( ( Annulus * ) annulus ) , ( RectOrientation ) orientation , ( InterpolationMethod ) method ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqView3D(Image dest, Image source, View3DOptions options)
* JN : void imaqView3D ( long dest , long source , long options )
* C : int imaqView3D ( Image * dest , Image * source , const View3DOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqView3D ( JNIEnv * env , jclass , jlong dest , jlong source , jlong options )
{
int rv = imaqView3D ( ( Image * ) dest , ( Image * ) source , ( const View3DOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* File I / O functions
*/
/* J: void imaqCloseAVI(int session)
* JN : void imaqCloseAVI ( int session )
* C : int imaqCloseAVI ( AVISession session )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCloseAVI ( JNIEnv * env , jclass , jint session )
{
int rv = imaqCloseAVI ( ( AVISession ) session ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: int imaqCreateAVI(String fileName, String compressionFilter, int quality, int framesPerSecond, int maxDataSize)
* JN : int imaqCreateAVI ( long fileName , long compressionFilter , int quality , int framesPerSecond , int maxDataSize )
* C : AVISession imaqCreateAVI ( const char * fileName , const char * compressionFilter , int quality , unsigned int framesPerSecond , unsigned int maxDataSize )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqCreateAVI ( JNIEnv * env , jclass , jlong fileName , jlong compressionFilter , jint quality , jint framesPerSecond , jint maxDataSize )
{
AVISession rv = imaqCreateAVI ( ( const char * ) fileName , ( const char * ) compressionFilter , ( int ) quality , ( unsigned int ) framesPerSecond , ( unsigned int ) maxDataSize ) ;
return ( jint ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetAVIInfo(int session)
* JN : void imaqGetAVIInfo ( int session , long info )
2014-12-09 00:48:57 -08:00
* C : int imaqGetAVIInfo ( AVISession session , AVIInfo * info )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetAVIInfo ( JNIEnv * env , jclass , jint session , jlong info )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetAVIInfo ( ( AVISession ) session , ( AVIInfo * ) info ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetFileInfo(String fileName)
* JN : void imaqGetFileInfo ( long fileName , long calibrationUnit , long calibrationX , long calibrationY , long width , long height , long imageType )
* C : int imaqGetFileInfo ( const char * fileName , CalibrationUnit * calibrationUnit , float * calibrationX , float * calibrationY , int * width , int * height , ImageType * imageType )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetFileInfo ( JNIEnv * env , jclass , jlong fileName , jlong calibrationUnit , jlong calibrationX , jlong calibrationY , jlong width , jlong height , jlong imageType )
{
int rv = imaqGetFileInfo ( ( const char * ) fileName , ( CalibrationUnit * ) calibrationUnit , ( float * ) calibrationX , ( float * ) calibrationY , ( int * ) width , ( int * ) height , ( ImageType * ) imageType ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: GetFilterNamesResult imaqGetFilterNames()
* JN : long imaqGetFilterNames ( long numFilters )
* C : FilterName * imaqGetFilterNames ( int * numFilters )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetFilterNames ( JNIEnv * env , jclass , jlong numFilters )
{
FilterName * rv = imaqGetFilterNames ( ( int * ) numFilters ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-11 22:19:08 -08:00
/* J: LoadImagePopupResult imaqLoadImagePopup(String defaultDirectory, String defaultFileSpec, String fileTypeList, String title, int allowMultiplePaths, ButtonLabel buttonLabel, int restrictDirectory, int restrictExtension, int allowCancel, int allowMakeDirectory)
* JN : long imaqLoadImagePopup ( long defaultDirectory , long defaultFileSpec , long fileTypeList , long title , int allowMultiplePaths , int buttonLabel , int restrictDirectory , int restrictExtension , int allowCancel , int allowMakeDirectory , long cancelled , long numPaths )
* C : char * * imaqLoadImagePopup ( const char * defaultDirectory , const char * defaultFileSpec , const char * fileTypeList , const char * title , int allowMultiplePaths , ButtonLabel buttonLabel , int restrictDirectory , int restrictExtension , int allowCancel , int allowMakeDirectory , int * cancelled , int * numPaths )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLoadImagePopup ( JNIEnv * env , jclass , jlong defaultDirectory , jlong defaultFileSpec , jlong fileTypeList , jlong title , jint allowMultiplePaths , jint buttonLabel , jint restrictDirectory , jint restrictExtension , jint allowCancel , jint allowMakeDirectory , jlong cancelled , jlong numPaths )
{
char * * rv = imaqLoadImagePopup ( ( const char * ) defaultDirectory , ( const char * ) defaultFileSpec , ( const char * ) fileTypeList , ( const char * ) title , ( int ) allowMultiplePaths , ( ButtonLabel ) buttonLabel , ( int ) restrictDirectory , ( int ) restrictExtension , ( int ) allowCancel , ( int ) allowMakeDirectory , ( int * ) cancelled , ( int * ) numPaths ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/* J: int imaqOpenAVI(String fileName)
* JN : int imaqOpenAVI ( long fileName )
* C : AVISession imaqOpenAVI ( const char * fileName )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqOpenAVI ( JNIEnv * env , jclass , jlong fileName )
{
AVISession rv = imaqOpenAVI ( ( const char * ) fileName ) ;
return ( jint ) rv ;
}
/* J: void imaqReadFile(Image image, String fileName)
* JN : void imaqReadFile ( long image , long fileName , long colorTable , long numColors )
* C : int imaqReadFile ( Image * image , const char * fileName , RGBValue * colorTable , int * numColors )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReadFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jlong colorTable , jlong numColors )
{
int rv = imaqReadFile ( ( Image * ) image , ( const char * ) fileName , ( RGBValue * ) colorTable , ( int * ) numColors ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqReadVisionFile(Image image, String fileName)
* JN : void imaqReadVisionFile ( long image , long fileName , long colorTable , long numColors )
* C : int imaqReadVisionFile ( Image * image , const char * fileName , RGBValue * colorTable , int * numColors )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReadVisionFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jlong colorTable , jlong numColors )
{
int rv = imaqReadVisionFile ( ( Image * ) image , ( const char * ) fileName , ( RGBValue * ) colorTable , ( int * ) numColors ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: void imaqWriteAVIFrame(Image image, int session, RawData data, int dataLength)
* JN : void imaqWriteAVIFrame ( long image , int session , long data , int dataLength )
* C : int imaqWriteAVIFrame ( Image * image , AVISession session , const void * data , unsigned int dataLength )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteAVIFrame ( JNIEnv * env , jclass , jlong image , jint session , jlong data , jint dataLength )
{
int rv = imaqWriteAVIFrame ( ( Image * ) image , ( AVISession ) session , ( const void * ) data , ( unsigned int ) dataLength ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqWriteBMPFile(Image image, String fileName, int compress, RGBValue colorTable)
* JN : void imaqWriteBMPFile ( long image , long fileName , int compress , long colorTable )
* C : int imaqWriteBMPFile ( const Image * image , const char * fileName , int compress , const RGBValue * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteBMPFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jint compress , jlong colorTable )
{
int rv = imaqWriteBMPFile ( ( const Image * ) image , ( const char * ) fileName , ( int ) compress , ( const RGBValue * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqWriteFile(Image image, String fileName, RGBValue colorTable)
* JN : void imaqWriteFile ( long image , long fileName , long colorTable )
* C : int imaqWriteFile ( const Image * image , const char * fileName , const RGBValue * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jlong colorTable )
{
int rv = imaqWriteFile ( ( const Image * ) image , ( const char * ) fileName , ( const RGBValue * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: void imaqWriteJPEGFile(Image image, String fileName, int quality, RawData colorTable)
* JN : void imaqWriteJPEGFile ( long image , long fileName , int quality , long colorTable )
* C : int imaqWriteJPEGFile ( const Image * image , const char * fileName , unsigned int quality , void * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteJPEGFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jint quality , jlong colorTable )
{
int rv = imaqWriteJPEGFile ( ( const Image * ) image , ( const char * ) fileName , ( unsigned int ) quality , ( void * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqWriteJPEG2000File(Image image, String fileName, int lossless, float compressionRatio, JPEG2000FileAdvancedOptions advancedOptions, RGBValue colorTable)
* JN : void imaqWriteJPEG2000File ( long image , long fileName , int lossless , float compressionRatio , long advancedOptions , long colorTable )
* C : int imaqWriteJPEG2000File ( const Image * image , const char * fileName , int lossless , float compressionRatio , const JPEG2000FileAdvancedOptions * advancedOptions , const RGBValue * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteJPEG2000File ( JNIEnv * env , jclass , jlong image , jlong fileName , jint lossless , jfloat compressionRatio , jlong advancedOptions , jlong colorTable )
{
int rv = imaqWriteJPEG2000File ( ( const Image * ) image , ( const char * ) fileName , ( int ) lossless , ( float ) compressionRatio , ( const JPEG2000FileAdvancedOptions * ) advancedOptions , ( const RGBValue * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqWritePNGFile2(Image image, String fileName, int compressionSpeed, RGBValue colorTable, int useBitDepth)
* JN : void imaqWritePNGFile2 ( long image , long fileName , int compressionSpeed , long colorTable , int useBitDepth )
* C : int imaqWritePNGFile2 ( const Image * image , const char * fileName , unsigned int compressionSpeed , const RGBValue * colorTable , int useBitDepth )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWritePNGFile2 ( JNIEnv * env , jclass , jlong image , jlong fileName , jint compressionSpeed , jlong colorTable , jint useBitDepth )
{
int rv = imaqWritePNGFile2 ( ( const Image * ) image , ( const char * ) fileName , ( unsigned int ) compressionSpeed , ( const RGBValue * ) colorTable , ( int ) useBitDepth ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqWriteTIFFFile(Image image, String fileName, TIFFFileOptions options, RGBValue colorTable)
* JN : void imaqWriteTIFFFile ( long image , long fileName , long options , long colorTable )
* C : int imaqWriteTIFFFile ( const Image * image , const char * fileName , const TIFFFileOptions * options , const RGBValue * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteTIFFFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jlong options , jlong colorTable )
{
int rv = imaqWriteTIFFFile ( ( const Image * ) image , ( const char * ) fileName , ( const TIFFFileOptions * ) options , ( const RGBValue * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqWriteVisionFile(Image image, String fileName, RGBValue colorTable)
* JN : void imaqWriteVisionFile ( long image , long fileName , long colorTable )
* C : int imaqWriteVisionFile ( const Image * image , const char * fileName , const RGBValue * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteVisionFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jlong colorTable )
{
int rv = imaqWriteVisionFile ( ( const Image * ) image , ( const char * ) fileName , ( const RGBValue * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Analytic Geometry functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqBuildCoordinateSystem(Point points, ReferenceMode mode, AxisOrientation orientation)
* JN : void imaqBuildCoordinateSystem ( long points , int mode , int orientation , long system )
2014-12-09 00:48:57 -08:00
* C : int imaqBuildCoordinateSystem ( const Point * points , ReferenceMode mode , AxisOrientation orientation , CoordinateSystem * system )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqBuildCoordinateSystem ( JNIEnv * env , jclass , jlong points , jint mode , jint orientation , jlong system )
2014-12-09 00:48:57 -08:00
{
int rv = imaqBuildCoordinateSystem ( ( const Point * ) points , ( ReferenceMode ) mode , ( AxisOrientation ) orientation , ( CoordinateSystem * ) system ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: BestCircle2 imaqFitCircle2(PointFloat[] points, FitCircleOptions options)
* JN : long imaqFitCircle2 ( long points , int numPoints , long options )
* C : BestCircle2 * imaqFitCircle2 ( const PointFloat * points , int numPoints , const FitCircleOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFitCircle2 ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong options )
{
BestCircle2 * rv = imaqFitCircle2 ( ( const PointFloat * ) points , ( int ) numPoints , ( const FitCircleOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: BestEllipse2 imaqFitEllipse2(PointFloat[] points, FitEllipseOptions options)
* JN : long imaqFitEllipse2 ( long points , int numPoints , long options )
* C : BestEllipse2 * imaqFitEllipse2 ( const PointFloat * points , int numPoints , const FitEllipseOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFitEllipse2 ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong options )
{
BestEllipse2 * rv = imaqFitEllipse2 ( ( const PointFloat * ) points , ( int ) numPoints , ( const FitEllipseOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: BestLine imaqFitLine(PointFloat[] points, FitLineOptions options)
* JN : long imaqFitLine ( long points , int numPoints , long options )
* C : BestLine * imaqFitLine ( const PointFloat * points , int numPoints , const FitLineOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFitLine ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong options )
{
BestLine * rv = imaqFitLine ( ( const PointFloat * ) points , ( int ) numPoints , ( const FitLineOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetAngle(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2)
* JN : void imaqGetAngle ( long start1 , long end1 , long start2 , long end2 , long angle )
2014-12-09 00:48:57 -08:00
* C : int imaqGetAngle ( PointFloat start1 , PointFloat end1 , PointFloat start2 , PointFloat end2 , float * angle )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetAngle ( JNIEnv * env , jclass , jlong start1 , jlong end1 , jlong start2 , jlong end2 , jlong angle )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetAngle ( * ( ( PointFloat * ) start1 ) , * ( ( PointFloat * ) end1 ) , * ( ( PointFloat * ) start2 ) , * ( ( PointFloat * ) end2 ) , ( float * ) angle ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetBisectingLine(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2)
* JN : void imaqGetBisectingLine ( long start1 , long end1 , long start2 , long end2 , long bisectStart , long bisectEnd )
* C : int imaqGetBisectingLine ( PointFloat start1 , PointFloat end1 , PointFloat start2 , PointFloat end2 , PointFloat * bisectStart , PointFloat * bisectEnd )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBisectingLine ( JNIEnv * env , jclass , jlong start1 , jlong end1 , jlong start2 , jlong end2 , jlong bisectStart , jlong bisectEnd )
{
int rv = imaqGetBisectingLine ( * ( ( PointFloat * ) start1 ) , * ( ( PointFloat * ) end1 ) , * ( ( PointFloat * ) start2 ) , * ( ( PointFloat * ) end2 ) , ( PointFloat * ) bisectStart , ( PointFloat * ) bisectEnd ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetDistance(PointFloat point1, PointFloat point2)
* JN : void imaqGetDistance ( long point1 , long point2 , long distance )
2014-12-09 00:48:57 -08:00
* C : int imaqGetDistance ( PointFloat point1 , PointFloat point2 , float * distance )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetDistance ( JNIEnv * env , jclass , jlong point1 , jlong point2 , jlong distance )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetDistance ( * ( ( PointFloat * ) point1 ) , * ( ( PointFloat * ) point2 ) , ( float * ) distance ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetIntersection(PointFloat start1, PointFloat end1, PointFloat start2, PointFloat end2)
* JN : void imaqGetIntersection ( long start1 , long end1 , long start2 , long end2 , long intersection )
2014-12-09 00:48:57 -08:00
* C : int imaqGetIntersection ( PointFloat start1 , PointFloat end1 , PointFloat start2 , PointFloat end2 , PointFloat * intersection )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetIntersection ( JNIEnv * env , jclass , jlong start1 , jlong end1 , jlong start2 , jlong end2 , jlong intersection )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetIntersection ( * ( ( PointFloat * ) start1 ) , * ( ( PointFloat * ) end1 ) , * ( ( PointFloat * ) start2 ) , * ( ( PointFloat * ) end2 ) , ( PointFloat * ) intersection ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetMidLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point)
* JN : void imaqGetMidLine ( long refLineStart , long refLineEnd , long point , long midLineStart , long midLineEnd )
* C : int imaqGetMidLine ( PointFloat refLineStart , PointFloat refLineEnd , PointFloat point , PointFloat * midLineStart , PointFloat * midLineEnd )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetMidLine ( JNIEnv * env , jclass , jlong refLineStart , jlong refLineEnd , jlong point , jlong midLineStart , jlong midLineEnd )
{
int rv = imaqGetMidLine ( * ( ( PointFloat * ) refLineStart ) , * ( ( PointFloat * ) refLineEnd ) , * ( ( PointFloat * ) point ) , ( PointFloat * ) midLineStart , ( PointFloat * ) midLineEnd ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetPerpendicularLine(PointFloat refLineStart, PointFloat refLineEnd, PointFloat point)
* JN : void imaqGetPerpendicularLine ( long refLineStart , long refLineEnd , long point , long perpLineStart , long perpLineEnd , long distance )
* C : int imaqGetPerpendicularLine ( PointFloat refLineStart , PointFloat refLineEnd , PointFloat point , PointFloat * perpLineStart , PointFloat * perpLineEnd , double * distance )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetPerpendicularLine ( JNIEnv * env , jclass , jlong refLineStart , jlong refLineEnd , jlong point , jlong perpLineStart , jlong perpLineEnd , jlong distance )
{
int rv = imaqGetPerpendicularLine ( * ( ( PointFloat * ) refLineStart ) , * ( ( PointFloat * ) refLineEnd ) , * ( ( PointFloat * ) point ) , ( PointFloat * ) perpLineStart , ( PointFloat * ) perpLineEnd , ( double * ) distance ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: GetPointsOnContourResult imaqGetPointsOnContour(Image image)
* JN : long imaqGetPointsOnContour ( long image , long numSegments )
* C : SegmentInfo * imaqGetPointsOnContour ( const Image * image , int * numSegments )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetPointsOnContour ( JNIEnv * env , jclass , jlong image , jlong numSegments )
{
SegmentInfo * rv = imaqGetPointsOnContour ( ( const Image * ) image , ( int * ) numSegments ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: GetPointsOnLineResult imaqGetPointsOnLine(Point start, Point end)
* JN : long imaqGetPointsOnLine ( long start , long end , long numPoints )
* C : Point * imaqGetPointsOnLine ( Point start , Point end , int * numPoints )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetPointsOnLine ( JNIEnv * env , jclass , jlong start , jlong end , jlong numPoints )
{
Point * rv = imaqGetPointsOnLine ( * ( ( Point * ) start ) , * ( ( Point * ) end ) , ( int * ) numPoints ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetPolygonArea(PointFloat points, int numPoints)
* JN : void imaqGetPolygonArea ( long points , int numPoints , long area )
2014-12-09 00:48:57 -08:00
* C : int imaqGetPolygonArea ( const PointFloat * points , int numPoints , float * area )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetPolygonArea ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong area )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetPolygonArea ( ( const PointFloat * ) points , ( int ) numPoints , ( float * ) area ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: InterpolatePointsResult imaqInterpolatePoints(Image image, Point[] points, InterpolationMethod method, int subpixel)
* JN : long imaqInterpolatePoints ( long image , long points , int numPoints , int method , int subpixel , long interpCount )
* C : float * imaqInterpolatePoints ( const Image * image , const Point * points , int numPoints , InterpolationMethod method , int subpixel , int * interpCount )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqInterpolatePoints ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jint method , jint subpixel , jlong interpCount )
{
float * rv = imaqInterpolatePoints ( ( const Image * ) image , ( const Point * ) points , ( int ) numPoints , ( InterpolationMethod ) method , ( int ) subpixel , ( int * ) interpCount ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/*
* Clipboard functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqClipboardToImage(Image dest)
* JN : void imaqClipboardToImage ( long dest , long palette )
2014-12-09 00:48:57 -08:00
* C : int imaqClipboardToImage ( Image * dest , RGBValue * palette )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqClipboardToImage ( JNIEnv * env , jclass , jlong dest , jlong palette )
2014-12-09 00:48:57 -08:00
{
int rv = imaqClipboardToImage ( ( Image * ) dest , ( RGBValue * ) palette ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqImageToClipboard(Image image, RGBValue palette)
* JN : void imaqImageToClipboard ( long image , long palette )
* C : int imaqImageToClipboard ( const Image * image , const RGBValue * palette )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqImageToClipboard ( JNIEnv * env , jclass , jlong image , jlong palette )
{
int rv = imaqImageToClipboard ( ( const Image * ) image , ( const RGBValue * ) palette ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Border functions
*/
/* J: void imaqFillBorder(Image image, BorderMethod method)
* JN : void imaqFillBorder ( long image , int method )
* C : int imaqFillBorder ( Image * image , BorderMethod method )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFillBorder ( JNIEnv * env , jclass , jlong image , jint method )
{
int rv = imaqFillBorder ( ( Image * ) image , ( BorderMethod ) method ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetBorderSize(Image image)
* JN : void imaqGetBorderSize ( long image , long borderSize )
2014-12-09 00:48:57 -08:00
* C : int imaqGetBorderSize ( const Image * image , int * borderSize )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetBorderSize ( JNIEnv * env , jclass , jlong image , jlong borderSize )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetBorderSize ( ( const Image * ) image , ( int * ) borderSize ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetBorderSize(Image image, int size)
* JN : void imaqSetBorderSize ( long image , int size )
* C : int imaqSetBorderSize ( Image * image , int size )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetBorderSize ( JNIEnv * env , jclass , jlong image , jint size )
{
int rv = imaqSetBorderSize ( ( Image * ) image , ( int ) size ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Image Management functions
*/
2014-12-11 22:19:08 -08:00
/* J: void imaqArrayToImage(Image image, RawData array, int numCols, int numRows)
* JN : void imaqArrayToImage ( long image , long array , int numCols , int numRows )
* C : int imaqArrayToImage ( Image * image , const void * array , int numCols , int numRows )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqArrayToImage ( JNIEnv * env , jclass , jlong image , jlong array , jint numCols , jint numRows )
{
int rv = imaqArrayToImage ( ( Image * ) image , ( const void * ) array , ( int ) numCols , ( int ) numRows ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-09 00:48:57 -08:00
/* J: Image imaqCreateImage(ImageType type, int borderSize)
* JN : long imaqCreateImage ( int type , int borderSize )
* C : Image * imaqCreateImage ( ImageType type , int borderSize )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateImage ( JNIEnv * env , jclass , jint type , jint borderSize )
{
Image * rv = imaqCreateImage ( ( ImageType ) type , ( int ) borderSize ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Color Processing functions
*/
/* J: void imaqColorBCGTransform(Image dest, Image source, BCGOptions redOptions, BCGOptions greenOptions, BCGOptions blueOptions, Image mask)
* JN : void imaqColorBCGTransform ( long dest , long source , long redOptions , long greenOptions , long blueOptions , long mask )
* C : int imaqColorBCGTransform ( Image * dest , const Image * source , const BCGOptions * redOptions , const BCGOptions * greenOptions , const BCGOptions * blueOptions , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqColorBCGTransform ( JNIEnv * env , jclass , jlong dest , jlong source , jlong redOptions , jlong greenOptions , jlong blueOptions , jlong mask )
{
int rv = imaqColorBCGTransform ( ( Image * ) dest , ( const Image * ) source , ( const BCGOptions * ) redOptions , ( const BCGOptions * ) greenOptions , ( const BCGOptions * ) blueOptions , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqColorEqualize(Image dest, Image source, int colorEqualization)
* JN : void imaqColorEqualize ( long dest , long source , int colorEqualization )
* C : int imaqColorEqualize ( Image * dest , const Image * source , int colorEqualization )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqColorEqualize ( JNIEnv * env , jclass , jlong dest , jlong source , jint colorEqualization )
{
int rv = imaqColorEqualize ( ( Image * ) dest , ( const Image * ) source , ( int ) colorEqualization ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ColorHistogramReport imaqColorHistogram2(Image image, int numClasses, ColorMode mode, CIEXYZValue whiteReference, Image mask)
* JN : long imaqColorHistogram2 ( long image , int numClasses , int mode , long whiteReference , long mask )
* C : ColorHistogramReport * imaqColorHistogram2 ( Image * image , int numClasses , ColorMode mode , const CIEXYZValue * whiteReference , Image * mask )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqColorHistogram2 ( JNIEnv * env , jclass , jlong image , jint numClasses , jint mode , jlong whiteReference , jlong mask )
{
ColorHistogramReport * rv = imaqColorHistogram2 ( ( Image * ) image , ( int ) numClasses , ( ColorMode ) mode , ( const CIEXYZValue * ) whiteReference , ( Image * ) mask ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqColorThreshold(Image dest, Image source, int replaceValue, ColorMode mode, Range plane1Range, Range plane2Range, Range plane3Range)
* JN : void imaqColorThreshold ( long dest , long source , int replaceValue , int mode , long plane1Range , long plane2Range , long plane3Range )
* C : int imaqColorThreshold ( Image * dest , const Image * source , int replaceValue , ColorMode mode , const Range * plane1Range , const Range * plane2Range , const Range * plane3Range )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqColorThreshold ( JNIEnv * env , jclass , jlong dest , jlong source , jint replaceValue , jint mode , jlong plane1Range , jlong plane2Range , jlong plane3Range )
{
int rv = imaqColorThreshold ( ( Image * ) dest , ( const Image * ) source , ( int ) replaceValue , ( ColorMode ) mode , ( const Range * ) plane1Range , ( const Range * ) plane2Range , ( const Range * ) plane3Range ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: SupervisedColorSegmentationReport imaqSupervisedColorSegmentation(ClassifierSession session, Image labelImage, Image srcImage, ROI roi, ROILabel labelIn, int numLabelIn, int maxDistance, int minIdentificationScore, ColorSegmenationOptions segmentOptions)
* JN : long imaqSupervisedColorSegmentation ( long session , long labelImage , long srcImage , long roi , long labelIn , int numLabelIn , int maxDistance , int minIdentificationScore , long segmentOptions )
* C : SupervisedColorSegmentationReport * imaqSupervisedColorSegmentation ( ClassifierSession * session , Image * labelImage , const Image * srcImage , const ROI * roi , const ROILabel * labelIn , unsigned int numLabelIn , int maxDistance , int minIdentificationScore , const ColorSegmenationOptions * segmentOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSupervisedColorSegmentation ( JNIEnv * env , jclass , jlong session , jlong labelImage , jlong srcImage , jlong roi , jlong labelIn , jint numLabelIn , jint maxDistance , jint minIdentificationScore , jlong segmentOptions )
{
SupervisedColorSegmentationReport * rv = imaqSupervisedColorSegmentation ( ( ClassifierSession * ) session , ( Image * ) labelImage , ( const Image * ) srcImage , ( const ROI * ) roi , ( const ROILabel * ) labelIn , ( unsigned int ) numLabelIn , ( int ) maxDistance , ( int ) minIdentificationScore , ( const ColorSegmenationOptions * ) segmentOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetColorSegmentationMaxDistance(ClassifierSession session, ColorSegmenationOptions segmentOptions, SegmentationDistanceLevel distLevel)
* JN : void imaqGetColorSegmentationMaxDistance ( long session , long segmentOptions , int distLevel , long maxDistance )
2014-12-09 00:48:57 -08:00
* C : int imaqGetColorSegmentationMaxDistance ( ClassifierSession * session , const ColorSegmenationOptions * segmentOptions , SegmentationDistanceLevel distLevel , int * maxDistance )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetColorSegmentationMaxDistance ( JNIEnv * env , jclass , jlong session , jlong segmentOptions , jint distLevel , jlong maxDistance )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetColorSegmentationMaxDistance ( ( ClassifierSession * ) session , ( const ColorSegmenationOptions * ) segmentOptions , ( SegmentationDistanceLevel ) distLevel , ( int * ) maxDistance ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Transform functions
*/
/* J: void imaqBCGTransform(Image dest, Image source, BCGOptions options, Image mask)
* JN : void imaqBCGTransform ( long dest , long source , long options , long mask )
* C : int imaqBCGTransform ( Image * dest , const Image * source , const BCGOptions * options , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqBCGTransform ( JNIEnv * env , jclass , jlong dest , jlong source , jlong options , jlong mask )
{
int rv = imaqBCGTransform ( ( Image * ) dest , ( const Image * ) source , ( const BCGOptions * ) options , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqEqualize(Image dest, Image source, float min, float max, Image mask)
* JN : void imaqEqualize ( long dest , long source , float min , float max , long mask )
* C : int imaqEqualize ( Image * dest , const Image * source , float min , float max , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqEqualize ( JNIEnv * env , jclass , jlong dest , jlong source , jfloat min , jfloat max , jlong mask )
{
int rv = imaqEqualize ( ( Image * ) dest , ( const Image * ) source , ( float ) min , ( float ) max , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqInverse(Image dest, Image source, Image mask)
* JN : void imaqInverse ( long dest , long source , long mask )
* C : int imaqInverse ( Image * dest , const Image * source , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqInverse ( JNIEnv * env , jclass , jlong dest , jlong source , jlong mask )
{
int rv = imaqInverse ( ( Image * ) dest , ( const Image * ) source , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMathTransform(Image dest, Image source, MathTransformMethod method, float rangeMin, float rangeMax, float power, Image mask)
* JN : void imaqMathTransform ( long dest , long source , int method , float rangeMin , float rangeMax , float power , long mask )
* C : int imaqMathTransform ( Image * dest , const Image * source , MathTransformMethod method , float rangeMin , float rangeMax , float power , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMathTransform ( JNIEnv * env , jclass , jlong dest , jlong source , jint method , jfloat rangeMin , jfloat rangeMax , jfloat power , jlong mask )
{
int rv = imaqMathTransform ( ( Image * ) dest , ( const Image * ) source , ( MathTransformMethod ) method , ( float ) rangeMin , ( float ) rangeMax , ( float ) power , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqWatershedTransform(Image dest, Image source, int connectivity8)
* JN : void imaqWatershedTransform ( long dest , long source , int connectivity8 , long zoneCount )
2014-12-09 00:48:57 -08:00
* C : int imaqWatershedTransform ( Image * dest , const Image * source , int connectivity8 , int * zoneCount )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWatershedTransform ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 , jlong zoneCount )
2014-12-09 00:48:57 -08:00
{
int rv = imaqWatershedTransform ( ( Image * ) dest , ( const Image * ) source , ( int ) connectivity8 , ( int * ) zoneCount ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Window Management functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqAreScrollbarsVisible(int windowNumber)
* JN : void imaqAreScrollbarsVisible ( int windowNumber , long visible )
2014-12-09 00:48:57 -08:00
* C : int imaqAreScrollbarsVisible ( int windowNumber , int * visible )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAreScrollbarsVisible ( JNIEnv * env , jclass , jint windowNumber , jlong visible )
2014-12-09 00:48:57 -08:00
{
int rv = imaqAreScrollbarsVisible ( ( int ) windowNumber , ( int * ) visible ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqBringWindowToTop(int windowNumber)
* JN : void imaqBringWindowToTop ( int windowNumber )
* C : int imaqBringWindowToTop ( int windowNumber )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqBringWindowToTop ( JNIEnv * env , jclass , jint windowNumber )
{
int rv = imaqBringWindowToTop ( ( int ) windowNumber ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetMousePos()
* JN : void imaqGetMousePos ( long position , long windowNumber )
* C : int imaqGetMousePos ( Point * position , int * windowNumber )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetMousePos ( JNIEnv * env , jclass , jlong position , jlong windowNumber )
{
int rv = imaqGetMousePos ( ( Point * ) position , ( int * ) windowNumber ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetWindowBackground(int windowNumber)
* JN : void imaqGetWindowBackground ( int windowNumber , long fillStyle , long hatchStyle , long fillColor , long backgroundColor )
* C : int imaqGetWindowBackground ( int windowNumber , WindowBackgroundFillStyle * fillStyle , WindowBackgroundHatchStyle * hatchStyle , RGBValue * fillColor , RGBValue * backgroundColor )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowBackground ( JNIEnv * env , jclass , jint windowNumber , jlong fillStyle , jlong hatchStyle , jlong fillColor , jlong backgroundColor )
{
int rv = imaqGetWindowBackground ( ( int ) windowNumber , ( WindowBackgroundFillStyle * ) fillStyle , ( WindowBackgroundHatchStyle * ) hatchStyle , ( RGBValue * ) fillColor , ( RGBValue * ) backgroundColor ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetWindowDisplayMapping(int windowNum)
* JN : void imaqGetWindowDisplayMapping ( int windowNum , long mapping )
2014-12-09 00:48:57 -08:00
* C : int imaqGetWindowDisplayMapping ( int windowNum , DisplayMapping * mapping )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowDisplayMapping ( JNIEnv * env , jclass , jint windowNum , jlong mapping )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetWindowDisplayMapping ( ( int ) windowNum , ( DisplayMapping * ) mapping ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetWindowGrid(int windowNumber)
* JN : void imaqGetWindowGrid ( int windowNumber , long xResolution , long yResolution )
* C : int imaqGetWindowGrid ( int windowNumber , int * xResolution , int * yResolution )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowGrid ( JNIEnv * env , jclass , jint windowNumber , jlong xResolution , jlong yResolution )
{
int rv = imaqGetWindowGrid ( ( int ) windowNumber , ( int * ) xResolution , ( int * ) yResolution ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetWindowHandle()
* JN : void imaqGetWindowHandle ( long handle )
2014-12-09 00:48:57 -08:00
* C : int imaqGetWindowHandle ( int * handle )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowHandle ( JNIEnv * env , jclass , jlong handle )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetWindowHandle ( ( int * ) handle ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetWindowPos(int windowNumber)
* JN : void imaqGetWindowPos ( int windowNumber , long position )
2014-12-09 00:48:57 -08:00
* C : int imaqGetWindowPos ( int windowNumber , Point * position )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowPos ( JNIEnv * env , jclass , jint windowNumber , jlong position )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetWindowPos ( ( int ) windowNumber , ( Point * ) position ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetWindowSize(int windowNumber)
* JN : void imaqGetWindowSize ( int windowNumber , long width , long height )
* C : int imaqGetWindowSize ( int windowNumber , int * width , int * height )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowSize ( JNIEnv * env , jclass , jint windowNumber , jlong width , jlong height )
{
int rv = imaqGetWindowSize ( ( int ) windowNumber , ( int * ) width , ( int * ) height ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: String imaqGetWindowTitle(int windowNumber)
* JN : String imaqGetWindowTitle ( int windowNumber )
* C : char * imaqGetWindowTitle ( int windowNumber )
*/
JNIEXPORT jstring JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowTitle ( JNIEnv * env , jclass , jint windowNumber )
{
char * rv = imaqGetWindowTitle ( ( int ) windowNumber ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jstring ) rv ;
}
/* J: void imaqGetWindowZoom2(int windowNumber)
* JN : void imaqGetWindowZoom2 ( int windowNumber , long xZoom , long yZoom )
* C : int imaqGetWindowZoom2 ( int windowNumber , float * xZoom , float * yZoom )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowZoom2 ( JNIEnv * env , jclass , jint windowNumber , jlong xZoom , jlong yZoom )
{
int rv = imaqGetWindowZoom2 ( ( int ) windowNumber , ( float * ) xZoom , ( float * ) yZoom ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqIsWindowNonTearing(int windowNumber)
* JN : void imaqIsWindowNonTearing ( int windowNumber , long nonTearing )
2014-12-09 00:48:57 -08:00
* C : int imaqIsWindowNonTearing ( int windowNumber , int * nonTearing )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsWindowNonTearing ( JNIEnv * env , jclass , jint windowNumber , jlong nonTearing )
2014-12-09 00:48:57 -08:00
{
int rv = imaqIsWindowNonTearing ( ( int ) windowNumber , ( int * ) nonTearing ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqIsWindowVisible(int windowNumber)
* JN : void imaqIsWindowVisible ( int windowNumber , long visible )
2014-12-09 00:48:57 -08:00
* C : int imaqIsWindowVisible ( int windowNumber , int * visible )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsWindowVisible ( JNIEnv * env , jclass , jint windowNumber , jlong visible )
2014-12-09 00:48:57 -08:00
{
int rv = imaqIsWindowVisible ( ( int ) windowNumber , ( int * ) visible ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMoveWindow(int windowNumber, Point position)
* JN : void imaqMoveWindow ( int windowNumber , long position )
* C : int imaqMoveWindow ( int windowNumber , Point position )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMoveWindow ( JNIEnv * env , jclass , jint windowNumber , jlong position )
{
int rv = imaqMoveWindow ( ( int ) windowNumber , * ( ( Point * ) position ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetupWindow(int windowNumber, int configuration)
* JN : void imaqSetupWindow ( int windowNumber , int configuration )
* C : int imaqSetupWindow ( int windowNumber , int configuration )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetupWindow ( JNIEnv * env , jclass , jint windowNumber , jint configuration )
{
int rv = imaqSetupWindow ( ( int ) windowNumber , ( int ) configuration ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowBackground(int windowNumber, WindowBackgroundFillStyle fillStyle, WindowBackgroundHatchStyle hatchStyle, RGBValue fillColor, RGBValue backgroundColor)
* JN : void imaqSetWindowBackground ( int windowNumber , int fillStyle , int hatchStyle , long fillColor , long backgroundColor )
* C : int imaqSetWindowBackground ( int windowNumber , WindowBackgroundFillStyle fillStyle , WindowBackgroundHatchStyle hatchStyle , const RGBValue * fillColor , const RGBValue * backgroundColor )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowBackground ( JNIEnv * env , jclass , jint windowNumber , jint fillStyle , jint hatchStyle , jlong fillColor , jlong backgroundColor )
{
int rv = imaqSetWindowBackground ( ( int ) windowNumber , ( WindowBackgroundFillStyle ) fillStyle , ( WindowBackgroundHatchStyle ) hatchStyle , ( const RGBValue * ) fillColor , ( const RGBValue * ) backgroundColor ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowDisplayMapping(int windowNumber, DisplayMapping mapping)
* JN : void imaqSetWindowDisplayMapping ( int windowNumber , long mapping )
* C : int imaqSetWindowDisplayMapping ( int windowNumber , const DisplayMapping * mapping )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowDisplayMapping ( JNIEnv * env , jclass , jint windowNumber , jlong mapping )
{
int rv = imaqSetWindowDisplayMapping ( ( int ) windowNumber , ( const DisplayMapping * ) mapping ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowGrid(int windowNumber, int xResolution, int yResolution)
* JN : void imaqSetWindowGrid ( int windowNumber , int xResolution , int yResolution )
* C : int imaqSetWindowGrid ( int windowNumber , int xResolution , int yResolution )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowGrid ( JNIEnv * env , jclass , jint windowNumber , jint xResolution , jint yResolution )
{
int rv = imaqSetWindowGrid ( ( int ) windowNumber , ( int ) xResolution , ( int ) yResolution ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowMaxContourCount(int windowNumber, int maxContourCount)
* JN : void imaqSetWindowMaxContourCount ( int windowNumber , int maxContourCount )
* C : int imaqSetWindowMaxContourCount ( int windowNumber , unsigned int maxContourCount )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowMaxContourCount ( JNIEnv * env , jclass , jint windowNumber , jint maxContourCount )
{
int rv = imaqSetWindowMaxContourCount ( ( int ) windowNumber , ( unsigned int ) maxContourCount ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowNonTearing(int windowNumber, int nonTearing)
* JN : void imaqSetWindowNonTearing ( int windowNumber , int nonTearing )
* C : int imaqSetWindowNonTearing ( int windowNumber , int nonTearing )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowNonTearing ( JNIEnv * env , jclass , jint windowNumber , jint nonTearing )
{
int rv = imaqSetWindowNonTearing ( ( int ) windowNumber , ( int ) nonTearing ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowPalette(int windowNumber, PaletteType type, RGBValue[] palette)
* JN : void imaqSetWindowPalette ( int windowNumber , int type , long palette , int numColors )
* C : int imaqSetWindowPalette ( int windowNumber , PaletteType type , const RGBValue * palette , int numColors )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowPalette ( JNIEnv * env , jclass , jint windowNumber , jint type , jlong palette , jint numColors )
{
int rv = imaqSetWindowPalette ( ( int ) windowNumber , ( PaletteType ) type , ( const RGBValue * ) palette , ( int ) numColors ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowSize(int windowNumber, int width, int height)
* JN : void imaqSetWindowSize ( int windowNumber , int width , int height )
* C : int imaqSetWindowSize ( int windowNumber , int width , int height )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowSize ( JNIEnv * env , jclass , jint windowNumber , jint width , jint height )
{
int rv = imaqSetWindowSize ( ( int ) windowNumber , ( int ) width , ( int ) height ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowThreadPolicy(WindowThreadPolicy policy)
* JN : void imaqSetWindowThreadPolicy ( int policy )
* C : int imaqSetWindowThreadPolicy ( WindowThreadPolicy policy )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowThreadPolicy ( JNIEnv * env , jclass , jint policy )
{
int rv = imaqSetWindowThreadPolicy ( ( WindowThreadPolicy ) policy ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowTitle(int windowNumber, String title)
* JN : void imaqSetWindowTitle ( int windowNumber , long title )
* C : int imaqSetWindowTitle ( int windowNumber , const char * title )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowTitle ( JNIEnv * env , jclass , jint windowNumber , jlong title )
{
int rv = imaqSetWindowTitle ( ( int ) windowNumber , ( const char * ) title ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowZoomToFit(int windowNumber, int zoomToFit)
* JN : void imaqSetWindowZoomToFit ( int windowNumber , int zoomToFit )
* C : int imaqSetWindowZoomToFit ( int windowNumber , int zoomToFit )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowZoomToFit ( JNIEnv * env , jclass , jint windowNumber , jint zoomToFit )
{
int rv = imaqSetWindowZoomToFit ( ( int ) windowNumber , ( int ) zoomToFit ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqShowScrollbars(int windowNumber, int visible)
* JN : void imaqShowScrollbars ( int windowNumber , int visible )
* C : int imaqShowScrollbars ( int windowNumber , int visible )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqShowScrollbars ( JNIEnv * env , jclass , jint windowNumber , jint visible )
{
int rv = imaqShowScrollbars ( ( int ) windowNumber , ( int ) visible ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqZoomWindow2(int windowNumber, float xZoom, float yZoom, Point center)
* JN : void imaqZoomWindow2 ( int windowNumber , float xZoom , float yZoom , long center )
* C : int imaqZoomWindow2 ( int windowNumber , float xZoom , float yZoom , Point center )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqZoomWindow2 ( JNIEnv * env , jclass , jint windowNumber , jfloat xZoom , jfloat yZoom , jlong center )
{
int rv = imaqZoomWindow2 ( ( int ) windowNumber , ( float ) xZoom , ( float ) yZoom , * ( ( Point * ) center ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Utilities functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqMulticoreOptions(MulticoreOperation operation)
* JN : void imaqMulticoreOptions ( int operation , long customNumCores )
2014-12-09 00:48:57 -08:00
* C : int imaqMulticoreOptions ( MulticoreOperation operation , unsigned int * customNumCores )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMulticoreOptions ( JNIEnv * env , jclass , jint operation , jlong customNumCores )
2014-12-09 00:48:57 -08:00
{
int rv = imaqMulticoreOptions ( ( MulticoreOperation ) operation , ( unsigned int * ) customNumCores ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Tool Window functions
*/
/* J: void imaqCloseToolWindow()
* JN : void imaqCloseToolWindow ( )
* C : int imaqCloseToolWindow ( void )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCloseToolWindow ( JNIEnv * env , jclass )
{
int rv = imaqCloseToolWindow ( ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetCurrentTool()
* JN : void imaqGetCurrentTool ( long currentTool )
2014-12-09 00:48:57 -08:00
* C : int imaqGetCurrentTool ( Tool * currentTool )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetCurrentTool ( JNIEnv * env , jclass , jlong currentTool )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetCurrentTool ( ( Tool * ) currentTool ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetLastEvent()
* JN : void imaqGetLastEvent ( long type , long windowNumber , long tool , long rect )
* C : int imaqGetLastEvent ( WindowEventType * type , int * windowNumber , Tool * tool , Rect * rect )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetLastEvent ( JNIEnv * env , jclass , jlong type , jlong windowNumber , jlong tool , jlong rect )
{
int rv = imaqGetLastEvent ( ( WindowEventType * ) type , ( int * ) windowNumber , ( Tool * ) tool , ( Rect * ) rect ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetToolWindowPos()
* JN : void imaqGetToolWindowPos ( long position )
2014-12-09 00:48:57 -08:00
* C : int imaqGetToolWindowPos ( Point * position )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetToolWindowPos ( JNIEnv * env , jclass , jlong position )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetToolWindowPos ( ( Point * ) position ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqIsToolWindowVisible()
* JN : void imaqIsToolWindowVisible ( long visible )
2014-12-09 00:48:57 -08:00
* C : int imaqIsToolWindowVisible ( int * visible )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsToolWindowVisible ( JNIEnv * env , jclass , jlong visible )
2014-12-09 00:48:57 -08:00
{
int rv = imaqIsToolWindowVisible ( ( int * ) visible ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMoveToolWindow(Point position)
* JN : void imaqMoveToolWindow ( long position )
* C : int imaqMoveToolWindow ( Point position )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMoveToolWindow ( JNIEnv * env , jclass , jlong position )
{
int rv = imaqMoveToolWindow ( * ( ( Point * ) position ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetCurrentTool(Tool currentTool)
* JN : void imaqSetCurrentTool ( int currentTool )
* C : int imaqSetCurrentTool ( Tool currentTool )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetCurrentTool ( JNIEnv * env , jclass , jint currentTool )
{
int rv = imaqSetCurrentTool ( ( Tool ) currentTool ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetToolColor(RGBValue color)
* JN : void imaqSetToolColor ( long color )
* C : int imaqSetToolColor ( const RGBValue * color )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetToolColor ( JNIEnv * env , jclass , jlong color )
{
int rv = imaqSetToolColor ( ( const RGBValue * ) color ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetupToolWindow(int showCoordinates, int maxIconsPerLine, ToolWindowOptions options)
* JN : void imaqSetupToolWindow ( int showCoordinates , int maxIconsPerLine , long options )
* C : int imaqSetupToolWindow ( int showCoordinates , int maxIconsPerLine , const ToolWindowOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetupToolWindow ( JNIEnv * env , jclass , jint showCoordinates , jint maxIconsPerLine , jlong options )
{
int rv = imaqSetupToolWindow ( ( int ) showCoordinates , ( int ) maxIconsPerLine , ( const ToolWindowOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqShowToolWindow(int visible)
* JN : void imaqShowToolWindow ( int visible )
* C : int imaqShowToolWindow ( int visible )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqShowToolWindow ( JNIEnv * env , jclass , jint visible )
{
int rv = imaqShowToolWindow ( ( int ) visible ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Meter functions
*/
/* J: MeterArc imaqGetMeterArc(int lightNeedle, MeterArcMode mode, ROI roi, PointFloat base, PointFloat start, PointFloat end)
* JN : long imaqGetMeterArc ( int lightNeedle , int mode , long roi , long base , long start , long end )
* C : MeterArc * imaqGetMeterArc ( int lightNeedle , MeterArcMode mode , const ROI * roi , PointFloat base , PointFloat start , PointFloat end )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetMeterArc ( JNIEnv * env , jclass , jint lightNeedle , jint mode , jlong roi , jlong base , jlong start , jlong end )
{
MeterArc * rv = imaqGetMeterArc ( ( int ) lightNeedle , ( MeterArcMode ) mode , ( const ROI * ) roi , * ( ( PointFloat * ) base ) , * ( ( PointFloat * ) start ) , * ( ( PointFloat * ) end ) ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqReadMeter(Image image, MeterArc arcInfo)
* JN : void imaqReadMeter ( long image , long arcInfo , long percentage , long endOfNeedle )
* C : int imaqReadMeter ( const Image * image , const MeterArc * arcInfo , double * percentage , PointFloat * endOfNeedle )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReadMeter ( JNIEnv * env , jclass , jlong image , jlong arcInfo , jlong percentage , jlong endOfNeedle )
{
int rv = imaqReadMeter ( ( const Image * ) image , ( const MeterArc * ) arcInfo , ( double * ) percentage , ( PointFloat * ) endOfNeedle ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Calibration functions
*/
/* J: void imaqCopyCalibrationInfo2(Image dest, Image source, Point offset)
* JN : void imaqCopyCalibrationInfo2 ( long dest , long source , long offset )
* C : int imaqCopyCalibrationInfo2 ( Image * dest , Image * source , Point offset )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCopyCalibrationInfo2 ( JNIEnv * env , jclass , jlong dest , jlong source , jlong offset )
{
int rv = imaqCopyCalibrationInfo2 ( ( Image * ) dest , ( Image * ) source , * ( ( Point * ) offset ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: CalibrationInfo imaqGetCalibrationInfo2(Image image)
* JN : long imaqGetCalibrationInfo2 ( long image )
* C : CalibrationInfo * imaqGetCalibrationInfo2 ( const Image * image )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetCalibrationInfo2 ( JNIEnv * env , jclass , jlong image )
{
CalibrationInfo * rv = imaqGetCalibrationInfo2 ( ( const Image * ) image ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: CalibrationInfo imaqGetCalibrationInfo3(Image image, int isGetErrorMap)
* JN : long imaqGetCalibrationInfo3 ( long image , int isGetErrorMap )
* C : CalibrationInfo * imaqGetCalibrationInfo3 ( Image * image , unsigned int isGetErrorMap )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetCalibrationInfo3 ( JNIEnv * env , jclass , jlong image , jint isGetErrorMap )
{
CalibrationInfo * rv = imaqGetCalibrationInfo3 ( ( Image * ) image , ( unsigned int ) isGetErrorMap ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqLearnCalibrationGrid ( Image * image , const ROI * roi , const LearnCalibrationOptions * options , const GridDescriptor * grid , const CoordinateSystem * system , const RangeFloat * range , float * quality )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
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 ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqLearnCalibrationPoints ( Image * image , const CalibrationPoints * points , const ROI * roi , const LearnCalibrationOptions * options , const GridDescriptor * grid , const CoordinateSystem * system , float * quality )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
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 ) ;
}
/* J: void imaqSetCoordinateSystem(Image image, CoordinateSystem system)
* JN : void imaqSetCoordinateSystem ( long image , long system )
* C : int imaqSetCoordinateSystem ( Image * image , const CoordinateSystem * system )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetCoordinateSystem ( JNIEnv * env , jclass , jlong image , jlong system )
{
int rv = imaqSetCoordinateSystem ( ( Image * ) image , ( const CoordinateSystem * ) system ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetSimpleCalibration(Image image, ScalingMethod method, int learnTable, GridDescriptor grid, CoordinateSystem system)
* JN : void imaqSetSimpleCalibration ( long image , int method , int learnTable , long grid , long system )
* C : int imaqSetSimpleCalibration ( Image * image , ScalingMethod method , int learnTable , const GridDescriptor * grid , const CoordinateSystem * system )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetSimpleCalibration ( JNIEnv * env , jclass , jlong image , jint method , jint learnTable , jlong grid , jlong system )
{
int rv = imaqSetSimpleCalibration ( ( Image * ) image , ( ScalingMethod ) method , ( int ) learnTable , ( const GridDescriptor * ) grid , ( const CoordinateSystem * ) system ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: TransformReport imaqTransformPixelToRealWorld(Image image, PointFloat[] pixelCoordinates)
* JN : long imaqTransformPixelToRealWorld ( long image , long pixelCoordinates , int numCoordinates )
* C : TransformReport * imaqTransformPixelToRealWorld ( const Image * image , const PointFloat * pixelCoordinates , int numCoordinates )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqTransformPixelToRealWorld ( JNIEnv * env , jclass , jlong image , jlong pixelCoordinates , jint numCoordinates )
{
TransformReport * rv = imaqTransformPixelToRealWorld ( ( const Image * ) image , ( const PointFloat * ) pixelCoordinates , ( int ) numCoordinates ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: TransformReport imaqTransformRealWorldToPixel(Image image, PointFloat[] realWorldCoordinates)
* JN : long imaqTransformRealWorldToPixel ( long image , long realWorldCoordinates , int numCoordinates )
* C : TransformReport * imaqTransformRealWorldToPixel ( const Image * image , const PointFloat * realWorldCoordinates , int numCoordinates )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqTransformRealWorldToPixel ( JNIEnv * env , jclass , jlong image , jlong realWorldCoordinates , jint numCoordinates )
{
TransformReport * rv = imaqTransformRealWorldToPixel ( ( const Image * ) image , ( const PointFloat * ) realWorldCoordinates , ( int ) numCoordinates ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqSetSimpleCalibration2(Image image, GridDescriptor gridDescriptor)
* JN : void imaqSetSimpleCalibration2 ( long image , long gridDescriptor )
* C : int imaqSetSimpleCalibration2 ( Image * image , const GridDescriptor * gridDescriptor )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetSimpleCalibration2 ( JNIEnv * env , jclass , jlong image , jlong gridDescriptor )
{
int rv = imaqSetSimpleCalibration2 ( ( Image * ) image , ( const GridDescriptor * ) gridDescriptor ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqCalibrationSetAxisInfo(Image image)
* JN : void imaqCalibrationSetAxisInfo ( long image , long axisInfo )
2014-12-09 00:48:57 -08:00
* C : int imaqCalibrationSetAxisInfo ( Image * image , CoordinateSystem * axisInfo )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationSetAxisInfo ( JNIEnv * env , jclass , jlong image , jlong axisInfo )
2014-12-09 00:48:57 -08:00
{
int rv = imaqCalibrationSetAxisInfo ( ( Image * ) image , ( CoordinateSystem * ) axisInfo ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCalibrationGetThumbnailImage(Image templateImage, Image image, CalibrationThumbnailType type, int index)
* JN : void imaqCalibrationGetThumbnailImage ( long templateImage , long image , int type , int index )
* C : int imaqCalibrationGetThumbnailImage ( Image * templateImage , Image * image , CalibrationThumbnailType type , unsigned int index )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationGetThumbnailImage ( JNIEnv * env , jclass , jlong templateImage , jlong image , jint type , jint index )
{
int rv = imaqCalibrationGetThumbnailImage ( ( Image * ) templateImage , ( Image * ) image , ( CalibrationThumbnailType ) type , ( unsigned int ) index ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: GetCalibrationInfoReport imaqCalibrationGetCalibrationInfo(Image image, int isGetErrorMap)
* JN : long imaqCalibrationGetCalibrationInfo ( long image , int isGetErrorMap )
* C : GetCalibrationInfoReport * imaqCalibrationGetCalibrationInfo ( Image * image , unsigned int isGetErrorMap )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationGetCalibrationInfo ( JNIEnv * env , jclass , jlong image , jint isGetErrorMap )
{
GetCalibrationInfoReport * rv = imaqCalibrationGetCalibrationInfo ( ( Image * ) image , ( unsigned int ) isGetErrorMap ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: GetCameraParametersReport imaqCalibrationGetCameraParameters(Image templateImage)
* JN : long imaqCalibrationGetCameraParameters ( long templateImage )
* C : GetCameraParametersReport * imaqCalibrationGetCameraParameters ( Image * templateImage )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationGetCameraParameters ( JNIEnv * env , jclass , jlong templateImage )
{
GetCameraParametersReport * rv = imaqCalibrationGetCameraParameters ( ( Image * ) templateImage ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqCalibrationCompactInformation(Image image)
* JN : void imaqCalibrationCompactInformation ( long image )
* C : int imaqCalibrationCompactInformation ( Image * image )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCalibrationCompactInformation ( JNIEnv * env , jclass , jlong image )
{
int rv = imaqCalibrationCompactInformation ( ( Image * ) image ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Pixel Manipulation functions
*/
/* J: void imaqExtractColorPlanes(Image image, ColorMode mode, Image plane1, Image plane2, Image plane3)
* JN : void imaqExtractColorPlanes ( long image , int mode , long plane1 , long plane2 , long plane3 )
* C : int imaqExtractColorPlanes ( const Image * image , ColorMode mode , Image * plane1 , Image * plane2 , Image * plane3 )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqExtractColorPlanes ( JNIEnv * env , jclass , jlong image , jint mode , jlong plane1 , jlong plane2 , jlong plane3 )
{
int rv = imaqExtractColorPlanes ( ( const Image * ) image , ( ColorMode ) mode , ( Image * ) plane1 , ( Image * ) plane2 , ( Image * ) plane3 ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqExtractComplexPlane(Image dest, Image source, ComplexPlane plane)
* JN : void imaqExtractComplexPlane ( long dest , long source , int plane )
* C : int imaqExtractComplexPlane ( Image * dest , const Image * source , ComplexPlane plane )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqExtractComplexPlane ( JNIEnv * env , jclass , jlong dest , jlong source , jint plane )
{
int rv = imaqExtractComplexPlane ( ( Image * ) dest , ( const Image * ) source , ( ComplexPlane ) plane ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqReplaceColorPlanes(Image dest, Image source, ColorMode mode, Image plane1, Image plane2, Image plane3)
* JN : void imaqReplaceColorPlanes ( long dest , long source , int mode , long plane1 , long plane2 , long plane3 )
* C : int imaqReplaceColorPlanes ( Image * dest , const Image * source , ColorMode mode , const Image * plane1 , const Image * plane2 , const Image * plane3 )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReplaceColorPlanes ( JNIEnv * env , jclass , jlong dest , jlong source , jint mode , jlong plane1 , jlong plane2 , jlong plane3 )
{
int rv = imaqReplaceColorPlanes ( ( Image * ) dest , ( const Image * ) source , ( ColorMode ) mode , ( const Image * ) plane1 , ( const Image * ) plane2 , ( const Image * ) plane3 ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqReplaceComplexPlane(Image dest, Image source, Image newValues, ComplexPlane plane)
* JN : void imaqReplaceComplexPlane ( long dest , long source , long newValues , int plane )
* C : int imaqReplaceComplexPlane ( Image * dest , const Image * source , const Image * newValues , ComplexPlane plane )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReplaceComplexPlane ( JNIEnv * env , jclass , jlong dest , jlong source , jlong newValues , jint plane )
{
int rv = imaqReplaceComplexPlane ( ( Image * ) dest , ( const Image * ) source , ( const Image * ) newValues , ( ComplexPlane ) plane ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Color Matching functions
*/
/* J: ColorInformation imaqLearnColor(Image image, ROI roi, ColorSensitivity sensitivity, int saturation)
* JN : long imaqLearnColor ( long image , long roi , int sensitivity , int saturation )
* C : ColorInformation * imaqLearnColor ( const Image * image , const ROI * roi , ColorSensitivity sensitivity , int saturation )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLearnColor ( JNIEnv * env , jclass , jlong image , jlong roi , jint sensitivity , jint saturation )
{
ColorInformation * rv = imaqLearnColor ( ( const Image * ) image , ( const ROI * ) roi , ( ColorSensitivity ) sensitivity , ( int ) saturation ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-11 22:19:08 -08:00
/* J: MatchColorResult imaqMatchColor(Image image, ColorInformation info, ROI roi)
* JN : long imaqMatchColor ( long image , long info , long roi , long numScores )
* C : int * imaqMatchColor ( const Image * image , const ColorInformation * info , const ROI * roi , int * numScores )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchColor ( JNIEnv * env , jclass , jlong image , jlong info , jlong roi , jlong numScores )
{
int * rv = imaqMatchColor ( ( const Image * ) image , ( const ColorInformation * ) info , ( const ROI * ) roi , ( int * ) numScores ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/*
* Frequency Domain Analysis functions
*/
/* J: void imaqAttenuate(Image dest, Image source, AttenuateMode highlow)
* JN : void imaqAttenuate ( long dest , long source , int highlow )
* C : int imaqAttenuate ( Image * dest , const Image * source , AttenuateMode highlow )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAttenuate ( JNIEnv * env , jclass , jlong dest , jlong source , jint highlow )
{
int rv = imaqAttenuate ( ( Image * ) dest , ( const Image * ) source , ( AttenuateMode ) highlow ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqConjugate(Image dest, Image source)
* JN : void imaqConjugate ( long dest , long source )
* C : int imaqConjugate ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConjugate ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqConjugate ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqFFT(Image dest, Image source)
* JN : void imaqFFT ( long dest , long source )
* C : int imaqFFT ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFFT ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqFFT ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqFlipFrequencies(Image dest, Image source)
* JN : void imaqFlipFrequencies ( long dest , long source )
* C : int imaqFlipFrequencies ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFlipFrequencies ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqFlipFrequencies ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqInverseFFT(Image dest, Image source)
* JN : void imaqInverseFFT ( long dest , long source )
* C : int imaqInverseFFT ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqInverseFFT ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqInverseFFT ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqTruncate(Image dest, Image source, TruncateMode highlow, float ratioToKeep)
* JN : void imaqTruncate ( long dest , long source , int highlow , float ratioToKeep )
* C : int imaqTruncate ( Image * dest , const Image * source , TruncateMode highlow , float ratioToKeep )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqTruncate ( JNIEnv * env , jclass , jlong dest , jlong source , jint highlow , jfloat ratioToKeep )
{
int rv = imaqTruncate ( ( Image * ) dest , ( const Image * ) source , ( TruncateMode ) highlow , ( float ) ratioToKeep ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Barcode I / O functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqGradeDataMatrixBarcodeAIM(Image image)
* JN : void imaqGradeDataMatrixBarcodeAIM ( long image , long report )
2014-12-09 00:48:57 -08:00
* C : int imaqGradeDataMatrixBarcodeAIM ( const Image * image , AIMGradeReport * report )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGradeDataMatrixBarcodeAIM ( JNIEnv * env , jclass , jlong image , jlong report )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGradeDataMatrixBarcodeAIM ( ( const Image * ) image , ( AIMGradeReport * ) report ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: BarcodeInfo imaqReadBarcode(Image image, BarcodeType type, ROI roi, int validate)
* JN : long imaqReadBarcode ( long image , int type , long roi , int validate )
* C : BarcodeInfo * imaqReadBarcode ( const Image * image , BarcodeType type , const ROI * roi , int validate )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadBarcode ( JNIEnv * env , jclass , jlong image , jint type , jlong roi , jint validate )
{
BarcodeInfo * rv = imaqReadBarcode ( ( const Image * ) image , ( BarcodeType ) type , ( const ROI * ) roi , ( int ) validate ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: DataMatrixReport imaqReadDataMatrixBarcode2(Image image, ROI roi, DataMatrixGradingMode prepareForGrading, DataMatrixDescriptionOptions descriptionOptions, DataMatrixSizeOptions sizeOptions, DataMatrixSearchOptions searchOptions)
* JN : long imaqReadDataMatrixBarcode2 ( long image , long roi , int prepareForGrading , long descriptionOptions , long sizeOptions , long searchOptions )
* C : DataMatrixReport * imaqReadDataMatrixBarcode2 ( Image * image , const ROI * roi , DataMatrixGradingMode prepareForGrading , const DataMatrixDescriptionOptions * descriptionOptions , const DataMatrixSizeOptions * sizeOptions , const DataMatrixSearchOptions * searchOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadDataMatrixBarcode2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint prepareForGrading , jlong descriptionOptions , jlong sizeOptions , jlong searchOptions )
{
DataMatrixReport * rv = imaqReadDataMatrixBarcode2 ( ( Image * ) image , ( const ROI * ) roi , ( DataMatrixGradingMode ) prepareForGrading , ( const DataMatrixDescriptionOptions * ) descriptionOptions , ( const DataMatrixSizeOptions * ) sizeOptions , ( const DataMatrixSearchOptions * ) searchOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ReadPDF417BarcodeResult imaqReadPDF417Barcode(Image image, ROI roi, Barcode2DSearchMode searchMode)
* JN : long imaqReadPDF417Barcode ( long image , long roi , int searchMode , long numBarcodes )
* C : Barcode2DInfo * imaqReadPDF417Barcode ( const Image * image , const ROI * roi , Barcode2DSearchMode searchMode , unsigned int * numBarcodes )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadPDF417Barcode ( JNIEnv * env , jclass , jlong image , jlong roi , jint searchMode , jlong numBarcodes )
{
Barcode2DInfo * rv = imaqReadPDF417Barcode ( ( const Image * ) image , ( const ROI * ) roi , ( Barcode2DSearchMode ) searchMode , ( unsigned int * ) numBarcodes ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: QRCodeReport imaqReadQRCode(Image image, ROI roi, QRGradingMode reserved, QRCodeDescriptionOptions descriptionOptions, QRCodeSizeOptions sizeOptions, QRCodeSearchOptions searchOptions)
* JN : long imaqReadQRCode ( long image , long roi , int reserved , long descriptionOptions , long sizeOptions , long searchOptions )
* C : QRCodeReport * imaqReadQRCode ( Image * image , const ROI * roi , QRGradingMode reserved , const QRCodeDescriptionOptions * descriptionOptions , const QRCodeSizeOptions * sizeOptions , const QRCodeSearchOptions * searchOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadQRCode ( JNIEnv * env , jclass , jlong image , jlong roi , jint reserved , jlong descriptionOptions , jlong sizeOptions , jlong searchOptions )
{
QRCodeReport * rv = imaqReadQRCode ( ( Image * ) image , ( const ROI * ) roi , ( QRGradingMode ) reserved , ( const QRCodeDescriptionOptions * ) descriptionOptions , ( const QRCodeSizeOptions * ) sizeOptions , ( const QRCodeSearchOptions * ) searchOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* LCD functions
*/
/* J: void imaqFindLCDSegments(ROI roi, Image image, LCDOptions options)
* JN : void imaqFindLCDSegments ( long roi , long image , long options )
* C : int imaqFindLCDSegments ( ROI * roi , const Image * image , const LCDOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFindLCDSegments ( JNIEnv * env , jclass , jlong roi , jlong image , jlong options )
{
int rv = imaqFindLCDSegments ( ( ROI * ) roi , ( const Image * ) image , ( const LCDOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: LCDReport imaqReadLCD(Image image, ROI roi, LCDOptions options)
* JN : long imaqReadLCD ( long image , long roi , long options )
* C : LCDReport * imaqReadLCD ( const Image * image , const ROI * roi , const LCDOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadLCD ( JNIEnv * env , jclass , jlong image , jlong roi , jlong options )
{
LCDReport * rv = imaqReadLCD ( ( const Image * ) image , ( const ROI * ) roi , ( const LCDOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Shape Matching functions
*/
/* J: MatchShapeResult imaqMatchShape(Image dest, Image source, Image templateImage, int scaleInvariant, int connectivity8, double tolerance)
* JN : long imaqMatchShape ( long dest , long source , long templateImage , int scaleInvariant , int connectivity8 , double tolerance , long numMatches )
* C : ShapeReport * imaqMatchShape ( Image * dest , Image * source , const Image * templateImage , int scaleInvariant , int connectivity8 , double tolerance , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchShape ( JNIEnv * env , jclass , jlong dest , jlong source , jlong templateImage , jint scaleInvariant , jint connectivity8 , jdouble tolerance , jlong numMatches )
{
ShapeReport * rv = imaqMatchShape ( ( Image * ) dest , ( Image * ) source , ( const Image * ) templateImage , ( int ) scaleInvariant , ( int ) connectivity8 , ( double ) tolerance , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Contours functions
*/
/* J: int imaqAddAnnulusContour(ROI roi, Annulus annulus)
* JN : int imaqAddAnnulusContour ( long roi , long annulus )
* C : ContourID imaqAddAnnulusContour ( ROI * roi , Annulus annulus )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddAnnulusContour ( JNIEnv * env , jclass , jlong roi , jlong annulus )
{
ContourID rv = imaqAddAnnulusContour ( ( ROI * ) roi , * ( ( Annulus * ) annulus ) ) ;
return ( jint ) rv ;
}
/* J: int imaqAddClosedContour(ROI roi, Point[] points)
* JN : int imaqAddClosedContour ( long roi , long points , int numPoints )
* C : ContourID imaqAddClosedContour ( ROI * roi , const Point * points , int numPoints )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddClosedContour ( JNIEnv * env , jclass , jlong roi , jlong points , jint numPoints )
{
ContourID rv = imaqAddClosedContour ( ( ROI * ) roi , ( const Point * ) points , ( int ) numPoints ) ;
return ( jint ) rv ;
}
/* J: int imaqAddLineContour(ROI roi, Point start, Point end)
* JN : int imaqAddLineContour ( long roi , long start , long end )
* C : ContourID imaqAddLineContour ( ROI * roi , Point start , Point end )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddLineContour ( JNIEnv * env , jclass , jlong roi , jlong start , jlong end )
{
ContourID rv = imaqAddLineContour ( ( ROI * ) roi , * ( ( Point * ) start ) , * ( ( Point * ) end ) ) ;
return ( jint ) rv ;
}
/* J: int imaqAddOpenContour(ROI roi, Point[] points)
* JN : int imaqAddOpenContour ( long roi , long points , int numPoints )
* C : ContourID imaqAddOpenContour ( ROI * roi , const Point * points , int numPoints )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddOpenContour ( JNIEnv * env , jclass , jlong roi , jlong points , jint numPoints )
{
ContourID rv = imaqAddOpenContour ( ( ROI * ) roi , ( const Point * ) points , ( int ) numPoints ) ;
return ( jint ) rv ;
}
/* J: int imaqAddOvalContour(ROI roi, Rect boundingBox)
* JN : int imaqAddOvalContour ( long roi , long boundingBox )
* C : ContourID imaqAddOvalContour ( ROI * roi , Rect boundingBox )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddOvalContour ( JNIEnv * env , jclass , jlong roi , jlong boundingBox )
{
ContourID rv = imaqAddOvalContour ( ( ROI * ) roi , * ( ( Rect * ) boundingBox ) ) ;
return ( jint ) rv ;
}
/* J: int imaqAddPointContour(ROI roi, Point point)
* JN : int imaqAddPointContour ( long roi , long point )
* C : ContourID imaqAddPointContour ( ROI * roi , Point point )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddPointContour ( JNIEnv * env , jclass , jlong roi , jlong point )
{
ContourID rv = imaqAddPointContour ( ( ROI * ) roi , * ( ( Point * ) point ) ) ;
return ( jint ) rv ;
}
/* J: int imaqAddRectContour(ROI roi, Rect rect)
* JN : int imaqAddRectContour ( long roi , long rect )
* C : ContourID imaqAddRectContour ( ROI * roi , Rect rect )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddRectContour ( JNIEnv * env , jclass , jlong roi , jlong rect )
{
ContourID rv = imaqAddRectContour ( ( ROI * ) roi , * ( ( Rect * ) rect ) ) ;
return ( jint ) rv ;
}
/* J: int imaqAddRotatedRectContour2(ROI roi, RotatedRect rect)
* JN : int imaqAddRotatedRectContour2 ( long roi , long rect )
* C : ContourID imaqAddRotatedRectContour2 ( ROI * roi , RotatedRect rect )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddRotatedRectContour2 ( JNIEnv * env , jclass , jlong roi , jlong rect )
{
ContourID rv = imaqAddRotatedRectContour2 ( ( ROI * ) roi , * ( ( RotatedRect * ) rect ) ) ;
return ( jint ) rv ;
}
/* J: int imaqCopyContour(ROI destRoi, ROI sourceRoi, int id)
* JN : int imaqCopyContour ( long destRoi , long sourceRoi , int id )
* C : ContourID imaqCopyContour ( ROI * destRoi , const ROI * sourceRoi , ContourID id )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqCopyContour ( JNIEnv * env , jclass , jlong destRoi , jlong sourceRoi , jint id )
{
ContourID rv = imaqCopyContour ( ( ROI * ) destRoi , ( const ROI * ) sourceRoi , ( ContourID ) id ) ;
return ( jint ) rv ;
}
/* J: int imaqGetContour(ROI roi, int index)
* JN : int imaqGetContour ( long roi , int index )
* C : ContourID imaqGetContour ( const ROI * roi , unsigned int index )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqGetContour ( JNIEnv * env , jclass , jlong roi , jint index )
{
ContourID rv = imaqGetContour ( ( const ROI * ) roi , ( unsigned int ) index ) ;
return ( jint ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetContourColor(ROI roi, int id)
* JN : void imaqGetContourColor ( long roi , int id , long contourColor )
2014-12-09 00:48:57 -08:00
* C : int imaqGetContourColor ( const ROI * roi , ContourID id , RGBValue * contourColor )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetContourColor ( JNIEnv * env , jclass , jlong roi , jint id , jlong contourColor )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetContourColor ( ( const ROI * ) roi , ( ContourID ) id , ( RGBValue * ) contourColor ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetContourCount(ROI roi)
* JN : void imaqGetContourCount ( long roi )
* C : int imaqGetContourCount ( const ROI * roi )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetContourCount ( JNIEnv * env , jclass , jlong roi )
{
int rv = imaqGetContourCount ( ( const ROI * ) roi ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ContourInfo2 imaqGetContourInfo2(ROI roi, int id)
* JN : long imaqGetContourInfo2 ( long roi , int id )
* C : ContourInfo2 * imaqGetContourInfo2 ( const ROI * roi , ContourID id )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetContourInfo2 ( JNIEnv * env , jclass , jlong roi , jint id )
{
ContourInfo2 * rv = imaqGetContourInfo2 ( ( const ROI * ) roi , ( ContourID ) id ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqMoveContour(ROI roi, int id, int deltaX, int deltaY)
* JN : void imaqMoveContour ( long roi , int id , int deltaX , int deltaY )
* C : int imaqMoveContour ( ROI * roi , ContourID id , int deltaX , int deltaY )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMoveContour ( JNIEnv * env , jclass , jlong roi , jint id , jint deltaX , jint deltaY )
{
int rv = imaqMoveContour ( ( ROI * ) roi , ( ContourID ) id , ( int ) deltaX , ( int ) deltaY ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqRemoveContour(ROI roi, int id)
* JN : void imaqRemoveContour ( long roi , int id )
* C : int imaqRemoveContour ( ROI * roi , ContourID id )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqRemoveContour ( JNIEnv * env , jclass , jlong roi , jint id )
{
int rv = imaqRemoveContour ( ( ROI * ) roi , ( ContourID ) id ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetContourColor(ROI roi, int id, RGBValue color)
* JN : void imaqSetContourColor ( long roi , int id , long color )
* C : int imaqSetContourColor ( ROI * roi , ContourID id , const RGBValue * color )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetContourColor ( JNIEnv * env , jclass , jlong roi , jint id , jlong color )
{
int rv = imaqSetContourColor ( ( ROI * ) roi , ( ContourID ) id , ( const RGBValue * ) color ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Regions of Interest functions
*/
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqConstructROI2 ( const Image * image , ROI * roi , Tool initialTool , const ToolWindowOptions * tools , const ConstructROIOptions2 * options , int * okay )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConstructROI2 ( JNIEnv * env , jclass , jlong image , jlong roi , jint initialTool , jlong tools , jlong options , jlong okay )
2014-12-09 00:48:57 -08:00
{
int rv = imaqConstructROI2 ( ( const Image * ) image , ( ROI * ) roi , ( Tool ) initialTool , ( const ToolWindowOptions * ) tools , ( const ConstructROIOptions2 * ) options , ( int * ) okay ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ROI imaqCreateROI()
* JN : long imaqCreateROI ( )
* C : ROI * imaqCreateROI ( void )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateROI ( JNIEnv * env , jclass )
{
ROI * rv = imaqCreateROI ( ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetROIBoundingBox(ROI roi)
* JN : void imaqGetROIBoundingBox ( long roi , long boundingBox )
2014-12-09 00:48:57 -08:00
* C : int imaqGetROIBoundingBox ( const ROI * roi , Rect * boundingBox )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetROIBoundingBox ( JNIEnv * env , jclass , jlong roi , jlong boundingBox )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetROIBoundingBox ( ( const ROI * ) roi , ( Rect * ) boundingBox ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetROIColor(ROI roi)
* JN : void imaqGetROIColor ( long roi , long roiColor )
2014-12-09 00:48:57 -08:00
* C : int imaqGetROIColor ( const ROI * roi , RGBValue * roiColor )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetROIColor ( JNIEnv * env , jclass , jlong roi , jlong roiColor )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetROIColor ( ( const ROI * ) roi , ( RGBValue * ) roiColor ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ROI imaqGetWindowROI(int windowNumber)
* JN : long imaqGetWindowROI ( int windowNumber )
* C : ROI * imaqGetWindowROI ( int windowNumber )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowROI ( JNIEnv * env , jclass , jint windowNumber )
{
ROI * rv = imaqGetWindowROI ( ( int ) windowNumber ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqSetROIColor(ROI roi, RGBValue color)
* JN : void imaqSetROIColor ( long roi , long color )
* C : int imaqSetROIColor ( ROI * roi , const RGBValue * color )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetROIColor ( JNIEnv * env , jclass , jlong roi , jlong color )
{
int rv = imaqSetROIColor ( ( ROI * ) roi , ( const RGBValue * ) color ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetWindowROI(int windowNumber, ROI roi)
* JN : void imaqSetWindowROI ( int windowNumber , long roi )
* C : int imaqSetWindowROI ( int windowNumber , const ROI * roi )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowROI ( JNIEnv * env , jclass , jint windowNumber , jlong roi )
{
int rv = imaqSetWindowROI ( ( int ) windowNumber , ( const ROI * ) roi ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Image Analysis functions
*/
2015-01-02 23:14:02 -08:00
/* J: void imaqCentroid(Image image, Image mask)
* JN : void imaqCentroid ( long image , long centroid , long mask )
2014-12-09 00:48:57 -08:00
* C : int imaqCentroid ( const Image * image , PointFloat * centroid , const Image * mask )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCentroid ( JNIEnv * env , jclass , jlong image , jlong centroid , jlong mask )
2014-12-09 00:48:57 -08:00
{
int rv = imaqCentroid ( ( const Image * ) image , ( PointFloat * ) centroid , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ExtractCurvesResult imaqExtractCurves(Image image, ROI roi, CurveOptions curveOptions)
* JN : long imaqExtractCurves ( long image , long roi , long curveOptions , long numCurves )
* C : Curve * imaqExtractCurves ( const Image * image , const ROI * roi , const CurveOptions * curveOptions , unsigned int * numCurves )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqExtractCurves ( JNIEnv * env , jclass , jlong image , jlong roi , jlong curveOptions , jlong numCurves )
{
Curve * rv = imaqExtractCurves ( ( const Image * ) image , ( const ROI * ) roi , ( const CurveOptions * ) curveOptions , ( unsigned int * ) numCurves ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: HistogramReport imaqHistogram(Image image, int numClasses, float min, float max, Image mask)
* JN : long imaqHistogram ( long image , int numClasses , float min , float max , long mask )
* C : HistogramReport * imaqHistogram ( const Image * image , int numClasses , float min , float max , const Image * mask )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqHistogram ( JNIEnv * env , jclass , jlong image , jint numClasses , jfloat min , jfloat max , jlong mask )
{
HistogramReport * rv = imaqHistogram ( ( const Image * ) image , ( int ) numClasses , ( float ) min , ( float ) max , ( const Image * ) mask ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: LinearAverages imaqLinearAverages2(Image image, LinearAveragesMode mode, Rect rect)
* JN : long imaqLinearAverages2 ( long image , int mode , long rect )
* C : LinearAverages * imaqLinearAverages2 ( Image * image , LinearAveragesMode mode , Rect rect )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLinearAverages2 ( JNIEnv * env , jclass , jlong image , jint mode , jlong rect )
{
LinearAverages * rv = imaqLinearAverages2 ( ( Image * ) image , ( LinearAveragesMode ) mode , * ( ( Rect * ) rect ) ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: LineProfile imaqLineProfile(Image image, Point start, Point end)
* JN : long imaqLineProfile ( long image , long start , long end )
* C : LineProfile * imaqLineProfile ( const Image * image , Point start , Point end )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLineProfile ( JNIEnv * env , jclass , jlong image , jlong start , jlong end )
{
LineProfile * rv = imaqLineProfile ( ( const Image * ) image , * ( ( Point * ) start ) , * ( ( Point * ) end ) ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: QuantifyReport imaqQuantify(Image image, Image mask)
* JN : long imaqQuantify ( long image , long mask )
* C : QuantifyReport * imaqQuantify ( const Image * image , const Image * mask )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqQuantify ( JNIEnv * env , jclass , jlong image , jlong mask )
{
QuantifyReport * rv = imaqQuantify ( ( const Image * ) image , ( const Image * ) mask ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Threshold functions
*/
/* J: ThresholdData imaqAutoThreshold2(Image dest, Image source, int numClasses, ThresholdMethod method, Image mask)
* JN : long imaqAutoThreshold2 ( long dest , long source , int numClasses , int method , long mask )
* C : ThresholdData * imaqAutoThreshold2 ( Image * dest , const Image * source , int numClasses , ThresholdMethod method , const Image * mask )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqAutoThreshold2 ( JNIEnv * env , jclass , jlong dest , jlong source , jint numClasses , jint method , jlong mask )
{
ThresholdData * rv = imaqAutoThreshold2 ( ( Image * ) dest , ( const Image * ) source , ( int ) numClasses , ( ThresholdMethod ) method , ( const Image * ) mask ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqLocalThreshold(Image dest, Image source, int windowWidth, int windowHeight, LocalThresholdMethod method, double deviationWeight, ObjectType type, float replaceValue)
* JN : void imaqLocalThreshold ( long dest , long source , int windowWidth , int windowHeight , int method , double deviationWeight , int type , float replaceValue )
* C : int imaqLocalThreshold ( Image * dest , const Image * source , unsigned int windowWidth , unsigned int windowHeight , LocalThresholdMethod method , double deviationWeight , ObjectType type , float replaceValue )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLocalThreshold ( JNIEnv * env , jclass , jlong dest , jlong source , jint windowWidth , jint windowHeight , jint method , jdouble deviationWeight , jint type , jfloat replaceValue )
{
int rv = imaqLocalThreshold ( ( Image * ) dest , ( const Image * ) source , ( unsigned int ) windowWidth , ( unsigned int ) windowHeight , ( LocalThresholdMethod ) method , ( double ) deviationWeight , ( ObjectType ) type , ( float ) replaceValue ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMagicWand(Image dest, Image source, Point coord, float tolerance, int connectivity8, float replaceValue)
* JN : void imaqMagicWand ( long dest , long source , long coord , float tolerance , int connectivity8 , float replaceValue )
* C : int imaqMagicWand ( Image * dest , const Image * source , Point coord , float tolerance , int connectivity8 , float replaceValue )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMagicWand ( JNIEnv * env , jclass , jlong dest , jlong source , jlong coord , jfloat tolerance , jint connectivity8 , jfloat replaceValue )
{
int rv = imaqMagicWand ( ( Image * ) dest , ( const Image * ) source , * ( ( Point * ) coord ) , ( float ) tolerance , ( int ) connectivity8 , ( float ) replaceValue ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMultithreshold(Image dest, Image source, ThresholdData[] ranges)
* JN : void imaqMultithreshold ( long dest , long source , long ranges , int numRanges )
* C : int imaqMultithreshold ( Image * dest , const Image * source , const ThresholdData * ranges , int numRanges )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMultithreshold ( JNIEnv * env , jclass , jlong dest , jlong source , jlong ranges , jint numRanges )
{
int rv = imaqMultithreshold ( ( Image * ) dest , ( const Image * ) source , ( const ThresholdData * ) ranges , ( int ) numRanges ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqThreshold(Image dest, Image source, float rangeMin, float rangeMax, int useNewValue, float newValue)
* JN : void imaqThreshold ( long dest , long source , float rangeMin , float rangeMax , int useNewValue , float newValue )
* C : int imaqThreshold ( Image * dest , const Image * source , float rangeMin , float rangeMax , int useNewValue , float newValue )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqThreshold ( JNIEnv * env , jclass , jlong dest , jlong source , jfloat rangeMin , jfloat rangeMax , jint useNewValue , jfloat newValue )
{
int rv = imaqThreshold ( ( Image * ) dest , ( const Image * ) source , ( float ) rangeMin , ( float ) rangeMax , ( int ) useNewValue , ( float ) newValue ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Memory Management functions
*/
/*
* Pattern Matching functions
*/
/* J: DetectCirclesResult imaqDetectCircles(Image image, CircleDescriptor circleDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi)
* JN : long imaqDetectCircles ( long image , long circleDescriptor , long curveOptions , long shapeDetectionOptions , long roi , long numMatchesReturned )
* C : CircleMatch * imaqDetectCircles ( const Image * image , const CircleDescriptor * circleDescriptor , const CurveOptions * curveOptions , const ShapeDetectionOptions * shapeDetectionOptions , const ROI * roi , int * numMatchesReturned )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqDetectCircles ( JNIEnv * env , jclass , jlong image , jlong circleDescriptor , jlong curveOptions , jlong shapeDetectionOptions , jlong roi , jlong numMatchesReturned )
{
CircleMatch * rv = imaqDetectCircles ( ( const Image * ) image , ( const CircleDescriptor * ) circleDescriptor , ( const CurveOptions * ) curveOptions , ( const ShapeDetectionOptions * ) shapeDetectionOptions , ( const ROI * ) roi , ( int * ) numMatchesReturned ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: DetectEllipsesResult imaqDetectEllipses(Image image, EllipseDescriptor ellipseDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi)
* JN : long imaqDetectEllipses ( long image , long ellipseDescriptor , long curveOptions , long shapeDetectionOptions , long roi , long numMatchesReturned )
* C : EllipseMatch * imaqDetectEllipses ( const Image * image , const EllipseDescriptor * ellipseDescriptor , const CurveOptions * curveOptions , const ShapeDetectionOptions * shapeDetectionOptions , const ROI * roi , int * numMatchesReturned )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqDetectEllipses ( JNIEnv * env , jclass , jlong image , jlong ellipseDescriptor , jlong curveOptions , jlong shapeDetectionOptions , jlong roi , jlong numMatchesReturned )
{
EllipseMatch * rv = imaqDetectEllipses ( ( const Image * ) image , ( const EllipseDescriptor * ) ellipseDescriptor , ( const CurveOptions * ) curveOptions , ( const ShapeDetectionOptions * ) shapeDetectionOptions , ( const ROI * ) roi , ( int * ) numMatchesReturned ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: DetectLinesResult imaqDetectLines(Image image, LineDescriptor lineDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi)
* JN : long imaqDetectLines ( long image , long lineDescriptor , long curveOptions , long shapeDetectionOptions , long roi , long numMatchesReturned )
* C : LineMatch * imaqDetectLines ( const Image * image , const LineDescriptor * lineDescriptor , const CurveOptions * curveOptions , const ShapeDetectionOptions * shapeDetectionOptions , const ROI * roi , int * numMatchesReturned )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqDetectLines ( JNIEnv * env , jclass , jlong image , jlong lineDescriptor , jlong curveOptions , jlong shapeDetectionOptions , jlong roi , jlong numMatchesReturned )
{
LineMatch * rv = imaqDetectLines ( ( const Image * ) image , ( const LineDescriptor * ) lineDescriptor , ( const CurveOptions * ) curveOptions , ( const ShapeDetectionOptions * ) shapeDetectionOptions , ( const ROI * ) roi , ( int * ) numMatchesReturned ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: DetectRectanglesResult imaqDetectRectangles(Image image, RectangleDescriptor rectangleDescriptor, CurveOptions curveOptions, ShapeDetectionOptions shapeDetectionOptions, ROI roi)
* JN : long imaqDetectRectangles ( long image , long rectangleDescriptor , long curveOptions , long shapeDetectionOptions , long roi , long numMatchesReturned )
* C : RectangleMatch * imaqDetectRectangles ( const Image * image , const RectangleDescriptor * rectangleDescriptor , const CurveOptions * curveOptions , const ShapeDetectionOptions * shapeDetectionOptions , const ROI * roi , int * numMatchesReturned )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqDetectRectangles ( JNIEnv * env , jclass , jlong image , jlong rectangleDescriptor , jlong curveOptions , jlong shapeDetectionOptions , jlong roi , jlong numMatchesReturned )
{
RectangleMatch * rv = imaqDetectRectangles ( ( const Image * ) image , ( const RectangleDescriptor * ) rectangleDescriptor , ( const CurveOptions * ) curveOptions , ( const ShapeDetectionOptions * ) shapeDetectionOptions , ( const ROI * ) roi , ( int * ) numMatchesReturned ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: GetGeometricFeaturesFromCurvesResult imaqGetGeometricFeaturesFromCurves(Curve[] curves, FeatureType[] featureTypes)
* JN : long imaqGetGeometricFeaturesFromCurves ( long curves , int numCurves , long featureTypes , int numFeatureTypes , long numFeatures )
* C : FeatureData * imaqGetGeometricFeaturesFromCurves ( const Curve * curves , unsigned int numCurves , const FeatureType * featureTypes , unsigned int numFeatureTypes , unsigned int * numFeatures )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetGeometricFeaturesFromCurves ( JNIEnv * env , jclass , jlong curves , jint numCurves , jlong featureTypes , jint numFeatureTypes , jlong numFeatures )
{
FeatureData * rv = imaqGetGeometricFeaturesFromCurves ( ( const Curve * ) curves , ( unsigned int ) numCurves , ( const FeatureType * ) featureTypes , ( unsigned int ) numFeatureTypes , ( unsigned int * ) numFeatures ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: GetGeometricTemplateFeatureInfoResult imaqGetGeometricTemplateFeatureInfo(Image pattern)
* JN : long imaqGetGeometricTemplateFeatureInfo ( long pattern , long numFeatures )
* C : FeatureData * imaqGetGeometricTemplateFeatureInfo ( const Image * pattern , unsigned int * numFeatures )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetGeometricTemplateFeatureInfo ( JNIEnv * env , jclass , jlong pattern , jlong numFeatures )
{
FeatureData * rv = imaqGetGeometricTemplateFeatureInfo ( ( const Image * ) pattern , ( unsigned int * ) numFeatures ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqLearnColorPattern(Image image, LearnColorPatternOptions options)
* JN : void imaqLearnColorPattern ( long image , long options )
* C : int imaqLearnColorPattern ( Image * image , const LearnColorPatternOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnColorPattern ( JNIEnv * env , jclass , jlong image , jlong options )
{
int rv = imaqLearnColorPattern ( ( Image * ) image , ( const LearnColorPatternOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqLearnGeometricPattern(Image image, PointFloat originOffset, CurveOptions curveOptions, LearnGeometricPatternAdvancedOptions advancedLearnOptions, Image mask)
* JN : void imaqLearnGeometricPattern ( long image , long originOffset , long curveOptions , long advancedLearnOptions , long mask )
* C : int imaqLearnGeometricPattern ( Image * image , PointFloat originOffset , const CurveOptions * curveOptions , const LearnGeometricPatternAdvancedOptions * advancedLearnOptions , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnGeometricPattern ( JNIEnv * env , jclass , jlong image , jlong originOffset , jlong curveOptions , jlong advancedLearnOptions , jlong mask )
{
int rv = imaqLearnGeometricPattern ( ( Image * ) image , * ( ( PointFloat * ) originOffset ) , ( const CurveOptions * ) curveOptions , ( const LearnGeometricPatternAdvancedOptions * ) advancedLearnOptions , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqLearnPattern3(Image image, LearningMode learningMode, Image mask)
* JN : void imaqLearnPattern3 ( long image , int learningMode , long advancedOptions , long mask )
2014-12-09 00:48:57 -08:00
* C : int imaqLearnPattern3 ( Image * image , LearningMode learningMode , LearnPatternAdvancedOptions * advancedOptions , const Image * mask )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern3 ( JNIEnv * env , jclass , jlong image , jint learningMode , jlong advancedOptions , jlong mask )
2014-12-09 00:48:57 -08:00
{
int rv = imaqLearnPattern3 ( ( Image * ) image , ( LearningMode ) learningMode , ( LearnPatternAdvancedOptions * ) advancedOptions , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: MatchColorPatternResult imaqMatchColorPattern(Image image, Image pattern, MatchColorPatternOptions options, Rect searchRect)
* JN : long imaqMatchColorPattern ( long image , long pattern , long options , long searchRect , long numMatches )
* C : PatternMatch * imaqMatchColorPattern ( const Image * image , Image * pattern , const MatchColorPatternOptions * options , Rect searchRect , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchColorPattern ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong options , jlong searchRect , jlong numMatches )
{
PatternMatch * rv = imaqMatchColorPattern ( ( const Image * ) image , ( Image * ) pattern , ( const MatchColorPatternOptions * ) options , * ( ( Rect * ) searchRect ) , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: MatchGeometricPattern2Result imaqMatchGeometricPattern2(Image image, Image pattern, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions2 advancedMatchOptions, ROI roi)
* JN : long imaqMatchGeometricPattern2 ( long image , long pattern , long curveOptions , long matchOptions , long advancedMatchOptions , long roi , long numMatches )
* C : GeometricPatternMatch2 * imaqMatchGeometricPattern2 ( const Image * image , const Image * pattern , const CurveOptions * curveOptions , const MatchGeometricPatternOptions * matchOptions , const MatchGeometricPatternAdvancedOptions2 * advancedMatchOptions , const ROI * roi , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchGeometricPattern2 ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong curveOptions , jlong matchOptions , jlong advancedMatchOptions , jlong roi , jlong numMatches )
{
GeometricPatternMatch2 * rv = imaqMatchGeometricPattern2 ( ( const Image * ) image , ( const Image * ) pattern , ( const CurveOptions * ) curveOptions , ( const MatchGeometricPatternOptions * ) matchOptions , ( const MatchGeometricPatternAdvancedOptions2 * ) advancedMatchOptions , ( const ROI * ) roi , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: MatchMultipleGeometricPatternsResult imaqMatchMultipleGeometricPatterns(Image image, MultipleGeometricPattern multiplePattern, ROI roi)
* JN : long imaqMatchMultipleGeometricPatterns ( long image , long multiplePattern , long roi , long numMatches )
* C : GeometricPatternMatch2 * imaqMatchMultipleGeometricPatterns ( const Image * image , const MultipleGeometricPattern * multiplePattern , const ROI * roi , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchMultipleGeometricPatterns ( JNIEnv * env , jclass , jlong image , jlong multiplePattern , jlong roi , jlong numMatches )
{
GeometricPatternMatch2 * rv = imaqMatchMultipleGeometricPatterns ( ( const Image * ) image , ( const MultipleGeometricPattern * ) multiplePattern , ( const ROI * ) roi , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: MultipleGeometricPattern imaqReadMultipleGeometricPatternFile(String fileName, String description)
* JN : long imaqReadMultipleGeometricPatternFile ( long fileName , long description )
* C : MultipleGeometricPattern * imaqReadMultipleGeometricPatternFile ( const char * fileName , String255 description )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadMultipleGeometricPatternFile ( JNIEnv * env , jclass , jlong fileName , jlong description )
{
MultipleGeometricPattern * rv = imaqReadMultipleGeometricPatternFile ( ( const char * ) fileName , ( char * ) description ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: RefineMatchesResult imaqRefineMatches(Image image, Image pattern, PatternMatch[] candidatesIn)
* JN : long imaqRefineMatches ( long image , long pattern , long candidatesIn , int numCandidatesIn , long options , long advancedOptions , long numCandidatesOut )
* C : PatternMatch * imaqRefineMatches ( const Image * image , const Image * pattern , const PatternMatch * candidatesIn , int numCandidatesIn , MatchPatternOptions * options , MatchPatternAdvancedOptions * advancedOptions , int * numCandidatesOut )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqRefineMatches ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong candidatesIn , jint numCandidatesIn , jlong options , jlong advancedOptions , jlong numCandidatesOut )
{
PatternMatch * rv = imaqRefineMatches ( ( const Image * ) image , ( const Image * ) pattern , ( const PatternMatch * ) candidatesIn , ( int ) numCandidatesIn , ( MatchPatternOptions * ) options , ( MatchPatternAdvancedOptions * ) advancedOptions , ( int * ) numCandidatesOut ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqSetMultipleGeometricPatternsOptions(MultipleGeometricPattern multiplePattern, String label, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions2 advancedMatchOptions)
* JN : void imaqSetMultipleGeometricPatternsOptions ( long multiplePattern , long label , long curveOptions , long matchOptions , long advancedMatchOptions )
* C : int imaqSetMultipleGeometricPatternsOptions ( MultipleGeometricPattern * multiplePattern , const char * label , const CurveOptions * curveOptions , const MatchGeometricPatternOptions * matchOptions , const MatchGeometricPatternAdvancedOptions2 * advancedMatchOptions )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetMultipleGeometricPatternsOptions ( JNIEnv * env , jclass , jlong multiplePattern , jlong label , jlong curveOptions , jlong matchOptions , jlong advancedMatchOptions )
{
int rv = imaqSetMultipleGeometricPatternsOptions ( ( MultipleGeometricPattern * ) multiplePattern , ( const char * ) label , ( const CurveOptions * ) curveOptions , ( const MatchGeometricPatternOptions * ) matchOptions , ( const MatchGeometricPatternAdvancedOptions2 * ) advancedMatchOptions ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqWriteMultipleGeometricPatternFile(MultipleGeometricPattern multiplePattern, String fileName, String description)
* JN : void imaqWriteMultipleGeometricPatternFile ( long multiplePattern , long fileName , long description )
* C : int imaqWriteMultipleGeometricPatternFile ( const MultipleGeometricPattern * multiplePattern , const char * fileName , const char * description )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteMultipleGeometricPatternFile ( JNIEnv * env , jclass , jlong multiplePattern , jlong fileName , jlong description )
{
int rv = imaqWriteMultipleGeometricPatternFile ( ( const MultipleGeometricPattern * ) multiplePattern , ( const char * ) fileName , ( const char * ) description ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: MatchGeometricPattern3Result imaqMatchGeometricPattern3(Image image, Image pattern, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions3 advancedMatchOptions, ROI roi)
* JN : long imaqMatchGeometricPattern3 ( long image , long pattern , long curveOptions , long matchOptions , long advancedMatchOptions , long roi , long numMatches )
* C : GeometricPatternMatch3 * imaqMatchGeometricPattern3 ( const Image * image , const Image * pattern , const CurveOptions * curveOptions , const MatchGeometricPatternOptions * matchOptions , const MatchGeometricPatternAdvancedOptions3 * advancedMatchOptions , const ROI * roi , size_t * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchGeometricPattern3 ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong curveOptions , jlong matchOptions , jlong advancedMatchOptions , jlong roi , jlong numMatches )
{
GeometricPatternMatch3 * rv = imaqMatchGeometricPattern3 ( ( const Image * ) image , ( const Image * ) pattern , ( const CurveOptions * ) curveOptions , ( const MatchGeometricPatternOptions * ) matchOptions , ( const MatchGeometricPatternAdvancedOptions3 * ) advancedMatchOptions , ( const ROI * ) roi , ( size_t * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqLearnGeometricPattern2(Image image, PointFloat originOffset, double angleOffset, CurveOptions curveOptions, LearnGeometricPatternAdvancedOptions2 advancedLearnOptions, Image mask)
* JN : void imaqLearnGeometricPattern2 ( long image , long originOffset , double angleOffset , long curveOptions , long advancedLearnOptions , long mask )
* C : int imaqLearnGeometricPattern2 ( Image * image , PointFloat originOffset , double angleOffset , const CurveOptions * curveOptions , const LearnGeometricPatternAdvancedOptions2 * advancedLearnOptions , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnGeometricPattern2 ( JNIEnv * env , jclass , jlong image , jlong originOffset , jdouble angleOffset , jlong curveOptions , jlong advancedLearnOptions , jlong mask )
{
int rv = imaqLearnGeometricPattern2 ( ( Image * ) image , * ( ( PointFloat * ) originOffset ) , ( double ) angleOffset , ( const CurveOptions * ) curveOptions , ( const LearnGeometricPatternAdvancedOptions2 * ) advancedLearnOptions , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: MatchPattern3Result imaqMatchPattern3(Image image, Image pattern, MatchPatternOptions options, MatchPatternAdvancedOptions advancedOptions, ROI roi)
* JN : long imaqMatchPattern3 ( long image , long pattern , long options , long advancedOptions , long roi , long numMatches )
* C : PatternMatch * imaqMatchPattern3 ( const Image * image , const Image * pattern , const MatchPatternOptions * options , const MatchPatternAdvancedOptions * advancedOptions , const ROI * roi , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchPattern3 ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong options , jlong advancedOptions , jlong roi , jlong numMatches )
{
PatternMatch * rv = imaqMatchPattern3 ( ( const Image * ) image , ( const Image * ) pattern , ( const MatchPatternOptions * ) options , ( const MatchPatternAdvancedOptions * ) advancedOptions , ( const ROI * ) roi , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Overlay functions
*/
/* J: void imaqClearOverlay(Image image, String group)
* JN : void imaqClearOverlay ( long image , long group )
* C : int imaqClearOverlay ( Image * image , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqClearOverlay ( JNIEnv * env , jclass , jlong image , jlong group )
{
int rv = imaqClearOverlay ( ( Image * ) image , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCopyOverlay(Image dest, Image source, String group)
* JN : void imaqCopyOverlay ( long dest , long source , long group )
* C : int imaqCopyOverlay ( Image * dest , const Image * source , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCopyOverlay ( JNIEnv * env , jclass , jlong dest , jlong source , jlong group )
{
int rv = imaqCopyOverlay ( ( Image * ) dest , ( const Image * ) source , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetOverlayProperties(Image image, String group)
* JN : void imaqGetOverlayProperties ( long image , long group , long transformBehaviors )
2014-12-09 00:48:57 -08:00
* C : int imaqGetOverlayProperties ( const Image * image , const char * group , TransformBehaviors * transformBehaviors )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetOverlayProperties ( JNIEnv * env , jclass , jlong image , jlong group , jlong transformBehaviors )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetOverlayProperties ( ( const Image * ) image , ( const char * ) group , ( TransformBehaviors * ) transformBehaviors ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMergeOverlay(Image dest, Image source, RGBValue[] palette, String group)
* JN : void imaqMergeOverlay ( long dest , long source , long palette , int numColors , long group )
* C : int imaqMergeOverlay ( Image * dest , const Image * source , const RGBValue * palette , unsigned int numColors , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMergeOverlay ( JNIEnv * env , jclass , jlong dest , jlong source , jlong palette , jint numColors , jlong group )
{
int rv = imaqMergeOverlay ( ( Image * ) dest , ( const Image * ) source , ( const RGBValue * ) palette , ( unsigned int ) numColors , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayArc(Image image, ArcInfo arc, RGBValue color, DrawMode drawMode, String group)
* JN : void imaqOverlayArc ( long image , long arc , long color , int drawMode , long group )
* C : int imaqOverlayArc ( Image * image , const ArcInfo * arc , const RGBValue * color , DrawMode drawMode , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayArc ( JNIEnv * env , jclass , jlong image , jlong arc , jlong color , jint drawMode , jlong group )
{
int rv = imaqOverlayArc ( ( Image * ) image , ( const ArcInfo * ) arc , ( const RGBValue * ) color , ( DrawMode ) drawMode , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayBitmap(Image image, Point destLoc, RGBValue bitmap, int numCols, int numRows, String group)
* JN : void imaqOverlayBitmap ( long image , long destLoc , long bitmap , int numCols , int numRows , long group )
* C : int imaqOverlayBitmap ( Image * image , Point destLoc , const RGBValue * bitmap , unsigned int numCols , unsigned int numRows , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayBitmap ( JNIEnv * env , jclass , jlong image , jlong destLoc , jlong bitmap , jint numCols , jint numRows , jlong group )
{
int rv = imaqOverlayBitmap ( ( Image * ) image , * ( ( Point * ) destLoc ) , ( const RGBValue * ) bitmap , ( unsigned int ) numCols , ( unsigned int ) numRows , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayClosedContour(Image image, Point[] points, RGBValue color, DrawMode drawMode, String group)
* JN : void imaqOverlayClosedContour ( long image , long points , int numPoints , long color , int drawMode , long group )
* C : int imaqOverlayClosedContour ( Image * image , const Point * points , int numPoints , const RGBValue * color , DrawMode drawMode , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayClosedContour ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jlong color , jint drawMode , jlong group )
{
int rv = imaqOverlayClosedContour ( ( Image * ) image , ( const Point * ) points , ( int ) numPoints , ( const RGBValue * ) color , ( DrawMode ) drawMode , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayLine(Image image, Point start, Point end, RGBValue color, String group)
* JN : void imaqOverlayLine ( long image , long start , long end , long color , long group )
* C : int imaqOverlayLine ( Image * image , Point start , Point end , const RGBValue * color , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayLine ( JNIEnv * env , jclass , jlong image , jlong start , jlong end , jlong color , jlong group )
{
int rv = imaqOverlayLine ( ( Image * ) image , * ( ( Point * ) start ) , * ( ( Point * ) end ) , ( const RGBValue * ) color , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: void imaqOverlayMetafile(Image image, RawData metafile, Rect rect, String group)
* JN : void imaqOverlayMetafile ( long image , long metafile , long rect , long group )
* C : int imaqOverlayMetafile ( Image * image , const void * metafile , Rect rect , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayMetafile ( JNIEnv * env , jclass , jlong image , jlong metafile , jlong rect , jlong group )
{
int rv = imaqOverlayMetafile ( ( Image * ) image , ( const void * ) metafile , * ( ( Rect * ) rect ) , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqOverlayOpenContour(Image image, Point[] points, RGBValue color, String group)
* JN : void imaqOverlayOpenContour ( long image , long points , int numPoints , long color , long group )
* C : int imaqOverlayOpenContour ( Image * image , const Point * points , int numPoints , const RGBValue * color , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayOpenContour ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jlong color , jlong group )
{
int rv = imaqOverlayOpenContour ( ( Image * ) image , ( const Point * ) points , ( int ) numPoints , ( const RGBValue * ) color , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqOverlayOval(Image image, Rect boundingBox, RGBValue color, DrawMode drawMode)
* JN : void imaqOverlayOval ( long image , long boundingBox , long color , int drawMode , long group )
2014-12-09 00:48:57 -08:00
* C : int imaqOverlayOval ( Image * image , Rect boundingBox , const RGBValue * color , DrawMode drawMode , char * group )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayOval ( JNIEnv * env , jclass , jlong image , jlong boundingBox , jlong color , jint drawMode , jlong group )
2014-12-09 00:48:57 -08:00
{
int rv = imaqOverlayOval ( ( Image * ) image , * ( ( Rect * ) boundingBox ) , ( const RGBValue * ) color , ( DrawMode ) drawMode , ( char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayPoints(Image image, Point[] points, RGBValue[] colors, PointSymbol symbol, UserPointSymbol userSymbol, String group)
* JN : void imaqOverlayPoints ( long image , long points , int numPoints , long colors , int numColors , int symbol , long userSymbol , long group )
* C : int imaqOverlayPoints ( Image * image , const Point * points , int numPoints , const RGBValue * colors , int numColors , PointSymbol symbol , const UserPointSymbol * userSymbol , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayPoints ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jlong colors , jint numColors , jint symbol , jlong userSymbol , jlong group )
{
int rv = imaqOverlayPoints ( ( Image * ) image , ( const Point * ) points , ( int ) numPoints , ( const RGBValue * ) colors , ( int ) numColors , ( PointSymbol ) symbol , ( const UserPointSymbol * ) userSymbol , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayRect(Image image, Rect rect, RGBValue color, DrawMode drawMode, String group)
* JN : void imaqOverlayRect ( long image , long rect , long color , int drawMode , long group )
* C : int imaqOverlayRect ( Image * image , Rect rect , const RGBValue * color , DrawMode drawMode , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayRect ( JNIEnv * env , jclass , jlong image , jlong rect , jlong color , jint drawMode , jlong group )
{
int rv = imaqOverlayRect ( ( Image * ) image , * ( ( Rect * ) rect ) , ( const RGBValue * ) color , ( DrawMode ) drawMode , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayROI(Image image, ROI roi, PointSymbol symbol, UserPointSymbol userSymbol, String group)
* JN : void imaqOverlayROI ( long image , long roi , int symbol , long userSymbol , long group )
* C : int imaqOverlayROI ( Image * image , const ROI * roi , PointSymbol symbol , const UserPointSymbol * userSymbol , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayROI ( JNIEnv * env , jclass , jlong image , jlong roi , jint symbol , jlong userSymbol , jlong group )
{
int rv = imaqOverlayROI ( ( Image * ) image , ( const ROI * ) roi , ( PointSymbol ) symbol , ( const UserPointSymbol * ) userSymbol , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqOverlayText(Image image, Point origin, String text, RGBValue color, OverlayTextOptions options, String group)
* JN : void imaqOverlayText ( long image , long origin , long text , long color , long options , long group )
* C : int imaqOverlayText ( Image * image , Point origin , const char * text , const RGBValue * color , const OverlayTextOptions * options , const char * group )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqOverlayText ( JNIEnv * env , jclass , jlong image , jlong origin , jlong text , jlong color , jlong options , jlong group )
{
int rv = imaqOverlayText ( ( Image * ) image , * ( ( Point * ) origin ) , ( const char * ) text , ( const RGBValue * ) color , ( const OverlayTextOptions * ) options , ( const char * ) group ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqSetOverlayProperties(Image image, String group)
* JN : void imaqSetOverlayProperties ( long image , long group , long transformBehaviors )
2014-12-09 00:48:57 -08:00
* C : int imaqSetOverlayProperties ( Image * image , const char * group , TransformBehaviors * transformBehaviors )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetOverlayProperties ( JNIEnv * env , jclass , jlong image , jlong group , jlong transformBehaviors )
2014-12-09 00:48:57 -08:00
{
int rv = imaqSetOverlayProperties ( ( Image * ) image , ( const char * ) group , ( TransformBehaviors * ) transformBehaviors ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* OCR functions
*/
/* J: CharSet imaqCreateCharSet()
* JN : long imaqCreateCharSet ( )
* C : CharSet * imaqCreateCharSet ( void )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateCharSet ( JNIEnv * env , jclass )
{
CharSet * rv = imaqCreateCharSet ( ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqDeleteChar(CharSet set, int index)
* JN : void imaqDeleteChar ( long set , int index )
* C : int imaqDeleteChar ( CharSet * set , int index )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDeleteChar ( JNIEnv * env , jclass , jlong set , jint index )
{
int rv = imaqDeleteChar ( ( CharSet * ) set , ( int ) index ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetCharCount(CharSet set)
* JN : void imaqGetCharCount ( long set )
* C : int imaqGetCharCount ( const CharSet * set )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetCharCount ( JNIEnv * env , jclass , jlong set )
{
int rv = imaqGetCharCount ( ( const CharSet * ) set ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: CharInfo2 imaqGetCharInfo2(CharSet set, int index)
* JN : long imaqGetCharInfo2 ( long set , int index )
* C : CharInfo2 * imaqGetCharInfo2 ( const CharSet * set , int index )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetCharInfo2 ( JNIEnv * env , jclass , jlong set , jint index )
{
CharInfo2 * rv = imaqGetCharInfo2 ( ( const CharSet * ) set , ( int ) index ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqReadOCRFile(String fileName, CharSet set, String setDescription)
* JN : void imaqReadOCRFile ( long fileName , long set , long setDescription , long readOptions , long processingOptions , long spacingOptions )
* C : int imaqReadOCRFile ( const char * fileName , CharSet * set , String255 setDescription , ReadTextOptions * readOptions , OCRProcessingOptions * processingOptions , OCRSpacingOptions * spacingOptions )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqReadOCRFile ( JNIEnv * env , jclass , jlong fileName , jlong set , jlong setDescription , jlong readOptions , jlong processingOptions , jlong spacingOptions )
{
int rv = imaqReadOCRFile ( ( const char * ) fileName , ( CharSet * ) set , ( char * ) setDescription , ( ReadTextOptions * ) readOptions , ( OCRProcessingOptions * ) processingOptions , ( OCRSpacingOptions * ) spacingOptions ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ReadTextReport3 imaqReadText3(Image image, CharSet set, ROI roi, ReadTextOptions readOptions, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions)
* JN : long imaqReadText3 ( long image , long set , long roi , long readOptions , long processingOptions , long spacingOptions )
* C : ReadTextReport3 * imaqReadText3 ( const Image * image , const CharSet * set , const ROI * roi , const ReadTextOptions * readOptions , const OCRProcessingOptions * processingOptions , const OCRSpacingOptions * spacingOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadText3 ( JNIEnv * env , jclass , jlong image , jlong set , jlong roi , jlong readOptions , jlong processingOptions , jlong spacingOptions )
{
ReadTextReport3 * rv = imaqReadText3 ( ( const Image * ) image , ( const CharSet * ) set , ( const ROI * ) roi , ( const ReadTextOptions * ) readOptions , ( const OCRProcessingOptions * ) processingOptions , ( const OCRSpacingOptions * ) spacingOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqRenameChar(CharSet set, int index, String newCharValue)
* JN : void imaqRenameChar ( long set , int index , long newCharValue )
* C : int imaqRenameChar ( CharSet * set , int index , const char * newCharValue )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqRenameChar ( JNIEnv * env , jclass , jlong set , jint index , jlong newCharValue )
{
int rv = imaqRenameChar ( ( CharSet * ) set , ( int ) index , ( const char * ) newCharValue ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetReferenceChar(CharSet set, int index, int isReferenceChar)
* JN : void imaqSetReferenceChar ( long set , int index , int isReferenceChar )
* C : int imaqSetReferenceChar ( const CharSet * set , int index , int isReferenceChar )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetReferenceChar ( JNIEnv * env , jclass , jlong set , jint index , jint isReferenceChar )
{
int rv = imaqSetReferenceChar ( ( const CharSet * ) set , ( int ) index , ( int ) isReferenceChar ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqTrainChars(Image image, CharSet set, int index, String charValue, ROI roi, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions)
* JN : void imaqTrainChars ( long image , long set , int index , long charValue , long roi , long processingOptions , long spacingOptions )
* C : int imaqTrainChars ( const Image * image , CharSet * set , int index , const char * charValue , const ROI * roi , const OCRProcessingOptions * processingOptions , const OCRSpacingOptions * spacingOptions )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqTrainChars ( JNIEnv * env , jclass , jlong image , jlong set , jint index , jlong charValue , jlong roi , jlong processingOptions , jlong spacingOptions )
{
int rv = imaqTrainChars ( ( const Image * ) image , ( CharSet * ) set , ( int ) index , ( const char * ) charValue , ( const ROI * ) roi , ( const OCRProcessingOptions * ) processingOptions , ( const OCRSpacingOptions * ) spacingOptions ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-11 22:19:08 -08:00
/* J: VerifyTextResult imaqVerifyText(Image image, CharSet set, String expectedString, ROI roi)
* JN : long imaqVerifyText ( long image , long set , long expectedString , long roi , long numScores )
* C : int * imaqVerifyText ( const Image * image , const CharSet * set , const char * expectedString , const ROI * roi , int * numScores )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqVerifyText ( JNIEnv * env , jclass , jlong image , jlong set , jlong expectedString , jlong roi , jlong numScores )
{
int * rv = imaqVerifyText ( ( const Image * ) image , ( const CharSet * ) set , ( const char * ) expectedString , ( const ROI * ) roi , ( int * ) numScores ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqWriteOCRFile(String fileName, CharSet set, String setDescription, ReadTextOptions readOptions, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions)
* JN : void imaqWriteOCRFile ( long fileName , long set , long setDescription , long readOptions , long processingOptions , long spacingOptions )
* C : int imaqWriteOCRFile ( const char * fileName , const CharSet * set , const char * setDescription , const ReadTextOptions * readOptions , const OCRProcessingOptions * processingOptions , const OCRSpacingOptions * spacingOptions )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteOCRFile ( JNIEnv * env , jclass , jlong fileName , jlong set , jlong setDescription , jlong readOptions , jlong processingOptions , jlong spacingOptions )
{
int rv = imaqWriteOCRFile ( ( const char * ) fileName , ( const CharSet * ) set , ( const char * ) setDescription , ( const ReadTextOptions * ) readOptions , ( const OCRProcessingOptions * ) processingOptions , ( const OCRSpacingOptions * ) spacingOptions ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Geometric Matching functions
*/
/* J: ExtractContourReport imaqExtractContour(Image image, ROI roi, ExtractContourDirection direction, ConnectionConstraint connectionConstraintParams, int numOfConstraints, ExtractContourSelection selection, Image contourImage)
* JN : long imaqExtractContour ( long image , long roi , int direction , long curveParams , long connectionConstraintParams , int numOfConstraints , int selection , long contourImage )
* C : ExtractContourReport * imaqExtractContour ( Image * image , const ROI * roi , ExtractContourDirection direction , CurveParameters * curveParams , const ConnectionConstraint * connectionConstraintParams , unsigned int numOfConstraints , ExtractContourSelection selection , Image * contourImage )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqExtractContour ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jlong curveParams , jlong connectionConstraintParams , jint numOfConstraints , jint selection , jlong contourImage )
{
ExtractContourReport * rv = imaqExtractContour ( ( Image * ) image , ( const ROI * ) roi , ( ExtractContourDirection ) direction , ( CurveParameters * ) curveParams , ( const ConnectionConstraint * ) connectionConstraintParams , ( unsigned int ) numOfConstraints , ( ExtractContourSelection ) selection , ( Image * ) contourImage ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqContourOverlay(Image image, Image contourImage, ContourOverlaySettings pointsSettings, ContourOverlaySettings eqnSettings, String groupName)
* JN : void imaqContourOverlay ( long image , long contourImage , long pointsSettings , long eqnSettings , long groupName )
* C : int imaqContourOverlay ( Image * image , const Image * contourImage , const ContourOverlaySettings * pointsSettings , const ContourOverlaySettings * eqnSettings , const char * groupName )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqContourOverlay ( JNIEnv * env , jclass , jlong image , jlong contourImage , jlong pointsSettings , jlong eqnSettings , jlong groupName )
{
int rv = imaqContourOverlay ( ( Image * ) image , ( const Image * ) contourImage , ( const ContourOverlaySettings * ) pointsSettings , ( const ContourOverlaySettings * ) eqnSettings , ( const char * ) groupName ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ContourComputeCurvatureReport imaqContourComputeCurvature(Image contourImage, int kernel)
* JN : long imaqContourComputeCurvature ( long contourImage , int kernel )
* C : ContourComputeCurvatureReport * imaqContourComputeCurvature ( const Image * contourImage , unsigned int kernel )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourComputeCurvature ( JNIEnv * env , jclass , jlong contourImage , jint kernel )
{
ContourComputeCurvatureReport * rv = imaqContourComputeCurvature ( ( const Image * ) contourImage , ( unsigned int ) kernel ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: CurvatureAnalysisReport imaqContourClassifyCurvature(Image contourImage, int kernel, RangeLabel[] curvatureClasses)
* JN : long imaqContourClassifyCurvature ( long contourImage , int kernel , long curvatureClasses , int numCurvatureClasses )
* C : CurvatureAnalysisReport * imaqContourClassifyCurvature ( const Image * contourImage , unsigned int kernel , RangeLabel * curvatureClasses , unsigned int numCurvatureClasses )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourClassifyCurvature ( JNIEnv * env , jclass , jlong contourImage , jint kernel , jlong curvatureClasses , jint numCurvatureClasses )
{
CurvatureAnalysisReport * rv = imaqContourClassifyCurvature ( ( const Image * ) contourImage , ( unsigned int ) kernel , ( RangeLabel * ) curvatureClasses , ( unsigned int ) numCurvatureClasses ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ComputeDistancesReport imaqContourComputeDistances(Image targetImage, Image templateImage, SetupMatchPatternData matchSetupData, int smoothingKernel)
* JN : long imaqContourComputeDistances ( long targetImage , long templateImage , long matchSetupData , int smoothingKernel )
* C : ComputeDistancesReport * imaqContourComputeDistances ( const Image * targetImage , const Image * templateImage , const SetupMatchPatternData * matchSetupData , unsigned int smoothingKernel )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourComputeDistances ( JNIEnv * env , jclass , jlong targetImage , jlong templateImage , jlong matchSetupData , jint smoothingKernel )
{
ComputeDistancesReport * rv = imaqContourComputeDistances ( ( const Image * ) targetImage , ( const Image * ) templateImage , ( const SetupMatchPatternData * ) matchSetupData , ( unsigned int ) smoothingKernel ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ClassifyDistancesReport imaqContourClassifyDistances(Image targetImage, Image templateImage, SetupMatchPatternData matchSetupData, int smoothingKernel, RangeLabel[] distanceRanges)
* JN : long imaqContourClassifyDistances ( long targetImage , long templateImage , long matchSetupData , int smoothingKernel , long distanceRanges , int numDistanceRanges )
* C : ClassifyDistancesReport * imaqContourClassifyDistances ( const Image * targetImage , const Image * templateImage , const SetupMatchPatternData * matchSetupData , unsigned int smoothingKernel , const RangeLabel * distanceRanges , unsigned int numDistanceRanges )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourClassifyDistances ( JNIEnv * env , jclass , jlong targetImage , jlong templateImage , jlong matchSetupData , jint smoothingKernel , jlong distanceRanges , jint numDistanceRanges )
{
ClassifyDistancesReport * rv = imaqContourClassifyDistances ( ( const Image * ) targetImage , ( const Image * ) templateImage , ( const SetupMatchPatternData * ) matchSetupData , ( unsigned int ) smoothingKernel , ( const RangeLabel * ) distanceRanges , ( unsigned int ) numDistanceRanges ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ContourInfoReport imaqContourInfo(Image contourImage)
* JN : long imaqContourInfo ( long contourImage )
* C : ContourInfoReport * imaqContourInfo ( const Image * contourImage )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourInfo ( JNIEnv * env , jclass , jlong contourImage )
{
ContourInfoReport * rv = imaqContourInfo ( ( const Image * ) contourImage ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: SetupMatchPatternData imaqContourSetupMatchPattern(int enableSubPixelAccuracy, int useLearnCurveParameters, RangeSettingDouble[] rangeSettings)
* JN : long imaqContourSetupMatchPattern ( long matchMode , int enableSubPixelAccuracy , long curveParams , int useLearnCurveParameters , long rangeSettings , int numRangeSettings )
* C : SetupMatchPatternData * imaqContourSetupMatchPattern ( MatchMode * matchMode , unsigned int enableSubPixelAccuracy , CurveParameters * curveParams , unsigned int useLearnCurveParameters , const RangeSettingDouble * rangeSettings , unsigned int numRangeSettings )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourSetupMatchPattern ( JNIEnv * env , jclass , jlong matchMode , jint enableSubPixelAccuracy , jlong curveParams , jint useLearnCurveParameters , jlong rangeSettings , jint numRangeSettings )
{
SetupMatchPatternData * rv = imaqContourSetupMatchPattern ( ( MatchMode * ) matchMode , ( unsigned int ) enableSubPixelAccuracy , ( CurveParameters * ) curveParams , ( unsigned int ) useLearnCurveParameters , ( const RangeSettingDouble * ) rangeSettings , ( unsigned int ) numRangeSettings ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqContourAdvancedSetupMatchPattern(GeometricAdvancedSetupDataOption[] geometricOptions)
* JN : void imaqContourAdvancedSetupMatchPattern ( long matchSetupData , long geometricOptions , int numGeometricOptions )
2014-12-09 00:48:57 -08:00
* C : int imaqContourAdvancedSetupMatchPattern ( SetupMatchPatternData * matchSetupData , GeometricAdvancedSetupDataOption * geometricOptions , unsigned int numGeometricOptions )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqContourAdvancedSetupMatchPattern ( JNIEnv * env , jclass , jlong matchSetupData , jlong geometricOptions , jint numGeometricOptions )
2014-12-09 00:48:57 -08:00
{
int rv = imaqContourAdvancedSetupMatchPattern ( ( SetupMatchPatternData * ) matchSetupData , ( GeometricAdvancedSetupDataOption * ) geometricOptions , ( unsigned int ) numGeometricOptions ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ContourFitLineReport imaqContourFitLine(Image image, double pixelRadius)
* JN : long imaqContourFitLine ( long image , double pixelRadius )
* C : ContourFitLineReport * imaqContourFitLine ( Image * image , double pixelRadius )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourFitLine ( JNIEnv * env , jclass , jlong image , jdouble pixelRadius )
{
ContourFitLineReport * rv = imaqContourFitLine ( ( Image * ) image , ( double ) pixelRadius ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: PartialCircle imaqContourFitCircle(Image image, double pixelRadius, int rejectOutliers)
* JN : long imaqContourFitCircle ( long image , double pixelRadius , int rejectOutliers )
* C : PartialCircle * imaqContourFitCircle ( Image * image , double pixelRadius , int rejectOutliers )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourFitCircle ( JNIEnv * env , jclass , jlong image , jdouble pixelRadius , jint rejectOutliers )
{
PartialCircle * rv = imaqContourFitCircle ( ( Image * ) image , ( double ) pixelRadius , ( int ) rejectOutliers ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: PartialEllipse imaqContourFitEllipse(Image image, double pixelRadius, int rejectOutliers)
* JN : long imaqContourFitEllipse ( long image , double pixelRadius , int rejectOutliers )
* C : PartialEllipse * imaqContourFitEllipse ( Image * image , double pixelRadius , int rejectOutliers )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourFitEllipse ( JNIEnv * env , jclass , jlong image , jdouble pixelRadius , jint rejectOutliers )
{
PartialEllipse * rv = imaqContourFitEllipse ( ( Image * ) image , ( double ) pixelRadius , ( int ) rejectOutliers ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ContourFitSplineReport imaqContourFitSpline(Image image, int degree, int numberOfControlPoints)
* JN : long imaqContourFitSpline ( long image , int degree , int numberOfControlPoints )
* C : ContourFitSplineReport * imaqContourFitSpline ( Image * image , int degree , int numberOfControlPoints )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourFitSpline ( JNIEnv * env , jclass , jlong image , jint degree , jint numberOfControlPoints )
{
ContourFitSplineReport * rv = imaqContourFitSpline ( ( Image * ) image , ( int ) degree , ( int ) numberOfControlPoints ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ContourFitPolynomialReport imaqContourFitPolynomial(Image image, int order)
* JN : long imaqContourFitPolynomial ( long image , int order )
* C : ContourFitPolynomialReport * imaqContourFitPolynomial ( Image * image , int order )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqContourFitPolynomial ( JNIEnv * env , jclass , jlong image , jint order )
{
ContourFitPolynomialReport * rv = imaqContourFitPolynomial ( ( Image * ) image , ( int ) order ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Edge Detection functions
*/
/* J: FindCircularEdgeReport imaqFindCircularEdge2(Image image, ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem, FindCircularEdgeOptions edgeOptions, CircleFitOptions circleFitOptions)
* JN : long imaqFindCircularEdge2 ( long image , long roi , long baseSystem , long newSystem , long edgeOptions , long circleFitOptions )
* C : FindCircularEdgeReport * imaqFindCircularEdge2 ( Image * image , const ROI * roi , const CoordinateSystem * baseSystem , const CoordinateSystem * newSystem , const FindCircularEdgeOptions * edgeOptions , const CircleFitOptions * circleFitOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFindCircularEdge2 ( JNIEnv * env , jclass , jlong image , jlong roi , jlong baseSystem , jlong newSystem , jlong edgeOptions , jlong circleFitOptions )
{
FindCircularEdgeReport * rv = imaqFindCircularEdge2 ( ( Image * ) image , ( const ROI * ) roi , ( const CoordinateSystem * ) baseSystem , ( const CoordinateSystem * ) newSystem , ( const FindCircularEdgeOptions * ) edgeOptions , ( const CircleFitOptions * ) circleFitOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: FindConcentricEdgeReport imaqFindConcentricEdge2(Image image, ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem, FindConcentricEdgeOptions edgeOptions, ConcentricEdgeFitOptions concentricEdgeFitOptions)
* JN : long imaqFindConcentricEdge2 ( long image , long roi , long baseSystem , long newSystem , long edgeOptions , long concentricEdgeFitOptions )
* C : FindConcentricEdgeReport * imaqFindConcentricEdge2 ( Image * image , const ROI * roi , const CoordinateSystem * baseSystem , const CoordinateSystem * newSystem , const FindConcentricEdgeOptions * edgeOptions , const ConcentricEdgeFitOptions * concentricEdgeFitOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqFindConcentricEdge2 ( JNIEnv * env , jclass , jlong image , jlong roi , jlong baseSystem , jlong newSystem , jlong edgeOptions , jlong concentricEdgeFitOptions )
{
FindConcentricEdgeReport * rv = imaqFindConcentricEdge2 ( ( Image * ) image , ( const ROI * ) roi , ( const CoordinateSystem * ) baseSystem , ( const CoordinateSystem * ) newSystem , ( const FindConcentricEdgeOptions * ) edgeOptions , ( const ConcentricEdgeFitOptions * ) concentricEdgeFitOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Morphology Reconstruction functions
*/
/* J: void imaqGrayMorphologyReconstruct(Image dstImage, Image srcImage, Image markerImage, PointFloat[] points, MorphologyReconstructOperation operation, StructuringElement structuringElement, ROI roi)
* JN : void imaqGrayMorphologyReconstruct ( long dstImage , long srcImage , long markerImage , long points , int numOfPoints , int operation , long structuringElement , long roi )
* C : int imaqGrayMorphologyReconstruct ( Image * dstImage , Image * srcImage , const Image * markerImage , PointFloat * points , int numOfPoints , MorphologyReconstructOperation operation , const StructuringElement * structuringElement , const ROI * roi )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGrayMorphologyReconstruct ( JNIEnv * env , jclass , jlong dstImage , jlong srcImage , jlong markerImage , jlong points , jint numOfPoints , jint operation , jlong structuringElement , jlong roi )
{
int rv = imaqGrayMorphologyReconstruct ( ( Image * ) dstImage , ( Image * ) srcImage , ( const Image * ) markerImage , ( PointFloat * ) points , ( int ) numOfPoints , ( MorphologyReconstructOperation ) operation , ( const StructuringElement * ) structuringElement , ( const ROI * ) roi ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqMorphologyReconstruct(Image dstImage, Image srcImage, Image markerImage, PointFloat[] points, MorphologyReconstructOperation operation, Connectivity connectivity, ROI roi)
* JN : void imaqMorphologyReconstruct ( long dstImage , long srcImage , long markerImage , long points , int numOfPoints , int operation , int connectivity , long roi )
* C : int imaqMorphologyReconstruct ( Image * dstImage , Image * srcImage , const Image * markerImage , PointFloat * points , int numOfPoints , MorphologyReconstructOperation operation , Connectivity connectivity , const ROI * roi )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqMorphologyReconstruct ( JNIEnv * env , jclass , jlong dstImage , jlong srcImage , jlong markerImage , jlong points , jint numOfPoints , jint operation , jint connectivity , jlong roi )
{
int rv = imaqMorphologyReconstruct ( ( Image * ) dstImage , ( Image * ) srcImage , ( const Image * ) markerImage , ( PointFloat * ) points , ( int ) numOfPoints , ( MorphologyReconstructOperation ) operation , ( Connectivity ) connectivity , ( const ROI * ) roi ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Texture functions
*/
/* J: void imaqDetectTextureDefect(ClassifierSession session, Image destImage, Image srcImage, ROI roi, int initialStepSize, int finalStepSize, short defectPixelValue, double minClassificationScore)
* JN : void imaqDetectTextureDefect ( long session , long destImage , long srcImage , long roi , int initialStepSize , int finalStepSize , short defectPixelValue , double minClassificationScore )
* C : int imaqDetectTextureDefect ( ClassifierSession * session , Image * destImage , const Image * srcImage , const ROI * roi , int initialStepSize , int finalStepSize , unsigned char defectPixelValue , double minClassificationScore )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDetectTextureDefect ( JNIEnv * env , jclass , jlong session , jlong destImage , jlong srcImage , jlong roi , jint initialStepSize , jint finalStepSize , jshort defectPixelValue , jdouble minClassificationScore )
{
int rv = imaqDetectTextureDefect ( ( ClassifierSession * ) session , ( Image * ) destImage , ( const Image * ) srcImage , ( const ROI * ) roi , ( int ) initialStepSize , ( int ) finalStepSize , ( unsigned char ) defectPixelValue , ( double ) minClassificationScore ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Regions of Interest Manipulation functions
*/
/* J: ROI imaqMaskToROI(Image mask)
* JN : long imaqMaskToROI ( long mask , long withinLimit )
* C : ROI * imaqMaskToROI ( const Image * mask , int * withinLimit )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMaskToROI ( JNIEnv * env , jclass , jlong mask , jlong withinLimit )
{
ROI * rv = imaqMaskToROI ( ( const Image * ) mask , ( int * ) withinLimit ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ROIProfile imaqROIProfile(Image image, ROI roi)
* JN : long imaqROIProfile ( long image , long roi )
* C : ROIProfile * imaqROIProfile ( const Image * image , const ROI * roi )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqROIProfile ( JNIEnv * env , jclass , jlong image , jlong roi )
{
ROIProfile * rv = imaqROIProfile ( ( const Image * ) image , ( const ROI * ) roi ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqROIToMask(Image mask, ROI roi, int fillValue, Image imageModel)
* JN : void imaqROIToMask ( long mask , long roi , int fillValue , long imageModel , long inSpace )
2014-12-09 00:48:57 -08:00
* C : int imaqROIToMask ( Image * mask , const ROI * roi , int fillValue , const Image * imageModel , int * inSpace )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqROIToMask ( JNIEnv * env , jclass , jlong mask , jlong roi , jint fillValue , jlong imageModel , jlong inSpace )
2014-12-09 00:48:57 -08:00
{
int rv = imaqROIToMask ( ( Image * ) mask , ( const ROI * ) roi , ( int ) fillValue , ( const Image * ) imageModel , ( int * ) inSpace ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqTransformROI2(ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem)
* JN : void imaqTransformROI2 ( long roi , long baseSystem , long newSystem )
* C : int imaqTransformROI2 ( ROI * roi , const CoordinateSystem * baseSystem , const CoordinateSystem * newSystem )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqTransformROI2 ( JNIEnv * env , jclass , jlong roi , jlong baseSystem , jlong newSystem )
{
int rv = imaqTransformROI2 ( ( ROI * ) roi , ( const CoordinateSystem * ) baseSystem , ( const CoordinateSystem * ) newSystem ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: LabelToROIReport imaqLabelToROI(Image image, int[] labelsIn, int maxNumVectors, int isExternelEdges)
* JN : long imaqLabelToROI ( long image , long labelsIn , int numLabelsIn , int maxNumVectors , int isExternelEdges )
* C : LabelToROIReport * imaqLabelToROI ( const Image * image , const unsigned int * labelsIn , unsigned int numLabelsIn , int maxNumVectors , int isExternelEdges )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLabelToROI ( JNIEnv * env , jclass , jlong image , jlong labelsIn , jint numLabelsIn , jint maxNumVectors , jint isExternelEdges )
{
LabelToROIReport * rv = imaqLabelToROI ( ( const Image * ) image , ( const unsigned int * ) labelsIn , ( unsigned int ) numLabelsIn , ( int ) maxNumVectors , ( int ) isExternelEdges ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Morphology functions
*/
/* J: void imaqGrayMorphology(Image dest, Image source, MorphologyMethod method, StructuringElement structuringElement)
* JN : void imaqGrayMorphology ( long dest , long source , int method , long structuringElement )
* C : int imaqGrayMorphology ( Image * dest , Image * source , MorphologyMethod method , const StructuringElement * structuringElement )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGrayMorphology ( JNIEnv * env , jclass , jlong dest , jlong source , jint method , jlong structuringElement )
{
int rv = imaqGrayMorphology ( ( Image * ) dest , ( Image * ) source , ( MorphologyMethod ) method , ( const StructuringElement * ) structuringElement ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Classification functions
*/
/* J: void imaqAddClassifierSample(Image image, ClassifierSession session, ROI roi, String sampleClass, double[] featureVector)
* JN : void imaqAddClassifierSample ( long image , long session , long roi , long sampleClass , long featureVector , int vectorSize )
* C : int imaqAddClassifierSample ( Image * image , ClassifierSession * session , const ROI * roi , const char * sampleClass , double * featureVector , unsigned int vectorSize )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqAddClassifierSample ( JNIEnv * env , jclass , jlong image , jlong session , jlong roi , jlong sampleClass , jlong featureVector , jint vectorSize )
{
int rv = imaqAddClassifierSample ( ( Image * ) image , ( ClassifierSession * ) session , ( const ROI * ) roi , ( const char * ) sampleClass , ( double * ) featureVector , ( unsigned int ) vectorSize ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ClassifierReportAdvanced imaqAdvanceClassify(Image image, ClassifierSession session, ROI roi, double[] featureVector)
* JN : long imaqAdvanceClassify ( long image , long session , long roi , long featureVector , int vectorSize )
* C : ClassifierReportAdvanced * imaqAdvanceClassify ( Image * image , const ClassifierSession * session , const ROI * roi , double * featureVector , unsigned int vectorSize )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqAdvanceClassify ( JNIEnv * env , jclass , jlong image , jlong session , jlong roi , jlong featureVector , jint vectorSize )
{
ClassifierReportAdvanced * rv = imaqAdvanceClassify ( ( Image * ) image , ( const ClassifierSession * ) session , ( const ROI * ) roi , ( double * ) featureVector , ( unsigned int ) vectorSize ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ClassifierReport imaqClassify(Image image, ClassifierSession session, ROI roi, double[] featureVector)
* JN : long imaqClassify ( long image , long session , long roi , long featureVector , int vectorSize )
* C : ClassifierReport * imaqClassify ( Image * image , const ClassifierSession * session , const ROI * roi , double * featureVector , unsigned int vectorSize )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqClassify ( JNIEnv * env , jclass , jlong image , jlong session , jlong roi , jlong featureVector , jint vectorSize )
{
ClassifierReport * rv = imaqClassify ( ( Image * ) image , ( const ClassifierSession * ) session , ( const ROI * ) roi , ( double * ) featureVector , ( unsigned int ) vectorSize ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ClassifierSession imaqCreateClassifier(ClassifierType type)
* JN : long imaqCreateClassifier ( int type )
* C : ClassifierSession * imaqCreateClassifier ( ClassifierType type )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateClassifier ( JNIEnv * env , jclass , jint type )
{
ClassifierSession * rv = imaqCreateClassifier ( ( ClassifierType ) type ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqDeleteClassifierSample(ClassifierSession session, int index)
* JN : void imaqDeleteClassifierSample ( long session , int index )
* C : int imaqDeleteClassifierSample ( ClassifierSession * session , int index )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDeleteClassifierSample ( JNIEnv * env , jclass , jlong session , jint index )
{
int rv = imaqDeleteClassifierSample ( ( ClassifierSession * ) session , ( int ) index ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ClassifierAccuracyReport imaqGetClassifierAccuracy(ClassifierSession session)
* JN : long imaqGetClassifierAccuracy ( long session )
* C : ClassifierAccuracyReport * imaqGetClassifierAccuracy ( const ClassifierSession * session )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetClassifierAccuracy ( JNIEnv * env , jclass , jlong session )
{
ClassifierAccuracyReport * rv = imaqGetClassifierAccuracy ( ( const ClassifierSession * ) session ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ClassifierSampleInfo imaqGetClassifierSampleInfo(ClassifierSession session, int index)
* JN : long imaqGetClassifierSampleInfo ( long session , int index , long numSamples )
* C : ClassifierSampleInfo * imaqGetClassifierSampleInfo ( const ClassifierSession * session , int index , int * numSamples )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetClassifierSampleInfo ( JNIEnv * env , jclass , jlong session , jint index , jlong numSamples )
{
ClassifierSampleInfo * rv = imaqGetClassifierSampleInfo ( ( const ClassifierSession * ) session , ( int ) index , ( int * ) numSamples ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetColorClassifierOptions(ClassifierSession session)
* JN : void imaqGetColorClassifierOptions ( long session , long options )
2014-12-09 00:48:57 -08:00
* C : int imaqGetColorClassifierOptions ( const ClassifierSession * session , ColorOptions * options )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetColorClassifierOptions ( JNIEnv * env , jclass , jlong session , jlong options )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetColorClassifierOptions ( ( const ClassifierSession * ) session , ( ColorOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqGetNearestNeighborOptions(ClassifierSession session)
* JN : void imaqGetNearestNeighborOptions ( long session , long options )
2014-12-09 00:48:57 -08:00
* C : int imaqGetNearestNeighborOptions ( const ClassifierSession * session , NearestNeighborOptions * options )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetNearestNeighborOptions ( JNIEnv * env , jclass , jlong session , jlong options )
2014-12-09 00:48:57 -08:00
{
int rv = imaqGetNearestNeighborOptions ( ( const ClassifierSession * ) session , ( NearestNeighborOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetParticleClassifierOptions2(ClassifierSession session)
* JN : void imaqGetParticleClassifierOptions2 ( long session , long preprocessingOptions , long options )
* C : int imaqGetParticleClassifierOptions2 ( const ClassifierSession * session , ParticleClassifierPreprocessingOptions2 * preprocessingOptions , ParticleClassifierOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetParticleClassifierOptions2 ( JNIEnv * env , jclass , jlong session , jlong preprocessingOptions , jlong options )
{
int rv = imaqGetParticleClassifierOptions2 ( ( const ClassifierSession * ) session , ( ParticleClassifierPreprocessingOptions2 * ) preprocessingOptions , ( ParticleClassifierOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ClassifierSession imaqReadClassifierFile(ClassifierSession session, String fileName, ReadClassifierFileMode mode, String description)
* JN : long imaqReadClassifierFile ( long session , long fileName , int mode , long type , long engine , long description )
* C : ClassifierSession * imaqReadClassifierFile ( ClassifierSession * session , const char * fileName , ReadClassifierFileMode mode , ClassifierType * type , ClassifierEngineType * engine , String255 description )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadClassifierFile ( JNIEnv * env , jclass , jlong session , jlong fileName , jint mode , jlong type , jlong engine , jlong description )
{
ClassifierSession * rv = imaqReadClassifierFile ( ( ClassifierSession * ) session , ( const char * ) fileName , ( ReadClassifierFileMode ) mode , ( ClassifierType * ) type , ( ClassifierEngineType * ) engine , ( char * ) description ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqRelabelClassifierSample(ClassifierSession session, int index, String newClass)
* JN : void imaqRelabelClassifierSample ( long session , int index , long newClass )
* C : int imaqRelabelClassifierSample ( ClassifierSession * session , int index , const char * newClass )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqRelabelClassifierSample ( JNIEnv * env , jclass , jlong session , jint index , jlong newClass )
{
int rv = imaqRelabelClassifierSample ( ( ClassifierSession * ) session , ( int ) index , ( const char * ) newClass ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetParticleClassifierOptions2(ClassifierSession session, ParticleClassifierPreprocessingOptions2 preprocessingOptions, ParticleClassifierOptions options)
* JN : void imaqSetParticleClassifierOptions2 ( long session , long preprocessingOptions , long options )
* C : int imaqSetParticleClassifierOptions2 ( ClassifierSession * session , const ParticleClassifierPreprocessingOptions2 * preprocessingOptions , const ParticleClassifierOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetParticleClassifierOptions2 ( JNIEnv * env , jclass , jlong session , jlong preprocessingOptions , jlong options )
{
int rv = imaqSetParticleClassifierOptions2 ( ( ClassifierSession * ) session , ( const ParticleClassifierPreprocessingOptions2 * ) preprocessingOptions , ( const ParticleClassifierOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSetColorClassifierOptions(ClassifierSession session, ColorOptions options)
* JN : void imaqSetColorClassifierOptions ( long session , long options )
* C : int imaqSetColorClassifierOptions ( ClassifierSession * session , const ColorOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetColorClassifierOptions ( JNIEnv * env , jclass , jlong session , jlong options )
{
int rv = imaqSetColorClassifierOptions ( ( ClassifierSession * ) session , ( const ColorOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: NearestNeighborTrainingReport imaqTrainNearestNeighborClassifier(ClassifierSession session, NearestNeighborOptions options)
* JN : long imaqTrainNearestNeighborClassifier ( long session , long options )
* C : NearestNeighborTrainingReport * imaqTrainNearestNeighborClassifier ( ClassifierSession * session , const NearestNeighborOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqTrainNearestNeighborClassifier ( JNIEnv * env , jclass , jlong session , jlong options )
{
NearestNeighborTrainingReport * rv = imaqTrainNearestNeighborClassifier ( ( ClassifierSession * ) session , ( const NearestNeighborOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqWriteClassifierFile(ClassifierSession session, String fileName, WriteClassifierFileMode mode, String description)
* JN : void imaqWriteClassifierFile ( long session , long fileName , int mode , long description )
* C : int imaqWriteClassifierFile ( const ClassifierSession * session , const char * fileName , WriteClassifierFileMode mode , const String255 description )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWriteClassifierFile ( JNIEnv * env , jclass , jlong session , jlong fileName , jint mode , jlong description )
{
int rv = imaqWriteClassifierFile ( ( const ClassifierSession * ) session , ( const char * ) fileName , ( WriteClassifierFileMode ) mode , ( char * ) description ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Measure Distances functions
*/
/* J: ClampMax2Report imaqClampMax2(Image image, ROI roi, CoordinateSystem baseSystem, CoordinateSystem newSystem, CurveOptions curveSettings, ClampSettings clampSettings, ClampOverlaySettings clampOverlaySettings)
* JN : long imaqClampMax2 ( long image , long roi , long baseSystem , long newSystem , long curveSettings , long clampSettings , long clampOverlaySettings )
* C : ClampMax2Report * imaqClampMax2 ( Image * image , const ROI * roi , const CoordinateSystem * baseSystem , const CoordinateSystem * newSystem , const CurveOptions * curveSettings , const ClampSettings * clampSettings , const ClampOverlaySettings * clampOverlaySettings )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqClampMax2 ( JNIEnv * env , jclass , jlong image , jlong roi , jlong baseSystem , jlong newSystem , jlong curveSettings , jlong clampSettings , jlong clampOverlaySettings )
{
ClampMax2Report * rv = imaqClampMax2 ( ( Image * ) image , ( const ROI * ) roi , ( const CoordinateSystem * ) baseSystem , ( const CoordinateSystem * ) newSystem , ( const CurveOptions * ) curveSettings , ( const ClampSettings * ) clampSettings , ( const ClampOverlaySettings * ) clampOverlaySettings ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/*
* Inspection functions
*/
/* J: void imaqCompareGoldenTemplate(Image image, Image goldenTemplate, Image brightDefects, Image darkDefects, InspectionAlignment alignment, InspectionOptions options)
* JN : void imaqCompareGoldenTemplate ( long image , long goldenTemplate , long brightDefects , long darkDefects , long alignment , long options )
* C : int imaqCompareGoldenTemplate ( const Image * image , const Image * goldenTemplate , Image * brightDefects , Image * darkDefects , const InspectionAlignment * alignment , const InspectionOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCompareGoldenTemplate ( JNIEnv * env , jclass , jlong image , jlong goldenTemplate , jlong brightDefects , jlong darkDefects , jlong alignment , jlong options )
{
int rv = imaqCompareGoldenTemplate ( ( const Image * ) image , ( const Image * ) goldenTemplate , ( Image * ) brightDefects , ( Image * ) darkDefects , ( const InspectionAlignment * ) alignment , ( const InspectionOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqLearnGoldenTemplate(Image goldenTemplate, PointFloat originOffset, Image mask)
* JN : void imaqLearnGoldenTemplate ( long goldenTemplate , long originOffset , long mask )
* C : int imaqLearnGoldenTemplate ( Image * goldenTemplate , PointFloat originOffset , const Image * mask )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnGoldenTemplate ( JNIEnv * env , jclass , jlong goldenTemplate , jlong originOffset , jlong mask )
{
int rv = imaqLearnGoldenTemplate ( ( Image * ) goldenTemplate , * ( ( PointFloat * ) originOffset ) , ( const Image * ) mask ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/*
* Obsolete functions
*/
/* J: void imaqWritePNGFile(Image image, String fileName, int compressionSpeed, RGBValue colorTable)
* JN : void imaqWritePNGFile ( long image , long fileName , int compressionSpeed , long colorTable )
* C : int imaqWritePNGFile ( const Image * image , const char * fileName , unsigned int compressionSpeed , const RGBValue * colorTable )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqWritePNGFile ( JNIEnv * env , jclass , jlong image , jlong fileName , jint compressionSpeed , jlong colorTable )
{
int rv = imaqWritePNGFile ( ( const Image * ) image , ( const char * ) fileName , ( unsigned int ) compressionSpeed , ( const RGBValue * ) colorTable ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: SelectParticlesResult imaqSelectParticles(Image image, ParticleReport reports, int reportCount, int rejectBorder, SelectParticleCriteria criteria, int criteriaCount)
* JN : long imaqSelectParticles ( long image , long reports , int reportCount , int rejectBorder , long criteria , int criteriaCount , long selectedCount )
* C : ParticleReport * imaqSelectParticles ( const Image * image , const ParticleReport * reports , int reportCount , int rejectBorder , const SelectParticleCriteria * criteria , int criteriaCount , int * selectedCount )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSelectParticles ( JNIEnv * env , jclass , jlong image , jlong reports , jint reportCount , jint rejectBorder , jlong criteria , jint criteriaCount , jlong selectedCount )
{
ParticleReport * rv = imaqSelectParticles ( ( const Image * ) image , ( const ParticleReport * ) reports , ( int ) reportCount , ( int ) rejectBorder , ( const SelectParticleCriteria * ) criteria , ( int ) criteriaCount , ( int * ) selectedCount ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqParticleFilter(Image dest, Image source, ParticleFilterCriteria criteria, int criteriaCount, int rejectMatches, int connectivity8)
* JN : void imaqParticleFilter ( long dest , long source , long criteria , int criteriaCount , int rejectMatches , int connectivity8 )
* C : int imaqParticleFilter ( Image * dest , Image * source , const ParticleFilterCriteria * criteria , int criteriaCount , int rejectMatches , int connectivity8 )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqParticleFilter ( JNIEnv * env , jclass , jlong dest , jlong source , jlong criteria , jint criteriaCount , jint rejectMatches , jint connectivity8 )
{
int rv = imaqParticleFilter ( ( Image * ) dest , ( Image * ) source , ( const ParticleFilterCriteria * ) criteria , ( int ) criteriaCount , ( int ) rejectMatches , ( int ) connectivity8 ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: GetParticleInfoResult imaqGetParticleInfo(Image image, int connectivity8, ParticleInfoMode mode)
* JN : long imaqGetParticleInfo ( long image , int connectivity8 , int mode , long reportCount )
* C : ParticleReport * imaqGetParticleInfo ( Image * image , int connectivity8 , ParticleInfoMode mode , int * reportCount )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetParticleInfo ( JNIEnv * env , jclass , jlong image , jint connectivity8 , jint mode , jlong reportCount )
{
ParticleReport * rv = imaqGetParticleInfo ( ( Image * ) image , ( int ) connectivity8 , ( ParticleInfoMode ) mode , ( int * ) reportCount ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqCalcCoeff(Image image, ParticleReport report, MeasurementValue parameter)
* JN : void imaqCalcCoeff ( long image , long report , int parameter , long coefficient )
2014-12-09 00:48:57 -08:00
* C : int imaqCalcCoeff ( const Image * image , const ParticleReport * report , MeasurementValue parameter , float * coefficient )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCalcCoeff ( JNIEnv * env , jclass , jlong image , jlong report , jint parameter , jlong coefficient )
2014-12-09 00:48:57 -08:00
{
int rv = imaqCalcCoeff ( ( const Image * ) image , ( const ParticleReport * ) report , ( MeasurementValue ) parameter , ( float * ) coefficient ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: EdgeToolResult imaqEdgeTool(Image image, Point points, int numPoints, EdgeOptions options)
* JN : long imaqEdgeTool ( long image , long points , int numPoints , long options , long numEdges )
* C : EdgeReport * imaqEdgeTool ( const Image * image , const Point * points , int numPoints , const EdgeOptions * options , int * numEdges )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEdgeTool ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jlong options , jlong numEdges )
{
EdgeReport * rv = imaqEdgeTool ( ( const Image * ) image , ( const Point * ) points , ( int ) numPoints , ( const EdgeOptions * ) options , ( int * ) numEdges ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: CirclesResult imaqCircles(Image dest, Image source, float minRadius, float maxRadius)
* JN : long imaqCircles ( long dest , long source , float minRadius , float maxRadius , long numCircles )
* C : CircleReport * imaqCircles ( Image * dest , const Image * source , float minRadius , float maxRadius , int * numCircles )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCircles ( JNIEnv * env , jclass , jlong dest , jlong source , jfloat minRadius , jfloat maxRadius , jlong numCircles )
{
CircleReport * rv = imaqCircles ( ( Image * ) dest , ( const Image * ) source , ( float ) minRadius , ( float ) maxRadius , ( int * ) numCircles ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqLabel(Image dest, Image source, int connectivity8)
* JN : void imaqLabel ( long dest , long source , int connectivity8 , long particleCount )
2014-12-09 00:48:57 -08:00
* C : int imaqLabel ( Image * dest , Image * source , int connectivity8 , int * particleCount )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLabel ( JNIEnv * env , jclass , jlong dest , jlong source , jint connectivity8 , jlong particleCount )
2014-12-09 00:48:57 -08:00
{
int rv = imaqLabel ( ( Image * ) dest , ( Image * ) source , ( int ) connectivity8 , ( int * ) particleCount ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqFitEllipse(PointFloat[] points)
* JN : void imaqFitEllipse ( long points , int numPoints , long ellipse )
2014-12-09 00:48:57 -08:00
* C : int imaqFitEllipse ( const PointFloat * points , int numPoints , BestEllipse * ellipse )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFitEllipse ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong ellipse )
2014-12-09 00:48:57 -08:00
{
int rv = imaqFitEllipse ( ( const PointFloat * ) points , ( int ) numPoints , ( BestEllipse * ) ellipse ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqFitCircle(PointFloat[] points)
* JN : void imaqFitCircle ( long points , int numPoints , long circle )
2014-12-09 00:48:57 -08:00
* C : int imaqFitCircle ( const PointFloat * points , int numPoints , BestCircle * circle )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqFitCircle ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong circle )
2014-12-09 00:48:57 -08:00
{
int rv = imaqFitCircle ( ( const PointFloat * ) points , ( int ) numPoints , ( BestCircle * ) circle ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: MatchPatternResult imaqMatchPattern(Image image, Image pattern, MatchPatternOptions options, Rect searchRect)
* JN : long imaqMatchPattern ( long image , long pattern , long options , long searchRect , long numMatches )
* C : PatternMatch * imaqMatchPattern ( const Image * image , Image * pattern , const MatchPatternOptions * options , Rect searchRect , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchPattern ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong options , jlong searchRect , jlong numMatches )
{
PatternMatch * rv = imaqMatchPattern ( ( const Image * ) image , ( Image * ) pattern , ( const MatchPatternOptions * ) options , * ( ( Rect * ) searchRect ) , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqConvex(Image dest, Image source)
* JN : void imaqConvex ( long dest , long source )
* C : int imaqConvex ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConvex ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqConvex ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqIsVisionInfoPresent(Image image, VisionInfoType type)
* JN : void imaqIsVisionInfoPresent ( long image , int type , long present )
2014-12-09 00:48:57 -08:00
* C : int imaqIsVisionInfoPresent ( const Image * image , VisionInfoType type , int * present )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqIsVisionInfoPresent ( JNIEnv * env , jclass , jlong image , jint type , jlong present )
2014-12-09 00:48:57 -08:00
{
int rv = imaqIsVisionInfoPresent ( ( const Image * ) image , ( VisionInfoType ) type , ( int * ) present ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqLineGaugeTool ( const Image * image , Point start , Point end , LineGaugeMethod method , const EdgeOptions * edgeOptions , const CoordinateTransform * reference , float * distance )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
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 ) ;
}
/* J: void imaqBestCircle(PointFloat[] points)
* JN : void imaqBestCircle ( long points , int numPoints , long center , long radius )
* C : int imaqBestCircle ( const PointFloat * points , int numPoints , PointFloat * center , double * radius )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqBestCircle ( JNIEnv * env , jclass , jlong points , jint numPoints , jlong center , jlong radius )
{
int rv = imaqBestCircle ( ( const PointFloat * ) points , ( int ) numPoints , ( PointFloat * ) center , ( double * ) radius ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqSavePattern(Image pattern, String fileName)
* JN : void imaqSavePattern ( long pattern , long fileName )
* C : int imaqSavePattern ( const Image * pattern , const char * fileName )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSavePattern ( JNIEnv * env , jclass , jlong pattern , jlong fileName )
{
int rv = imaqSavePattern ( ( const Image * ) pattern , ( const char * ) fileName ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqLoadPattern(Image pattern, String fileName)
* JN : void imaqLoadPattern ( long pattern , long fileName )
* C : int imaqLoadPattern ( Image * pattern , const char * fileName )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLoadPattern ( JNIEnv * env , jclass , jlong pattern , jlong fileName )
{
int rv = imaqLoadPattern ( ( Image * ) pattern , ( const char * ) fileName ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqTransformROI(ROI roi, Point originStart, float angleStart, Point originFinal, float angleFinal)
* JN : void imaqTransformROI ( long roi , long originStart , float angleStart , long originFinal , float angleFinal )
* C : int imaqTransformROI ( ROI * roi , Point originStart , float angleStart , Point originFinal , float angleFinal )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqTransformROI ( JNIEnv * env , jclass , jlong roi , jlong originStart , jfloat angleStart , jlong originFinal , jfloat angleFinal )
{
int rv = imaqTransformROI ( ( ROI * ) roi , * ( ( Point * ) originStart ) , ( float ) angleStart , * ( ( Point * ) originFinal ) , ( float ) angleFinal ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCoordinateReference(Point points, ReferenceMode mode)
* JN : void imaqCoordinateReference ( long points , int mode , long origin , long angle )
* C : int imaqCoordinateReference ( const Point * points , ReferenceMode mode , Point * origin , float * angle )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCoordinateReference ( JNIEnv * env , jclass , jlong points , jint mode , jlong origin , jlong angle )
{
int rv = imaqCoordinateReference ( ( const Point * ) points , ( ReferenceMode ) mode , ( Point * ) origin , ( float * ) angle ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: ContourInfo imaqGetContourInfo(ROI roi, int id)
* JN : long imaqGetContourInfo ( long roi , int id )
* C : ContourInfo * imaqGetContourInfo ( const ROI * roi , ContourID id )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetContourInfo ( JNIEnv * env , jclass , jlong roi , jint id )
{
ContourInfo * rv = imaqGetContourInfo ( ( const ROI * ) roi , ( ContourID ) id ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqSetWindowOverlay(int windowNumber, Overlay overlay)
* JN : void imaqSetWindowOverlay ( int windowNumber , long overlay )
* C : int imaqSetWindowOverlay ( int windowNumber , const Overlay * overlay )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetWindowOverlay ( JNIEnv * env , jclass , jint windowNumber , jlong overlay )
{
int rv = imaqSetWindowOverlay ( ( int ) windowNumber , ( const Overlay * ) overlay ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: Overlay imaqCreateOverlayFromROI(ROI roi)
* JN : long imaqCreateOverlayFromROI ( long roi )
* C : Overlay * imaqCreateOverlayFromROI ( const ROI * roi )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateOverlayFromROI ( JNIEnv * env , jclass , jlong roi )
{
Overlay * rv = imaqCreateOverlayFromROI ( ( const ROI * ) roi ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-11 22:19:08 -08:00
/* J: Overlay imaqCreateOverlayFromMetafile(RawData metafile)
* JN : long imaqCreateOverlayFromMetafile ( long metafile )
* C : Overlay * imaqCreateOverlayFromMetafile ( const void * metafile )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqCreateOverlayFromMetafile ( JNIEnv * env , jclass , jlong metafile )
{
Overlay * rv = imaqCreateOverlayFromMetafile ( ( const void * ) metafile ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-09 00:48:57 -08:00
/* J: void imaqSetCalibrationInfo(Image image, CalibrationUnit unit, float xDistance, float yDistance)
* JN : void imaqSetCalibrationInfo ( long image , int unit , float xDistance , float yDistance )
* C : int imaqSetCalibrationInfo ( Image * image , CalibrationUnit unit , float xDistance , float yDistance )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetCalibrationInfo ( JNIEnv * env , jclass , jlong image , jint unit , jfloat xDistance , jfloat yDistance )
{
int rv = imaqSetCalibrationInfo ( ( Image * ) image , ( CalibrationUnit ) unit , ( float ) xDistance , ( float ) yDistance ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetCalibrationInfo(Image image)
* JN : void imaqGetCalibrationInfo ( long image , long unit , long xDistance , long yDistance )
* C : int imaqGetCalibrationInfo ( const Image * image , CalibrationUnit * unit , float * xDistance , float * yDistance )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetCalibrationInfo ( JNIEnv * env , jclass , jlong image , jlong unit , jlong xDistance , jlong yDistance )
{
int rv = imaqGetCalibrationInfo ( ( const Image * ) image , ( CalibrationUnit * ) unit , ( float * ) xDistance , ( float * ) yDistance ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqConstructROI ( const Image * image , ROI * roi , Tool initialTool , const ToolWindowOptions * tools , const ConstructROIOptions * options , int * okay )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqConstructROI ( JNIEnv * env , jclass , jlong image , jlong roi , jint initialTool , jlong tools , jlong options , jlong okay )
2014-12-09 00:48:57 -08:00
{
int rv = imaqConstructROI ( ( const Image * ) image , ( ROI * ) roi , ( Tool ) initialTool , ( const ToolWindowOptions * ) tools , ( const ConstructROIOptions * ) options , ( int * ) okay ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetParticleClassifierOptions(ClassifierSession session)
* JN : void imaqGetParticleClassifierOptions ( long session , long preprocessingOptions , long options )
* C : int imaqGetParticleClassifierOptions ( const ClassifierSession * session , ParticleClassifierPreprocessingOptions * preprocessingOptions , ParticleClassifierOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetParticleClassifierOptions ( JNIEnv * env , jclass , jlong session , jlong preprocessingOptions , jlong options )
{
int rv = imaqGetParticleClassifierOptions ( ( const ClassifierSession * ) session , ( ParticleClassifierPreprocessingOptions * ) preprocessingOptions , ( ParticleClassifierOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqZoomWindow(int windowNumber, int xZoom, int yZoom, Point center)
* JN : void imaqZoomWindow ( int windowNumber , int xZoom , int yZoom , long center )
* C : int imaqZoomWindow ( int windowNumber , int xZoom , int yZoom , Point center )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqZoomWindow ( JNIEnv * env , jclass , jint windowNumber , jint xZoom , jint yZoom , jlong center )
{
int rv = imaqZoomWindow ( ( int ) windowNumber , ( int ) xZoom , ( int ) yZoom , * ( ( Point * ) center ) ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqGetWindowZoom(int windowNumber)
* JN : void imaqGetWindowZoom ( int windowNumber , long xZoom , long yZoom )
* C : int imaqGetWindowZoom ( int windowNumber , int * xZoom , int * yZoom )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqGetWindowZoom ( JNIEnv * env , jclass , jint windowNumber , jlong xZoom , jlong yZoom )
{
int rv = imaqGetWindowZoom ( ( int ) windowNumber , ( int * ) xZoom , ( int * ) yZoom ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqParticleFilter3 ( Image * dest , Image * source , const ParticleFilterCriteria2 * criteria , int criteriaCount , const ParticleFilterOptions * options , const ROI * roi , int * numParticles )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
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 ) ;
}
/* J: ReadTextReport2 imaqReadText2(Image image, CharSet set, ROI roi, ReadTextOptions readOptions, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions)
* JN : long imaqReadText2 ( long image , long set , long roi , long readOptions , long processingOptions , long spacingOptions )
* C : ReadTextReport2 * imaqReadText2 ( const Image * image , const CharSet * set , const ROI * roi , const ReadTextOptions * readOptions , const OCRProcessingOptions * processingOptions , const OCRSpacingOptions * spacingOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadText2 ( JNIEnv * env , jclass , jlong image , jlong set , jlong roi , jlong readOptions , jlong processingOptions , jlong spacingOptions )
{
ReadTextReport2 * rv = imaqReadText2 ( ( const Image * ) image , ( const CharSet * ) set , ( const ROI * ) roi , ( const ReadTextOptions * ) readOptions , ( const OCRProcessingOptions * ) processingOptions , ( const OCRSpacingOptions * ) spacingOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2015-01-02 23:14:02 -08:00
/* J: void imaqLearnPattern2(Image image, LearningMode learningMode)
* JN : void imaqLearnPattern2 ( long image , int learningMode , long advancedOptions )
2014-12-09 00:48:57 -08:00
* C : int imaqLearnPattern2 ( Image * image , LearningMode learningMode , LearnPatternAdvancedOptions * advancedOptions )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern2 ( JNIEnv * env , jclass , jlong image , jint learningMode , jlong advancedOptions )
2014-12-09 00:48:57 -08:00
{
int rv = imaqLearnPattern2 ( ( Image * ) image , ( LearningMode ) learningMode , ( LearnPatternAdvancedOptions * ) advancedOptions ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqDivide(Image dest, Image sourceA, Image sourceB)
* JN : void imaqDivide ( long dest , long sourceA , long sourceB )
* C : int imaqDivide ( Image * dest , const Image * sourceA , const Image * sourceB )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqDivide ( JNIEnv * env , jclass , jlong dest , jlong sourceA , jlong sourceB )
{
int rv = imaqDivide ( ( Image * ) dest , ( const Image * ) sourceA , ( const Image * ) sourceB ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: EdgeReport2 imaqEdgeTool3(Image image, ROI roi, EdgeProcess processType, EdgeOptions2 edgeOptions)
* JN : long imaqEdgeTool3 ( long image , long roi , int processType , long edgeOptions )
* C : EdgeReport2 * imaqEdgeTool3 ( const Image * image , const ROI * roi , EdgeProcess processType , const EdgeOptions2 * edgeOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEdgeTool3 ( JNIEnv * env , jclass , jlong image , jlong roi , jint processType , jlong edgeOptions )
{
EdgeReport2 * rv = imaqEdgeTool3 ( ( const Image * ) image , ( const ROI * ) roi , ( EdgeProcess ) processType , ( const EdgeOptions2 * ) edgeOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ConcentricRakeReport imaqConcentricRake(Image image, ROI roi, ConcentricRakeDirection direction, EdgeProcess process, RakeOptions options)
* JN : long imaqConcentricRake ( long image , long roi , int direction , int process , long options )
* C : ConcentricRakeReport * imaqConcentricRake ( const Image * image , const ROI * roi , ConcentricRakeDirection direction , EdgeProcess process , const RakeOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqConcentricRake ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jint process , jlong options )
{
ConcentricRakeReport * rv = imaqConcentricRake ( ( const Image * ) image , ( const ROI * ) roi , ( ConcentricRakeDirection ) direction , ( EdgeProcess ) process , ( const RakeOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: SpokeReport imaqSpoke(Image image, ROI roi, SpokeDirection direction, EdgeProcess process, SpokeOptions options)
* JN : long imaqSpoke ( long image , long roi , int direction , int process , long options )
* C : SpokeReport * imaqSpoke ( const Image * image , const ROI * roi , SpokeDirection direction , EdgeProcess process , const SpokeOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqSpoke ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jint process , jlong options )
{
SpokeReport * rv = imaqSpoke ( ( const Image * ) image , ( const ROI * ) roi , ( SpokeDirection ) direction , ( EdgeProcess ) process , ( const SpokeOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqLearnPattern(Image image, LearningMode learningMode)
* JN : void imaqLearnPattern ( long image , int learningMode )
* C : int imaqLearnPattern ( Image * image , LearningMode learningMode )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqLearnPattern ( JNIEnv * env , jclass , jlong image , jint learningMode )
{
int rv = imaqLearnPattern ( ( Image * ) image , ( LearningMode ) learningMode ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: MatchPattern2Result imaqMatchPattern2(Image image, Image pattern, MatchPatternOptions options, MatchPatternAdvancedOptions advancedOptions, Rect searchRect)
* JN : long imaqMatchPattern2 ( long image , long pattern , long options , long advancedOptions , long searchRect , long numMatches )
* C : PatternMatch * imaqMatchPattern2 ( const Image * image , const Image * pattern , const MatchPatternOptions * options , const MatchPatternAdvancedOptions * advancedOptions , Rect searchRect , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchPattern2 ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong options , jlong advancedOptions , jlong searchRect , jlong numMatches )
{
PatternMatch * rv = imaqMatchPattern2 ( ( const Image * ) image , ( const Image * ) pattern , ( const MatchPatternOptions * ) options , ( const MatchPatternAdvancedOptions * ) advancedOptions , * ( ( Rect * ) searchRect ) , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: void imaqSetParticleClassifierOptions(ClassifierSession session, ParticleClassifierPreprocessingOptions preprocessingOptions, ParticleClassifierOptions options)
* JN : void imaqSetParticleClassifierOptions ( long session , long preprocessingOptions , long options )
* C : int imaqSetParticleClassifierOptions ( ClassifierSession * session , const ParticleClassifierPreprocessingOptions * preprocessingOptions , const ParticleClassifierOptions * options )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqSetParticleClassifierOptions ( JNIEnv * env , jclass , jlong session , jlong preprocessingOptions , jlong options )
{
int rv = imaqSetParticleClassifierOptions ( ( ClassifierSession * ) session , ( const ParticleClassifierPreprocessingOptions * ) preprocessingOptions , ( const ParticleClassifierOptions * ) options ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: void imaqCopyCalibrationInfo(Image dest, Image source)
* JN : void imaqCopyCalibrationInfo ( long dest , long source )
* C : int imaqCopyCalibrationInfo ( Image * dest , const Image * source )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1imaqCopyCalibrationInfo ( JNIEnv * env , jclass , jlong dest , jlong source )
{
int rv = imaqCopyCalibrationInfo ( ( Image * ) dest , ( const Image * ) source ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2015-01-02 23:14:02 -08:00
/* 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 )
2014-12-09 00:48:57 -08:00
* C : int imaqParticleFilter2 ( Image * dest , Image * source , const ParticleFilterCriteria2 * criteria , int criteriaCount , int rejectMatches , int connectivity8 , int * numParticles )
*/
2015-01-02 23:14:02 -08:00
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 )
2014-12-09 00:48:57 -08:00
{
int rv = imaqParticleFilter2 ( ( Image * ) dest , ( Image * ) source , ( const ParticleFilterCriteria2 * ) criteria , ( int ) criteriaCount , ( int ) rejectMatches , ( int ) connectivity8 , ( int * ) numParticles ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
/* J: EdgeTool2Result imaqEdgeTool2(Image image, Point points, int numPoints, EdgeProcess process, EdgeOptions options)
* JN : long imaqEdgeTool2 ( long image , long points , int numPoints , int process , long options , long numEdges )
* C : EdgeReport * imaqEdgeTool2 ( const Image * image , const Point * points , int numPoints , EdgeProcess process , const EdgeOptions * options , int * numEdges )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqEdgeTool2 ( JNIEnv * env , jclass , jlong image , jlong points , jint numPoints , jint process , jlong options , jlong numEdges )
{
EdgeReport * rv = imaqEdgeTool2 ( ( const Image * ) image , ( const Point * ) points , ( int ) numPoints , ( EdgeProcess ) process , ( const EdgeOptions * ) options , ( int * ) numEdges ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: int imaqAddRotatedRectContour(ROI roi, RotatedRect rect)
* JN : int imaqAddRotatedRectContour ( long roi , long rect )
* C : ContourID imaqAddRotatedRectContour ( ROI * roi , RotatedRect rect )
*/
JNIEXPORT jint JNICALL Java_com_ni_vision_NIVision__1imaqAddRotatedRectContour ( JNIEnv * env , jclass , jlong roi , jlong rect )
{
ContourID rv = imaqAddRotatedRectContour ( ( ROI * ) roi , * ( ( RotatedRect * ) rect ) ) ;
return ( jint ) rv ;
}
/* J: ReadDataMatrixBarcodeResult imaqReadDataMatrixBarcode(Image image, ROI roi, DataMatrixOptions options)
* JN : long imaqReadDataMatrixBarcode ( long image , long roi , long options , long numBarcodes )
* C : Barcode2DInfo * imaqReadDataMatrixBarcode ( const Image * image , const ROI * roi , const DataMatrixOptions * options , unsigned int * numBarcodes )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadDataMatrixBarcode ( JNIEnv * env , jclass , jlong image , jlong roi , jlong options , jlong numBarcodes )
{
Barcode2DInfo * rv = imaqReadDataMatrixBarcode ( ( const Image * ) image , ( const ROI * ) roi , ( const DataMatrixOptions * ) options , ( unsigned int * ) numBarcodes ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: LinearAverages imaqLinearAverages(Image image, Rect rect)
* JN : long imaqLinearAverages ( long image , long rect )
* C : LinearAverages * imaqLinearAverages ( const Image * image , Rect rect )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqLinearAverages ( JNIEnv * env , jclass , jlong image , jlong rect )
{
LinearAverages * rv = imaqLinearAverages ( ( const Image * ) image , * ( ( Rect * ) rect ) ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: MatchGeometricPatternResult imaqMatchGeometricPattern(Image image, Image pattern, CurveOptions curveOptions, MatchGeometricPatternOptions matchOptions, MatchGeometricPatternAdvancedOptions advancedMatchOptions, ROI roi)
* JN : long imaqMatchGeometricPattern ( long image , long pattern , long curveOptions , long matchOptions , long advancedMatchOptions , long roi , long numMatches )
* C : GeometricPatternMatch * imaqMatchGeometricPattern ( const Image * image , const Image * pattern , const CurveOptions * curveOptions , const MatchGeometricPatternOptions * matchOptions , const MatchGeometricPatternAdvancedOptions * advancedMatchOptions , const ROI * roi , int * numMatches )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqMatchGeometricPattern ( JNIEnv * env , jclass , jlong image , jlong pattern , jlong curveOptions , jlong matchOptions , jlong advancedMatchOptions , jlong roi , jlong numMatches )
{
GeometricPatternMatch * rv = imaqMatchGeometricPattern ( ( const Image * ) image , ( const Image * ) pattern , ( const CurveOptions * ) curveOptions , ( const MatchGeometricPatternOptions * ) matchOptions , ( const MatchGeometricPatternAdvancedOptions * ) advancedMatchOptions , ( const ROI * ) roi , ( int * ) numMatches ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: CharInfo imaqGetCharInfo(CharSet set, int index)
* JN : long imaqGetCharInfo ( long set , int index )
* C : CharInfo * imaqGetCharInfo ( const CharSet * set , int index )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqGetCharInfo ( JNIEnv * env , jclass , jlong set , jint index )
{
CharInfo * rv = imaqGetCharInfo ( ( const CharSet * ) set , ( int ) index ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ReadTextReport imaqReadText(Image image, CharSet set, ROI roi, ReadTextOptions readOptions, OCRProcessingOptions processingOptions, OCRSpacingOptions spacingOptions)
* JN : long imaqReadText ( long image , long set , long roi , long readOptions , long processingOptions , long spacingOptions )
* C : ReadTextReport * imaqReadText ( const Image * image , const CharSet * set , const ROI * roi , const ReadTextOptions * readOptions , const OCRProcessingOptions * processingOptions , const OCRSpacingOptions * spacingOptions )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqReadText ( JNIEnv * env , jclass , jlong image , jlong set , jlong roi , jlong readOptions , jlong processingOptions , jlong spacingOptions )
{
ReadTextReport * rv = imaqReadText ( ( const Image * ) image , ( const CharSet * ) set , ( const ROI * ) roi , ( const ReadTextOptions * ) readOptions , ( const OCRProcessingOptions * ) processingOptions , ( const OCRSpacingOptions * ) spacingOptions ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ThresholdData imaqAutoThreshold(Image dest, Image source, int numClasses, ThresholdMethod method)
* JN : long imaqAutoThreshold ( long dest , long source , int numClasses , int method )
* C : ThresholdData * imaqAutoThreshold ( Image * dest , Image * source , int numClasses , ThresholdMethod method )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqAutoThreshold ( JNIEnv * env , jclass , jlong dest , jlong source , jint numClasses , jint method )
{
ThresholdData * rv = imaqAutoThreshold ( ( Image * ) dest , ( Image * ) source , ( int ) numClasses , ( ThresholdMethod ) method ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: ColorHistogramReport imaqColorHistogram(Image image, int numClasses, ColorMode mode, Image mask)
* JN : long imaqColorHistogram ( long image , int numClasses , int mode , long mask )
* C : ColorHistogramReport * imaqColorHistogram ( Image * image , int numClasses , ColorMode mode , const Image * mask )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqColorHistogram ( JNIEnv * env , jclass , jlong image , jint numClasses , jint mode , jlong mask )
{
ColorHistogramReport * rv = imaqColorHistogram ( ( Image * ) image , ( int ) numClasses , ( ColorMode ) mode , ( const Image * ) mask ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
/* J: RakeReport imaqRake(Image image, ROI roi, RakeDirection direction, EdgeProcess process, RakeOptions options)
* JN : long imaqRake ( long image , long roi , int direction , int process , long options )
* C : RakeReport * imaqRake ( const Image * image , const ROI * roi , RakeDirection direction , EdgeProcess process , const RakeOptions * options )
*/
JNIEXPORT jlong JNICALL Java_com_ni_vision_NIVision__1imaqRake ( JNIEnv * env , jclass , jlong image , jlong roi , jint direction , jint process , jlong options )
{
RakeReport * rv = imaqRake ( ( const Image * ) image , ( const ROI * ) roi , ( RakeDirection ) direction , ( EdgeProcess ) process , ( const RakeOptions * ) options ) ;
if ( ! rv ) throwJavaException ( env ) ;
return ( jlong ) rv ;
}
2014-12-12 22:52:31 -08:00
2014-12-30 02:17:03 -05:00
/* J: void Priv_ReadJPEGString_C(Image image, byte[] string)
* JN : void Priv_ReadJPEGString_C ( long image , long string , int stringLength )
* C : int Priv_ReadJPEGString_C ( Image * image , const unsigned char * string , unsigned int stringLength )
*/
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1Priv_1ReadJPEGString_1C ( JNIEnv * env , jclass , jlong image , jlong string , jint stringLength )
{
int rv = Priv_ReadJPEGString_C ( ( Image * ) image , ( const unsigned char * ) string , ( unsigned int ) stringLength ) ;
if ( rv = = 0 ) throwJavaException ( env ) ;
}
2014-12-12 22:52:31 -08:00
/*
* Purpose : Include file for NI - IMAQdx library support .
*/
/*
* Bus Type Enumeration
*/
/*
* Camera Control Mode Enumeration
*/
/*
* Buffer Number Mode Enumeration
*/
/*
* Plug n Play Event Enumeration
*/
/*
* Bayer Pattern Enumeration
*/
/*
* Bayer Decode Algorithm Enumeration
*/
/*
* Output Image Types - - Values match Vision Development Module image types
*/
/*
* Controller Destination Mode Enumeration
*/
/*
* Attribute Type Enumeration
*/
/*
* Value Type Enumeration
*/
/*
* Interface File Flags Enumeration
*/
/*
* Overwrite Mode Enumeration
*/
/*
* Incomplete Buffer Mode Enumeration
*/
/*
* Lost Packet Mode Enumeration
*/
/*
* Attribute Visibility Enumeration
*/
/*
* Stream Channel Mode Enumeration
*/
/*
* Pixel Signedness Enumeration
*/
/*
* USB Connection Speed Enumeration
*/
/*
* CVI Structures
*/
/*
* Camera Information Structure
*/
/*
* Camera File Structure
*/
/*
* Attribute Information Structure
*/
/*
* Enumeration Item Structure
*/
/*
* Camera Information Structure
*/
/*
* Attributes
*/
/*
* Functions
*/
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxSnap(int id, Image image)
* JN : void IMAQdxSnap ( int id , long image )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxSnap ( IMAQdxSession id , Image * image )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxSnap ( JNIEnv * env , jclass , jint id , jlong image )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxSnap ( ( IMAQdxSession ) id , ( Image * ) image ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxConfigureGrab(int id)
* JN : void IMAQdxConfigureGrab ( int id )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxConfigureGrab ( IMAQdxSession id )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxConfigureGrab ( JNIEnv * env , jclass , jint id )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxConfigureGrab ( ( IMAQdxSession ) id ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxGrab(int id, Image image, int waitForNextBuffer)
* JN : void IMAQdxGrab ( int id , long image , int waitForNextBuffer , long actualBufferNumber )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxGrab ( IMAQdxSession id , Image * image , bool32 waitForNextBuffer , uInt32 * actualBufferNumber )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGrab ( JNIEnv * env , jclass , jint id , jlong image , jint waitForNextBuffer , jlong actualBufferNumber )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxGrab ( ( IMAQdxSession ) id , ( Image * ) image , ( bool32 ) waitForNextBuffer , ( uInt32 * ) actualBufferNumber ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxDiscoverEthernetCameras(String address, int timeout)
* JN : void IMAQdxDiscoverEthernetCameras ( long address , int timeout )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxDiscoverEthernetCameras ( const char * address , uInt32 timeout )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxDiscoverEthernetCameras ( JNIEnv * env , jclass , jlong address , jint timeout )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxDiscoverEthernetCameras ( ( const char * ) address , ( uInt32 ) timeout ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxResetCamera(String name, int resetAll)
* JN : void IMAQdxResetCamera ( long name , int resetAll )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxResetCamera ( const char * name , bool32 resetAll )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxResetCamera ( JNIEnv * env , jclass , jlong name , jint resetAll )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxResetCamera ( ( const char * ) name , ( bool32 ) resetAll ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxOpenCamera(String name, IMAQdxCameraControlMode mode)
* JN : void IMAQdxOpenCamera ( long name , int mode , long id )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxOpenCamera ( const char * name , IMAQdxCameraControlMode mode , IMAQdxSession * id )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxOpenCamera ( JNIEnv * env , jclass , jlong name , jint mode , jlong id )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxOpenCamera ( ( const char * ) name , ( IMAQdxCameraControlMode ) mode , ( IMAQdxSession * ) id ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxCloseCamera(int id)
* JN : void IMAQdxCloseCamera ( int id )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxCloseCamera ( IMAQdxSession id )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxCloseCamera ( JNIEnv * env , jclass , jint id )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxCloseCamera ( ( IMAQdxSession ) id ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxConfigureAcquisition(int id, int continuous, int bufferCount)
* JN : void IMAQdxConfigureAcquisition ( int id , int continuous , int bufferCount )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxConfigureAcquisition ( IMAQdxSession id , bool32 continuous , uInt32 bufferCount )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxConfigureAcquisition ( JNIEnv * env , jclass , jint id , jint continuous , jint bufferCount )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxConfigureAcquisition ( ( IMAQdxSession ) id , ( bool32 ) continuous , ( uInt32 ) bufferCount ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxStartAcquisition(int id)
* JN : void IMAQdxStartAcquisition ( int id )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxStartAcquisition ( IMAQdxSession id )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxStartAcquisition ( JNIEnv * env , jclass , jint id )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxStartAcquisition ( ( IMAQdxSession ) id ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxGetImage(int id, Image image, IMAQdxBufferNumberMode mode, int desiredBufferNumber)
* JN : void IMAQdxGetImage ( int id , long image , int mode , int desiredBufferNumber , long actualBufferNumber )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxGetImage ( IMAQdxSession id , Image * image , IMAQdxBufferNumberMode mode , uInt32 desiredBufferNumber , uInt32 * actualBufferNumber )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetImage ( JNIEnv * env , jclass , jint id , jlong image , jint mode , jint desiredBufferNumber , jlong actualBufferNumber )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxGetImage ( ( IMAQdxSession ) id , ( Image * ) image , ( IMAQdxBufferNumberMode ) mode , ( uInt32 ) desiredBufferNumber , ( uInt32 * ) actualBufferNumber ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
2015-01-02 23:14:02 -08:00
}
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 ;
2014-12-12 22:52:31 -08:00
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxStopAcquisition(int id)
* JN : void IMAQdxStopAcquisition ( int id )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxStopAcquisition ( IMAQdxSession id )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxStopAcquisition ( JNIEnv * env , jclass , jint id )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxStopAcquisition ( ( IMAQdxSession ) id ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxUnconfigureAcquisition(int id)
* JN : void IMAQdxUnconfigureAcquisition ( int id )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxUnconfigureAcquisition ( IMAQdxSession id )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxUnconfigureAcquisition ( JNIEnv * env , jclass , jint id )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxUnconfigureAcquisition ( ( IMAQdxSession ) id ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
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 )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxGetAttributeType ( IMAQdxSession id , const char * name , IMAQdxAttributeType * type )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeType ( JNIEnv * env , jclass , jint id , jlong name , jlong type )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxGetAttributeType ( ( IMAQdxSession ) id , ( const char * ) name , ( IMAQdxAttributeType * ) type ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxIsAttributeReadable(int id, String name)
* JN : void IMAQdxIsAttributeReadable ( int id , long name , long readable )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxIsAttributeReadable ( IMAQdxSession id , const char * name , bool32 * readable )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxIsAttributeReadable ( JNIEnv * env , jclass , jint id , jlong name , jlong readable )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxIsAttributeReadable ( ( IMAQdxSession ) id , ( const char * ) name , ( bool32 * ) readable ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxIsAttributeWritable(int id, String name)
* JN : void IMAQdxIsAttributeWritable ( int id , long name , long writable )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxIsAttributeWritable ( IMAQdxSession id , const char * name , bool32 * writable )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxIsAttributeWritable ( JNIEnv * env , jclass , jint id , jlong name , jlong writable )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxIsAttributeWritable ( ( IMAQdxSession ) id , ( const char * ) name , ( bool32 * ) writable ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxWriteRegister(int id, int offset, int value)
* JN : void IMAQdxWriteRegister ( int id , int offset , int value )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxWriteRegister ( IMAQdxSession id , uInt32 offset , uInt32 value )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxWriteRegister ( JNIEnv * env , jclass , jint id , jint offset , jint value )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxWriteRegister ( ( IMAQdxSession ) id , ( uInt32 ) offset , ( uInt32 ) value ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxReadRegister(int id, int offset)
* JN : void IMAQdxReadRegister ( int id , int offset , long value )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxReadRegister ( IMAQdxSession id , uInt32 offset , uInt32 * value )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxReadRegister ( JNIEnv * env , jclass , jint id , jint offset , jlong value )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxReadRegister ( ( IMAQdxSession ) id , ( uInt32 ) offset , ( uInt32 * ) value ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxWriteAttributes(int id, String filename)
* JN : void IMAQdxWriteAttributes ( int id , long filename )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxWriteAttributes ( IMAQdxSession id , const char * filename )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxWriteAttributes ( JNIEnv * env , jclass , jint id , jlong filename )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxWriteAttributes ( ( IMAQdxSession ) id , ( const char * ) filename ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxReadAttributes(int id, String filename)
* JN : void IMAQdxReadAttributes ( int id , long filename )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxReadAttributes ( IMAQdxSession id , const char * filename )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxReadAttributes ( JNIEnv * env , jclass , jint id , jlong filename )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxReadAttributes ( ( IMAQdxSession ) id , ( const char * ) filename ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2014-12-14 22:06:07 -08:00
/* J: void IMAQdxResetEthernetCameraAddress(String name, String address, String subnet, String gateway, int timeout)
* JN : void IMAQdxResetEthernetCameraAddress ( long name , long address , long subnet , long gateway , int timeout )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxResetEthernetCameraAddress ( const char * name , const char * address , const char * subnet , const char * gateway , uInt32 timeout )
*/
2014-12-14 22:06:07 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxResetEthernetCameraAddress ( JNIEnv * env , jclass , jlong name , jlong address , jlong subnet , jlong gateway , jint timeout )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxResetEthernetCameraAddress ( ( const char * ) name , ( const char * ) address , ( const char * ) subnet , ( const char * ) gateway , ( uInt32 ) timeout ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
}
2015-01-02 23:14:02 -08:00
/* J: void IMAQdxGetAttributeVisibility(int id, String name)
* JN : void IMAQdxGetAttributeVisibility ( int id , long name , long visibility )
2014-12-12 22:52:31 -08:00
* C : IMAQdxError IMAQdxGetAttributeVisibility ( IMAQdxSession id , const char * name , IMAQdxAttributeVisibility * visibility )
*/
2015-01-02 23:14:02 -08:00
JNIEXPORT void JNICALL Java_com_ni_vision_NIVision__1IMAQdxGetAttributeVisibility ( JNIEnv * env , jclass , jint id , jlong name , jlong visibility )
2014-12-12 22:52:31 -08:00
{
IMAQdxError rv = IMAQdxGetAttributeVisibility ( ( IMAQdxSession ) id , ( const char * ) name , ( IMAQdxAttributeVisibility * ) visibility ) ;
if ( rv ! = IMAQdxErrorSuccess ) dxthrowJavaException ( env , rv ) ;
2015-01-02 23:14:02 -08:00
}
/* 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 ) ;
2014-12-12 22:52:31 -08:00
}
2014-12-09 00:48:57 -08:00
}