public static int sizeOf(int type)
    {
        switch ( type )
        {
            case MatDataTypes.miINT8:
                return miSIZE_INT8;
            case MatDataTypes.miUINT8:
                return miSIZE_UINT8;
            case MatDataTypes.miINT16:
                return miSIZE_INT16;
            case MatDataTypes.miUINT16:
                return miSIZE_UINT16;
            case MatDataTypes.miINT32:
                return miSIZE_INT32;
            case MatDataTypes.miUINT32:
                return miSIZE_UINT32;
            case MatDataTypes.miINT64:
                return miSIZE_INT64;
            case MatDataTypes.miUINT64:
                return miSIZE_UINT64;
            case MatDataTypes.miDOUBLE:
                return miSIZE_DOUBLE;
            default:
                return 1;
        }
    }