// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v2.10.1
//   protoc               v3.21.12
// source: SpatialImgDetections.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { ImgDetection } from "./ImgDetections";
import { ImgTransformation, SpatialKeypointsList, Timestamp } from "./common";
export const protobufPackage = "dai.proto.spatial_img_detections";
export var SpatialLocationCalculatorAlgorithm;
(function (SpatialLocationCalculatorAlgorithm) {
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["AVERAGE"] = 0] = "AVERAGE";
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["MEAN"] = 0] = "MEAN";
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["MIN"] = 1] = "MIN";
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["MAX"] = 2] = "MAX";
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["MODE"] = 3] = "MODE";
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["MEDIAN"] = 4] = "MEDIAN";
    SpatialLocationCalculatorAlgorithm[SpatialLocationCalculatorAlgorithm["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(SpatialLocationCalculatorAlgorithm || (SpatialLocationCalculatorAlgorithm = {}));
export function spatialLocationCalculatorAlgorithmFromJSON(object) {
    switch (object) {
        case 0:
        case "AVERAGE":
            return SpatialLocationCalculatorAlgorithm.AVERAGE;
        case 0:
        case "MEAN":
            return SpatialLocationCalculatorAlgorithm.MEAN;
        case 1:
        case "MIN":
            return SpatialLocationCalculatorAlgorithm.MIN;
        case 2:
        case "MAX":
            return SpatialLocationCalculatorAlgorithm.MAX;
        case 3:
        case "MODE":
            return SpatialLocationCalculatorAlgorithm.MODE;
        case 4:
        case "MEDIAN":
            return SpatialLocationCalculatorAlgorithm.MEDIAN;
        case -1:
        case "UNRECOGNIZED":
        default:
            return SpatialLocationCalculatorAlgorithm.UNRECOGNIZED;
    }
}
export function spatialLocationCalculatorAlgorithmToJSON(object) {
    switch (object) {
        case SpatialLocationCalculatorAlgorithm.AVERAGE:
            return "AVERAGE";
        case SpatialLocationCalculatorAlgorithm.MEAN:
            return "MEAN";
        case SpatialLocationCalculatorAlgorithm.MIN:
            return "MIN";
        case SpatialLocationCalculatorAlgorithm.MAX:
            return "MAX";
        case SpatialLocationCalculatorAlgorithm.MODE:
            return "MODE";
        case SpatialLocationCalculatorAlgorithm.MEDIAN:
            return "MEDIAN";
        case SpatialLocationCalculatorAlgorithm.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function createBaseSpatialImgDetections() {
    return {
        sequenceNum: 0,
        ts: undefined,
        tsDevice: undefined,
        detections: [],
        transformation: undefined,
        segmentationMaskWidth: 0,
        segmentationMaskHeight: 0,
        maskData: new Uint8Array(0),
    };
}
export const SpatialImgDetections = {
    encode(message, writer = new BinaryWriter()) {
        if (message.sequenceNum !== 0) {
            writer.uint32(8).int64(message.sequenceNum);
        }
        if (message.ts !== undefined) {
            Timestamp.encode(message.ts, writer.uint32(18).fork()).join();
        }
        if (message.tsDevice !== undefined) {
            Timestamp.encode(message.tsDevice, writer.uint32(26).fork()).join();
        }
        for (const v of message.detections) {
            SpatialImgDetection.encode(v, writer.uint32(34).fork()).join();
        }
        if (message.transformation !== undefined) {
            ImgTransformation.encode(message.transformation, writer.uint32(42).fork()).join();
        }
        if (message.segmentationMaskWidth !== 0) {
            writer.uint32(48).int64(message.segmentationMaskWidth);
        }
        if (message.segmentationMaskHeight !== 0) {
            writer.uint32(56).int64(message.segmentationMaskHeight);
        }
        if (message.maskData.length !== 0) {
            writer.uint32(66).bytes(message.maskData);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpatialImgDetections();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.sequenceNum = longToNumber(reader.int64());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.ts = Timestamp.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.tsDevice = Timestamp.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.detections.push(SpatialImgDetection.decode(reader, reader.uint32()));
                    continue;
                }
                case 5: {
                    if (tag !== 42) {
                        break;
                    }
                    message.transformation = ImgTransformation.decode(reader, reader.uint32());
                    continue;
                }
                case 6: {
                    if (tag !== 48) {
                        break;
                    }
                    message.segmentationMaskWidth = longToNumber(reader.int64());
                    continue;
                }
                case 7: {
                    if (tag !== 56) {
                        break;
                    }
                    message.segmentationMaskHeight = longToNumber(reader.int64());
                    continue;
                }
                case 8: {
                    if (tag !== 66) {
                        break;
                    }
                    message.maskData = reader.bytes();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            sequenceNum: isSet(object.sequenceNum) ? globalThis.Number(object.sequenceNum) : 0,
            ts: isSet(object.ts) ? Timestamp.fromJSON(object.ts) : undefined,
            tsDevice: isSet(object.tsDevice) ? Timestamp.fromJSON(object.tsDevice) : undefined,
            detections: globalThis.Array.isArray(object?.detections)
                ? object.detections.map((e) => SpatialImgDetection.fromJSON(e))
                : [],
            transformation: isSet(object.transformation) ? ImgTransformation.fromJSON(object.transformation) : undefined,
            segmentationMaskWidth: isSet(object.segmentationMaskWidth) ? globalThis.Number(object.segmentationMaskWidth) : 0,
            segmentationMaskHeight: isSet(object.segmentationMaskHeight)
                ? globalThis.Number(object.segmentationMaskHeight)
                : 0,
            maskData: isSet(object.maskData) ? bytesFromBase64(object.maskData) : new Uint8Array(0),
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.sequenceNum !== 0) {
            obj.sequenceNum = Math.round(message.sequenceNum);
        }
        if (message.ts !== undefined) {
            obj.ts = Timestamp.toJSON(message.ts);
        }
        if (message.tsDevice !== undefined) {
            obj.tsDevice = Timestamp.toJSON(message.tsDevice);
        }
        if (message.detections?.length) {
            obj.detections = message.detections.map((e) => SpatialImgDetection.toJSON(e));
        }
        if (message.transformation !== undefined) {
            obj.transformation = ImgTransformation.toJSON(message.transformation);
        }
        if (message.segmentationMaskWidth !== 0) {
            obj.segmentationMaskWidth = Math.round(message.segmentationMaskWidth);
        }
        if (message.segmentationMaskHeight !== 0) {
            obj.segmentationMaskHeight = Math.round(message.segmentationMaskHeight);
        }
        if (message.maskData.length !== 0) {
            obj.maskData = base64FromBytes(message.maskData);
        }
        return obj;
    },
    create(base) {
        return SpatialImgDetections.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSpatialImgDetections();
        message.sequenceNum = object.sequenceNum ?? 0;
        message.ts = (object.ts !== undefined && object.ts !== null) ? Timestamp.fromPartial(object.ts) : undefined;
        message.tsDevice = (object.tsDevice !== undefined && object.tsDevice !== null)
            ? Timestamp.fromPartial(object.tsDevice)
            : undefined;
        message.detections = object.detections?.map((e) => SpatialImgDetection.fromPartial(e)) || [];
        message.transformation = (object.transformation !== undefined && object.transformation !== null)
            ? ImgTransformation.fromPartial(object.transformation)
            : undefined;
        message.segmentationMaskWidth = object.segmentationMaskWidth ?? 0;
        message.segmentationMaskHeight = object.segmentationMaskHeight ?? 0;
        message.maskData = object.maskData ?? new Uint8Array(0);
        return message;
    },
};
function createBaseSpatialImgDetection() {
    return { detection: undefined, spatialCoordinates: undefined, boundingBoxMapping: undefined, keypoints: undefined };
}
export const SpatialImgDetection = {
    encode(message, writer = new BinaryWriter()) {
        if (message.detection !== undefined) {
            ImgDetection.encode(message.detection, writer.uint32(10).fork()).join();
        }
        if (message.spatialCoordinates !== undefined) {
            Point3f.encode(message.spatialCoordinates, writer.uint32(18).fork()).join();
        }
        if (message.boundingBoxMapping !== undefined) {
            SpatialLocationCalculatorConfigData.encode(message.boundingBoxMapping, writer.uint32(26).fork()).join();
        }
        if (message.keypoints !== undefined) {
            SpatialKeypointsList.encode(message.keypoints, writer.uint32(34).fork()).join();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpatialImgDetection();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.detection = ImgDetection.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.spatialCoordinates = Point3f.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 26) {
                        break;
                    }
                    message.boundingBoxMapping = SpatialLocationCalculatorConfigData.decode(reader, reader.uint32());
                    continue;
                }
                case 4: {
                    if (tag !== 34) {
                        break;
                    }
                    message.keypoints = SpatialKeypointsList.decode(reader, reader.uint32());
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            detection: isSet(object.detection) ? ImgDetection.fromJSON(object.detection) : undefined,
            spatialCoordinates: isSet(object.spatialCoordinates) ? Point3f.fromJSON(object.spatialCoordinates) : undefined,
            boundingBoxMapping: isSet(object.boundingBoxMapping)
                ? SpatialLocationCalculatorConfigData.fromJSON(object.boundingBoxMapping)
                : undefined,
            keypoints: isSet(object.keypoints) ? SpatialKeypointsList.fromJSON(object.keypoints) : undefined,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.detection !== undefined) {
            obj.detection = ImgDetection.toJSON(message.detection);
        }
        if (message.spatialCoordinates !== undefined) {
            obj.spatialCoordinates = Point3f.toJSON(message.spatialCoordinates);
        }
        if (message.boundingBoxMapping !== undefined) {
            obj.boundingBoxMapping = SpatialLocationCalculatorConfigData.toJSON(message.boundingBoxMapping);
        }
        if (message.keypoints !== undefined) {
            obj.keypoints = SpatialKeypointsList.toJSON(message.keypoints);
        }
        return obj;
    },
    create(base) {
        return SpatialImgDetection.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSpatialImgDetection();
        message.detection = (object.detection !== undefined && object.detection !== null)
            ? ImgDetection.fromPartial(object.detection)
            : undefined;
        message.spatialCoordinates = (object.spatialCoordinates !== undefined && object.spatialCoordinates !== null)
            ? Point3f.fromPartial(object.spatialCoordinates)
            : undefined;
        message.boundingBoxMapping = (object.boundingBoxMapping !== undefined && object.boundingBoxMapping !== null)
            ? SpatialLocationCalculatorConfigData.fromPartial(object.boundingBoxMapping)
            : undefined;
        message.keypoints = (object.keypoints !== undefined && object.keypoints !== null)
            ? SpatialKeypointsList.fromPartial(object.keypoints)
            : undefined;
        return message;
    },
};
function createBaseSpatialLocationCalculatorConfigData() {
    return { roi: undefined, depthThresholds: undefined, calculationAlgorithm: 0, stepSize: 0 };
}
export const SpatialLocationCalculatorConfigData = {
    encode(message, writer = new BinaryWriter()) {
        if (message.roi !== undefined) {
            Rect.encode(message.roi, writer.uint32(10).fork()).join();
        }
        if (message.depthThresholds !== undefined) {
            SpatialLocationCalculatorConfigThresholds.encode(message.depthThresholds, writer.uint32(18).fork()).join();
        }
        if (message.calculationAlgorithm !== 0) {
            writer.uint32(24).int32(message.calculationAlgorithm);
        }
        if (message.stepSize !== 0) {
            writer.uint32(32).int32(message.stepSize);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpatialLocationCalculatorConfigData();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 10) {
                        break;
                    }
                    message.roi = Rect.decode(reader, reader.uint32());
                    continue;
                }
                case 2: {
                    if (tag !== 18) {
                        break;
                    }
                    message.depthThresholds = SpatialLocationCalculatorConfigThresholds.decode(reader, reader.uint32());
                    continue;
                }
                case 3: {
                    if (tag !== 24) {
                        break;
                    }
                    message.calculationAlgorithm = reader.int32();
                    continue;
                }
                case 4: {
                    if (tag !== 32) {
                        break;
                    }
                    message.stepSize = reader.int32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            roi: isSet(object.roi) ? Rect.fromJSON(object.roi) : undefined,
            depthThresholds: isSet(object.depthThresholds)
                ? SpatialLocationCalculatorConfigThresholds.fromJSON(object.depthThresholds)
                : undefined,
            calculationAlgorithm: isSet(object.calculationAlgorithm)
                ? spatialLocationCalculatorAlgorithmFromJSON(object.calculationAlgorithm)
                : 0,
            stepSize: isSet(object.stepSize) ? globalThis.Number(object.stepSize) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.roi !== undefined) {
            obj.roi = Rect.toJSON(message.roi);
        }
        if (message.depthThresholds !== undefined) {
            obj.depthThresholds = SpatialLocationCalculatorConfigThresholds.toJSON(message.depthThresholds);
        }
        if (message.calculationAlgorithm !== 0) {
            obj.calculationAlgorithm = spatialLocationCalculatorAlgorithmToJSON(message.calculationAlgorithm);
        }
        if (message.stepSize !== 0) {
            obj.stepSize = Math.round(message.stepSize);
        }
        return obj;
    },
    create(base) {
        return SpatialLocationCalculatorConfigData.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSpatialLocationCalculatorConfigData();
        message.roi = (object.roi !== undefined && object.roi !== null) ? Rect.fromPartial(object.roi) : undefined;
        message.depthThresholds = (object.depthThresholds !== undefined && object.depthThresholds !== null)
            ? SpatialLocationCalculatorConfigThresholds.fromPartial(object.depthThresholds)
            : undefined;
        message.calculationAlgorithm = object.calculationAlgorithm ?? 0;
        message.stepSize = object.stepSize ?? 0;
        return message;
    },
};
function createBaseRect() {
    return { x: 0, y: 0, width: 0, height: 0 };
}
export const Rect = {
    encode(message, writer = new BinaryWriter()) {
        if (message.x !== 0) {
            writer.uint32(13).float(message.x);
        }
        if (message.y !== 0) {
            writer.uint32(21).float(message.y);
        }
        if (message.width !== 0) {
            writer.uint32(29).float(message.width);
        }
        if (message.height !== 0) {
            writer.uint32(37).float(message.height);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseRect();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 13) {
                        break;
                    }
                    message.x = reader.float();
                    continue;
                }
                case 2: {
                    if (tag !== 21) {
                        break;
                    }
                    message.y = reader.float();
                    continue;
                }
                case 3: {
                    if (tag !== 29) {
                        break;
                    }
                    message.width = reader.float();
                    continue;
                }
                case 4: {
                    if (tag !== 37) {
                        break;
                    }
                    message.height = reader.float();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            x: isSet(object.x) ? globalThis.Number(object.x) : 0,
            y: isSet(object.y) ? globalThis.Number(object.y) : 0,
            width: isSet(object.width) ? globalThis.Number(object.width) : 0,
            height: isSet(object.height) ? globalThis.Number(object.height) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.x !== 0) {
            obj.x = message.x;
        }
        if (message.y !== 0) {
            obj.y = message.y;
        }
        if (message.width !== 0) {
            obj.width = message.width;
        }
        if (message.height !== 0) {
            obj.height = message.height;
        }
        return obj;
    },
    create(base) {
        return Rect.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseRect();
        message.x = object.x ?? 0;
        message.y = object.y ?? 0;
        message.width = object.width ?? 0;
        message.height = object.height ?? 0;
        return message;
    },
};
function createBaseSpatialLocationCalculatorConfigThresholds() {
    return { lowerThreshold: 0, upperThreshold: 0 };
}
export const SpatialLocationCalculatorConfigThresholds = {
    encode(message, writer = new BinaryWriter()) {
        if (message.lowerThreshold !== 0) {
            writer.uint32(8).uint32(message.lowerThreshold);
        }
        if (message.upperThreshold !== 0) {
            writer.uint32(16).uint32(message.upperThreshold);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseSpatialLocationCalculatorConfigThresholds();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 8) {
                        break;
                    }
                    message.lowerThreshold = reader.uint32();
                    continue;
                }
                case 2: {
                    if (tag !== 16) {
                        break;
                    }
                    message.upperThreshold = reader.uint32();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            lowerThreshold: isSet(object.lowerThreshold) ? globalThis.Number(object.lowerThreshold) : 0,
            upperThreshold: isSet(object.upperThreshold) ? globalThis.Number(object.upperThreshold) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.lowerThreshold !== 0) {
            obj.lowerThreshold = Math.round(message.lowerThreshold);
        }
        if (message.upperThreshold !== 0) {
            obj.upperThreshold = Math.round(message.upperThreshold);
        }
        return obj;
    },
    create(base) {
        return SpatialLocationCalculatorConfigThresholds.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseSpatialLocationCalculatorConfigThresholds();
        message.lowerThreshold = object.lowerThreshold ?? 0;
        message.upperThreshold = object.upperThreshold ?? 0;
        return message;
    },
};
function createBasePoint3f() {
    return { x: 0, y: 0, z: 0 };
}
export const Point3f = {
    encode(message, writer = new BinaryWriter()) {
        if (message.x !== 0) {
            writer.uint32(13).float(message.x);
        }
        if (message.y !== 0) {
            writer.uint32(21).float(message.y);
        }
        if (message.z !== 0) {
            writer.uint32(29).float(message.z);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        const end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePoint3f();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: {
                    if (tag !== 13) {
                        break;
                    }
                    message.x = reader.float();
                    continue;
                }
                case 2: {
                    if (tag !== 21) {
                        break;
                    }
                    message.y = reader.float();
                    continue;
                }
                case 3: {
                    if (tag !== 29) {
                        break;
                    }
                    message.z = reader.float();
                    continue;
                }
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skip(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            x: isSet(object.x) ? globalThis.Number(object.x) : 0,
            y: isSet(object.y) ? globalThis.Number(object.y) : 0,
            z: isSet(object.z) ? globalThis.Number(object.z) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.x !== 0) {
            obj.x = message.x;
        }
        if (message.y !== 0) {
            obj.y = message.y;
        }
        if (message.z !== 0) {
            obj.z = message.z;
        }
        return obj;
    },
    create(base) {
        return Point3f.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePoint3f();
        message.x = object.x ?? 0;
        message.y = object.y ?? 0;
        message.z = object.z ?? 0;
        return message;
    },
};
function bytesFromBase64(b64) {
    if (globalThis.Buffer) {
        return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
    }
    else {
        const bin = globalThis.atob(b64);
        const arr = new Uint8Array(bin.length);
        for (let i = 0; i < bin.length; ++i) {
            arr[i] = bin.charCodeAt(i);
        }
        return arr;
    }
}
function base64FromBytes(arr) {
    if (globalThis.Buffer) {
        return globalThis.Buffer.from(arr).toString("base64");
    }
    else {
        const bin = [];
        arr.forEach((byte) => {
            bin.push(globalThis.String.fromCharCode(byte));
        });
        return globalThis.btoa(bin.join(""));
    }
}
function longToNumber(int64) {
    const num = globalThis.Number(int64.toString());
    if (num > globalThis.Number.MAX_SAFE_INTEGER) {
        throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
    }
    if (num < globalThis.Number.MIN_SAFE_INTEGER) {
        throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
    }
    return num;
}
function isSet(value) {
    return value !== null && value !== undefined;
}
export const protobufName = "SpatialImgDetections";
//# sourceMappingURL=SpatialImgDetections.js.map