App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

Macros | Functions
mhr_appcore_pointops_LUT.hpp File Reference
`#include <jni.h>`

Go to the source code of this file.

## Macros
#define | mhr_appcore_pointops_LUT_opacityAsFul 0.9999
#define | mhr_appcore_pointops_LUT_opacityAsNone 1.0E-4

## Functions
JNIEXPORT jlong JNICALL | Java_mhr_appcore_pointops_LUT_createLut (JNIEnv *, jclass)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_disposeLut (JNIEnv *, jclass, jlong)
JNIEXPORT jlong JNICALL | Java_mhr_appcore_pointops_LUT_createBrightnessLut (JNIEnv *, jclass, jdouble)
JNIEXPORT jlong JNICALL | Java_mhr_appcore_pointops_LUT_createContrastLut (JNIEnv *, jclass, jdouble)
JNIEXPORT jlong JNICALL | Java_mhr_appcore_pointops_LUT_createGammaLut (JNIEnv *, jclass, jdouble)
JNIEXPORT jlong JNICALL | Java_mhr_appcore_pointops_LUT_createCurvesLut (JNIEnv *, jclass, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_fillBrightnessLut (JNIEnv *, jclass, jlong, jdouble)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_fillContrastLut (JNIEnv *, jclass, jlong, jdouble)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_fillGammaLut (JNIEnv *, jclass, jlong, jdouble)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_fillCurvesLut (JNIEnv *, jclass, jlong, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint, jdoubleArray, jdoubleArray, jint)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_applyTo__JJIIII (JNIEnv *, jclass, jlong, jlong, jint, jint, jint, jint)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_applyTo__JJIIIID (JNIEnv *, jclass, jlong, jlong, jint, jint, jint, jint, jdouble)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_applyTo__JJJIIIIII (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint, jint, jint, jint, jint)
JNIEXPORT jint JNICALL | Java_mhr_appcore_pointops_LUT_applyTo__JJJIIIIIID (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint, jint, jint, jint, jint, jdouble)

## Macro Definition Documentation

#define mhr_appcore_pointops_LUT_opacityAsFul 0.9999

Definition at line 11 of file mhr_appcore_pointops_LUT.hpp.

#define mhr_appcore_pointops_LUT_opacityAsNone 1.0E-4

Definition at line 13 of file mhr_appcore_pointops_LUT.hpp.

## Function Documentation

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_applyTo__JJIIII | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jlong | dstAdress,
|  | jint | dstTlx,
|  | jint | dstTly,
|  | jint | dstBrx,
|  | jint | dstBry
| ) |  |

protected static native int applyTo(long lutAdress, long dstAdress, int dstTlx, int dstTly, int dstBrX, int dstBrY);

Definition at line 229 of file mhr_appcore_pointops_LUT.cpp.

{
TLUT<px_4x8bit, px_1x8bit> * LUT = (TLUT<px_4x8bit, px_1x8bit> *) lutAdress;
rgba_8bit_bitmap * dst = (rgba_8bit_bitmap *) dstAdress;
return LUT->applyTo(*dst, Rect(dstTlx, dstTly, dstBrx, dstBry));
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_applyTo__JJIIIID | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jlong | dstAdress,
|  | jint | dstTlx,
|  | jint | dstTly,
|  | jint | dstBrx,
|  | jint | dstBry,
|  | jdouble | alpha
| ) |  |

protected static native int applyTo(long lutAdress, long dstAdress, int dstTlx, int dstTly, int dstBrX, int dstBrY, double alpha);

Definition at line 238 of file mhr_appcore_pointops_LUT.cpp.

{
TLUT<px_4x8bit, px_1x8bit> * LUT = (TLUT<px_4x8bit, px_1x8bit> *) lutAdress;
rgba_8bit_bitmap * dst = (rgba_8bit_bitmap *) dstAdress;
return LUT->applyTo(*dst, Rect(dstTlx, dstTly, dstBrx, dstBry), alpha);
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_applyTo__JJJIIIIII | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jlong | dstAdress,
|  | jlong | mskAdress,
|  | jint | mskTlx,
|  | jint | mskTly,
|  | jint | mskBrx,
|  | jint | mskBry,
|  | jint | mskOrigX,
|  | jint | mskOrigY
| ) |  |

protected static native int applyTo(long lutAdress, long dstAdress, long mskAdress, int mskTlx, int mskTly, int mskBrx, int mskBry, int mskOrigX, int mskOrigY);

Definition at line 247 of file mhr_appcore_pointops_LUT.cpp.

