View Javadoc
1   package com.github.celldynamics.quimp;
2   
3   /**
4    * Hold fluorescence value for pixel.
5    * 
6    * @author rtyson
7    */
8   public class FluoMeasurement {
9   
10    /**
11     * Pixel x coordinate.
12     */
13    public double x;
14    /**
15     * Pixel y coordinate.
16     */
17    public double y;
18    /**
19     * Pixel intensity.
20     */
21    public double intensity;
22  
23    /**
24     * Constructor of the fluoro pixel.
25     * 
26     * @param xx x coordinate
27     * @param yy y coordinate
28     * @param i intensity
29     */
30    public FluoMeasurement(double xx, double yy, double i) {
31      x = xx;
32      y = yy;
33      intensity = i;
34    }
35  
36    /**
37     * Copy constructor.
38     * 
39     * @param src source object
40     */
41    public FluoMeasurement"../../../../com/github/celldynamics/quimp/FluoMeasurement.html#FluoMeasurement">FluoMeasurement(FluoMeasurement src) {
42      x = src.x;
43      y = src.y;
44      intensity = src.intensity;
45    }
46  
47    /*
48     * (non-Javadoc)
49     * 
50     * @see java.lang.Object#hashCode()
51     */
52    @Override
53    public int hashCode() {
54      final int prime = 31;
55      int result = 1;
56      long temp;
57      temp = Double.doubleToLongBits(intensity);
58      result = prime * result + (int) (temp ^ (temp >>> 32));
59      temp = Double.doubleToLongBits(x);
60      result = prime * result + (int) (temp ^ (temp >>> 32));
61      temp = Double.doubleToLongBits(y);
62      result = prime * result + (int) (temp ^ (temp >>> 32));
63      return result;
64    }
65  
66    /*
67     * (non-Javadoc)
68     * 
69     * @see java.lang.Object#equals(java.lang.Object)
70     */
71    @Override
72    public boolean equals(Object obj) {
73      if (this == obj) {
74        return true;
75      }
76      if (obj == null) {
77        return false;
78      }
79      if (!(obj instanceof FluoMeasurement)) {
80        return false;
81      }
82      FluoMeasurement/../com/github/celldynamics/quimp/FluoMeasurement.html#FluoMeasurement">FluoMeasurement other = (FluoMeasurement) obj;
83      if (Double.doubleToLongBits(intensity) != Double.doubleToLongBits(other.intensity)) {
84        return false;
85      }
86      if (Double.doubleToLongBits(x) != Double.doubleToLongBits(other.x)) {
87        return false;
88      }
89      if (Double.doubleToLongBits(y) != Double.doubleToLongBits(other.y)) {
90        return false;
91      }
92      return true;
93    }
94  
95    /*
96     * (non-Javadoc)
97     * 
98     * @see java.lang.Object#toString()
99     */
100   @Override
101   public String toString() {
102     return "FluoMeasurement [x=" + x + ", y=" + y + ", intensity=" + intensity + "]";
103   }
104 
105 }