package org.bdgp.MMSlide.DB;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable
public class ROI {
    @DatabaseField(generatedId=true) private int id;
    @DatabaseField private long x1;
    @DatabaseField private long y1;
    @DatabaseField private long x2;
    @DatabaseField private long y2;

    public ROI() {}
    public ROI(int id, int imageId, long x1, long y1, long x2, long y2) {
        this.id = id;
        this.x1 = x1;
        this.y1 = y1;
        this.x2 = x2;
        this.y2 = y2;
    }
    public int getId() {return this.id;}
    public long getX1() {return this.x1;}
    public long getY1() {return this.y1;}
    public long getX2() {return this.x2;}
    public long getY2() {return this.y2;}
}

@@ -228,20 +228,22 @@
 private 
-long
+double
  x1;%0A   
@@ -266,20 +266,22 @@
 private 
-long
+double
  y1;%0A   
@@ -304,20 +304,22 @@
 private 
-long
+double
  x2;%0A   
@@ -342,20 +342,22 @@
 private 
-long
+double
  y2;%0A%0A  
@@ -612,28 +612,30 @@
 %0A    public 
-long
+double
  getX1() %7Bre
@@ -656,28 +656,30 @@
 %0A    public 
-long
+double
  getY1() %7Bre
@@ -700,28 +700,30 @@
 %0A    public 
-long
+double
  getX2() %7Bre
@@ -748,20 +748,22 @@
  public 
-long
+double
  getY2()

use double's instead of int's to store ROI position rectangle