infomat.view.picture
Class SparsePixel
java.lang.Object
infomat.view.picture.SparsePixel
public class SparsePixel
- extends java.lang.Object
A SparsePixel is a non zero pixel in a SparsePartPicture.
It represents one or several IMatrixCells. Its opacity
dependens on the values of these and its color depends on
which IObjectGroups they belong to, in the current IObjectGrouping.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x
private int x
y
private int y
xLast
private int xLast
yLast
private int yLast
rgb
private float[] rgb
opacity
private float opacity
weight
private float weight
matrixCells
private java.util.TreeSet<IMatrixCell> matrixCells
numberOfIMatrixColumns
private static double numberOfIMatrixColumns
numberOfIMatrixRows
private static double numberOfIMatrixRows
SparsePixel
public SparsePixel(int x,
int y,
int xLast,
int yLast,
java.awt.Color color,
IMatrixCell mc)
setNumberOfIMatrixColumns
public static void setNumberOfIMatrixColumns(double num)
- Not a genuine copy-constructor! Copies references...
setNumberOfIMatrixRows
public static void setNumberOfIMatrixRows(double num)
accumulate
public void accumulate(SparsePixel sp)
recolor
public void recolor(boolean row,
GroupingColoring coloring)
addRGBs
private float[] addRGBs(float[] a,
float[] b)
makeAverageColor
public void makeAverageColor()
divideValuesBy
private void divideValuesBy(int div)
linearScaleOpacity
public void linearScaleOpacity(float newMin,
float newMax,
float currentMin,
float currentMax)
getX
public int getX()
getY
public int getY()
getXLast
public int getXLast()
getYLast
public int getYLast()
setYLast
protected void setYLast(int y)
- Used to adjust the height of column coloring SparsePixels.
- Parameters:
y
- an int
printColorParamters
public void printColorParamters()
getColor
public java.awt.Color getColor(java.awt.Color defaultColor)
getRGB
public float[] getRGB()
getOpacity
public float getOpacity()
getWeight
public float getWeight()
getNumberOfIMatrixCells
public int getNumberOfIMatrixCells()
getIMatrixCellWithHighestWeight
public IMatrixCell getIMatrixCellWithHighestWeight()
getAllIMatrixCells
public java.util.Vector<IMatrixCell> getAllIMatrixCells()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object