Ejemplo n.º 1
0
nitf::Uint32 ImageSubheader::getBandCount() throw(nitf::NITFException)
{
    nitf::Uint32 x = nitf_ImageSubheader_getBandCount(getNativeOrThrow(), &error);
    if (x == NITF_INVALID_BAND_COUNT)
        throw nitf::NITFException(&error);
    return x;
}
Ejemplo n.º 2
0
/*
 * Class:     nitf_ImageSubheader
 * Method:    getBandCount
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_nitf_ImageSubheader_getBandCount
    (JNIEnv * env, jobject self)
{
    nitf_ImageSubheader *header = _GetObj(env, self);
    nitf_Error error;
    jint bandCount;

    bandCount = (jint) nitf_ImageSubheader_getBandCount(header, &error);
    bandCount = bandCount < 0 ? 0 : bandCount;
    return bandCount;
}