{
TLUT<px_4x8bit, px_1x8bit> * LUT = (TLUT<px_4x8bit, px_1x8bit> *) lutAdress;
rgba_8bit_bitmap * dst = (rgba_8bit_bitmap *) dstAdress;
mono_8bit_bitmap * msk = (mono_8bit_bitmap *) mskAdress;
return LUT->applyTo(*dst, *msk, Rect(mskTlx, mskTly, mskBrx, mskBry), Point(mskOrigX, mskOrigY));
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_applyTo__JJJIIIIIID | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jlong | dstAdress,
|  | jlong | mskAdress,
|  | jint | mskTlx,
|  | jint | mskTly,
|  | jint | mskBrx,
|  | jint | mskBry,
|  | jint | mskOrigX,
|  | jint | mskOrigY,
|  | jdouble | alpha
| ) |  |

protected static native int applyTo(long lutAdress, long dstAdress, long mskAdress, int mskTlx, int mskTly, int mskBrx, int mskBry, int mskOrigX, int mskOrigY, double alpha);

Definition at line 257 of file mhr_appcore_pointops_LUT.cpp.

{
TLUT<px_4x8bit, px_1x8bit> * LUT = (TLUT<px_4x8bit, px_1x8bit> *) lutAdress;
rgba_8bit_bitmap * dst = (rgba_8bit_bitmap *) dstAdress;
mono_8bit_bitmap * msk = (mono_8bit_bitmap *) mskAdress;
return LUT->applyTo(*dst, *msk, Rect(mskTlx, mskTly, mskBrx, mskBry), Point(mskOrigX, mskOrigY), alpha);
}

JNIEXPORT jlong JNICALL Java_mhr_appcore_pointops_LUT_createBrightnessLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jdouble | bias
| ) |  |

protected static native long createBrightnessLut(double bias);

Definition at line 33 of file mhr_appcore_pointops_LUT.cpp.

{
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
TLUT<px_4x8bit, px_1x8bit> * retVal = gen.createBrightnessLUT_4ch(bias);
if (retVal != NULL) {
if (retVal->isInitOk()) {
return (long long) retVal;
} else {
delete retVal;
}
}
return 0x0;
}

JNIEXPORT jlong JNICALL Java_mhr_appcore_pointops_LUT_createContrastLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jdouble | bias
| ) |  |

protected static native long createContrastLut(double bias);

Definition at line 48 of file mhr_appcore_pointops_LUT.cpp.

{
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
TLUT<px_4x8bit, px_1x8bit> * retVal = gen.createContrastLUT_4ch(bias);
if (retVal != NULL) {
if (retVal->isInitOk()) {
return (long long) retVal;
} else {
delete retVal;
}
}
return 0x0;
}

JNIEXPORT jlong JNICALL Java_mhr_appcore_pointops_LUT_createCurvesLut | ( | JNIEnv * | ,
|  | jclass | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint |
| ) |  |

Definition at line 79 of file mhr_appcore_pointops_LUT.cpp.

{
jboolean isCopy = 0;
double * xMM = pEnv->GetDoubleArrayElements(xM, &isCopy);
double * yMM = pEnv->GetDoubleArrayElements(yM, &isCopy);
double * xRR = pEnv->GetDoubleArrayElements(xR, &isCopy);
double * yRR = pEnv->GetDoubleArrayElements(yR, &isCopy);
double * xGG = pEnv->GetDoubleArrayElements(xG, &isCopy);
double * yGG = pEnv->GetDoubleArrayElements(yG, &isCopy);
double * xBB = pEnv->GetDoubleArrayElements(xB, &isCopy);
double * yBB = pEnv->GetDoubleArrayElements(yB, &isCopy);
double * xAA = pEnv->GetDoubleArrayElements(xA, &isCopy);
double * yAA = pEnv->GetDoubleArrayElements(yA, &isCopy);
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
TLUT<px_4x8bit, px_1x8bit> * retVal = gen.createCurvesLUT_4ch(
xMM, yMM, cM,
xRR, yRR, cR,
xGG, yGG, cG,
xBB, yBB, cB,
xAA, yAA, cA);
// Nebudou se kopirovat zpet hodnoty
pEnv->ReleaseDoubleArrayElements(xM, xMM, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yM, yMM, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xR, xRR, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yR, yRR, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xG, xGG, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yG, yGG, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xB, xBB, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yB, yBB, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xA, xAA, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yA, yAA, JNI_ABORT);
if (retVal != NULL) {
if (retVal->isInitOk()) {
return (long long) retVal;
} else {
delete retVal;
}
}
return 0x0;
}

