Skip to content

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

Packages

Name
com.inscoper.api

Classes

Name
class com.inscoper.api.RoiCrop
RoiCrop class defines a Region Of Interest for cropping.

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 RoiCrop {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected RoiCrop(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected static long swigRelease(RoiCrop obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

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

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        InscoperJNI.delete_RoiCrop(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public RoiCrop() {
    this(InscoperJNI.new_RoiCrop(), true);
  }

  public int getHeight() {
    return InscoperJNI.RoiCrop_getHeight(swigCPtr, this);
  }

  public void setHeight(int height) {
    InscoperJNI.RoiCrop_setHeight(swigCPtr, this, height);
  }

  public int getWidth() {
    return InscoperJNI.RoiCrop_getWidth(swigCPtr, this);
  }

  public void setWidth(int width) {
    InscoperJNI.RoiCrop_setWidth(swigCPtr, this, width);
  }

  public int getX() {
    return InscoperJNI.RoiCrop_getX(swigCPtr, this);
  }

  public void setX(int x) {
    InscoperJNI.RoiCrop_setX(swigCPtr, this, x);
  }

  public int getY() {
    return InscoperJNI.RoiCrop_getY(swigCPtr, this);
  }

  public void setY(int y) {
    InscoperJNI.RoiCrop_setY(swigCPtr, this, y);
  }

}

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