Skip to content

InscoperAPI/Build/Java/com.inscoper.api/com/inscoper/api/Camera.java

Packages

Name
com.inscoper.api

Classes

Name
class com.inscoper.api.Camera
Camera class defines the interface for camera devices.

Source code

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.3.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.inscoper.api;
import com.inscoper.api.logging.*;

public class Camera extends AbstractSystem {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected Camera(long cPtr, boolean cMemoryOwn) {
    super(InscoperJNI.Camera_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Camera obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwnDerived) {
        swigCMemOwnDerived = false;
        InscoperJNI.delete_Camera(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public long getImageHeight() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getImageHeight(swigCPtr, this);
  }

  public long getImageWidth() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getImageWidth(swigCPtr, this);
  }

  public long getImageBitDepth() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getImageBitDepth(swigCPtr, this);
  }

  public long getBytesPerPixel() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getBytesPerPixel(swigCPtr, this);
  }

  public int getImageBufferSize() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getImageBufferSize(swigCPtr, this);
  }

  public long getImageNumberPerTrigg() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getImageNumberPerTrigg(swigCPtr, this);
  }

  public long getMaxNumberOfChannel() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getMaxNumberOfChannel(swigCPtr, this);
  }

  public double getExposure() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getExposure(swigCPtr, this);
  }

  public void setExposure(double d) throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_setExposure(swigCPtr, this, d);
  }

  public String getBinning() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getBinning(swigCPtr, this);
  }

  public void setBinning(String binning) throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_setBinning(swigCPtr, this, binning);
  }

  public boolean isHardwareCropAvailable() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_isHardwareCropAvailable(swigCPtr, this);
  }

  public void setHardwareCrop(RoiCropVector crops) throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_setHardwareCrop(swigCPtr, this, RoiCropVector.getCPtr(crops), crops);
  }

  public RoiCropVector getHardwareCrop() throws com.inscoper.api.InscoperException {
    return new RoiCropVector(InscoperJNI.Camera_getHardwareCrop(swigCPtr, this), true);
  }

  public boolean isSequenceRunning() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_isSequenceRunning(swigCPtr, this);
  }

  public void prepareSequenceAcquisition() throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_prepareSequenceAcquisition(swigCPtr, this);
  }

  public void startSequenceAcquisition(long nbImage) throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_startSequenceAcquisition(swigCPtr, this, nbImage);
  }

  public void startContinuousSequenceAcquisition() throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_startContinuousSequenceAcquisition(swigCPtr, this);
  }

  public void checkSequenceStarted() throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_checkSequenceStarted(swigCPtr, this);
  }

  public void softwareTriggerImage() throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_softwareTriggerImage(swigCPtr, this);
  }

  public boolean isSoftwareTriggerAvailable() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_isSoftwareTriggerAvailable(swigCPtr, this);
  }

  public boolean isLevelTriggerAvailable() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_isLevelTriggerAvailable(swigCPtr, this);
  }

  public boolean isEdgeTriggerAvailable() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_isEdgeTriggerAvailable(swigCPtr, this);
  }

  public Status getEdgeTriggerStatus() throws com.inscoper.api.InscoperException {
    return new Status(InscoperJNI.Camera_getEdgeTriggerStatus(swigCPtr, this), true);
  }

  public Status getLevelTriggerStatus() throws com.inscoper.api.InscoperException {
    return new Status(InscoperJNI.Camera_getLevelTriggerStatus(swigCPtr, this), true);
  }

  public Status getInternalTriggerStatus() throws com.inscoper.api.InscoperException {
    return new Status(InscoperJNI.Camera_getInternalTriggerStatus(swigCPtr, this), true);
  }

  public Status getSoftwareTriggerStatus() throws com.inscoper.api.InscoperException {
    return new Status(InscoperJNI.Camera_getSoftwareTriggerStatus(swigCPtr, this), true);
  }

  public double getPhysicalPixelSize() throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getPhysicalPixelSize(swigCPtr, this);
  }

  public Image snapImage(long chanIdx) throws com.inscoper.api.InscoperException {
    long cPtr = InscoperJNI.Camera_snapImage(swigCPtr, this, chanIdx);
    return (cPtr == 0) ? null : new Image(cPtr, true);
  }

  public Image popNextImage(long chanIdx) throws com.inscoper.api.InscoperException {
    long cPtr = InscoperJNI.Camera_popNextImage(swigCPtr, this, chanIdx);
    return (cPtr == 0) ? null : new Image(cPtr, true);
  }

  public Image popNextImageBlocking(long chanIdx) throws com.inscoper.api.InscoperException {
    long cPtr = InscoperJNI.Camera_popNextImageBlocking(swigCPtr, this, chanIdx);
    return (cPtr == 0) ? null : new Image(cPtr, true);
  }

  public Image getLastImage(long chanIdx, long indexBeforeLastImg) throws com.inscoper.api.InscoperException {
    long cPtr = InscoperJNI.Camera_getLastImage__SWIG_0(swigCPtr, this, chanIdx, indexBeforeLastImg);
    return (cPtr == 0) ? null : new Image(cPtr, true);
  }

  public Image getLastImage(long chanIdx) throws com.inscoper.api.InscoperException {
    long cPtr = InscoperJNI.Camera_getLastImage__SWIG_1(swigCPtr, this, chanIdx);
    return (cPtr == 0) ? null : new Image(cPtr, true);
  }

  public int getRemainingImageCount(long chanIdx) throws com.inscoper.api.InscoperException {
    return InscoperJNI.Camera_getRemainingImageCount(swigCPtr, this, chanIdx);
  }

  public void stopSequenceAcquisition() throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_stopSequenceAcquisition(swigCPtr, this);
  }

  public void clearBuffers() throws com.inscoper.api.InscoperException {
    InscoperJNI.Camera_clearBuffers(swigCPtr, this);
  }

}

Updated on 2026-09-03 at 12:14:19 +0200