JNIEXPORT jlong JNICALL Java_mhr_appcore_pointops_LUT_createGammaLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jdouble | bias
| ) |  |

protected static native long createGammaLut(double gamma);

Definition at line 64 of file mhr_appcore_pointops_LUT.cpp.

{
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
TLUT<px_4x8bit, px_1x8bit> * retVal = gen.createGammaLUT_4ch(bias);
if (retVal != NULL) {
if (retVal->isInitOk()) {
return (long long) retVal;
} else {
delete retVal;
}
}
return 0x0;
}

JNIEXPORT jlong JNICALL Java_mhr_appcore_pointops_LUT_createLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass
| ) |  |

protected static native long createLut();

Definition at line 9 of file mhr_appcore_pointops_LUT.cpp.

{
TLUT<px_4x8bit, px_1x8bit> * retVal = new TLUT<px_4x8bit, px_1x8bit>(1);
if (retVal != NULL) {
if (retVal->isInitOk()) {
return (long long) retVal;
} else {
delete retVal;
}
}
return 0x0;
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_disposeLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | adress
| ) |  |

protected static native int disposeLut(long adress);

Definition at line 24 of file mhr_appcore_pointops_LUT.cpp.

{
TLUT<px_4x8bit, px_1x8bit> * LUT = (TLUT<px_4x8bit, px_1x8bit> *) adress;
delete LUT;
return 0;
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_fillBrightnessLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jdouble | bias
| ) |  |

protected static native int fillBrightnessLut(long lutAdress, double bias);

Definition at line 136 of file mhr_appcore_pointops_LUT.cpp.

{
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
return gen.fillBrightnessLUT_4ch(*(TLUT<px_4x8bit, px_1x8bit> *) lutAdress, bias);
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_fillContrastLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jdouble | bias
| ) |  |

protected static native int fillContrastLut(long lutAdress, double bias);

Definition at line 143 of file mhr_appcore_pointops_LUT.cpp.

{
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
return gen.fillContrastLUT_4ch(*(TLUT<px_4x8bit, px_1x8bit> *) lutAdress, bias);
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_fillCurvesLut | ( | JNIEnv * | ,
|  | jclass | ,
|  | jlong | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint | ,
|  | jdoubleArray | ,
|  | jdoubleArray | ,
|  | jint |
| ) |  |

Definition at line 156 of file mhr_appcore_pointops_LUT.cpp.

{
jboolean isCopy = 0;
double * xMM = pEnv->GetDoubleArrayElements(xM, &isCopy);
double * yMM = pEnv->GetDoubleArrayElements(yM, &isCopy);
double * xRR = pEnv->GetDoubleArrayElements(xR, &isCopy);
double * yRR = pEnv->GetDoubleArrayElements(yR, &isCopy);
double * xGG = pEnv->GetDoubleArrayElements(xG, &isCopy);
double * yGG = pEnv->GetDoubleArrayElements(yG, &isCopy);
double * xBB = pEnv->GetDoubleArrayElements(xB, &isCopy);
double * yBB = pEnv->GetDoubleArrayElements(yB, &isCopy);
double * xAA = pEnv->GetDoubleArrayElements(xA, &isCopy);
double * yAA = pEnv->GetDoubleArrayElements(yA, &isCopy);
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
int retVal = gen.fillCurvesLUT_4ch( *(TLUT<px_4x8bit, px_1x8bit> *)lutAdress,
xMM, yMM, cM,
xRR, yRR, cR,
xGG, yGG, cG,
xBB, yBB, cB,
xAA, yAA, cA);
// Nebudou se kopirovat zpet hodnoty
pEnv->ReleaseDoubleArrayElements(xM, xMM, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yM, yMM, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xR, xRR, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yR, yRR, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xG, xGG, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yG, yGG, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xB, xBB, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yB, yBB, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(xA, xAA, JNI_ABORT);
pEnv->ReleaseDoubleArrayElements(yA, yAA, JNI_ABORT);
return retVal;
}

JNIEXPORT jint JNICALL Java_mhr_appcore_pointops_LUT_fillGammaLut | ( | JNIEnv * | pEnv,
|  | jclass | pThisClass,
|  | jlong | lutAdress,
|  | jdouble | bias
| ) |  |

protected static native int fillGammaLut(long lutAdress, double gamma);

Definition at line 151 of file mhr_appcore_pointops_LUT.cpp.

{
TLUTGenerator<px_4x8bit, px_1x8bit> gen;
return gen.fillGammaLUT_4ch(*(TLUT<px_4x8bit, px_1x8bit> *) lutAdress, bias);
}