|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer
at.tuwien.ifs.somtoolbox.visualization.AbstractMatrixVisualizer
public abstract class AbstractMatrixVisualizer
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer |
|---|
AbstractBackgroundImageVisualizer.ContourInterpolationMode, AbstractBackgroundImageVisualizer.ContourMode, AbstractBackgroundImageVisualizer.VisualizationControlPanel |
| Field Summary | |
|---|---|
private boolean |
defaultInterpolate
|
private boolean |
interpolate
|
protected double |
maximumMatrixValue
|
protected double |
minimumMatrixValue
|
protected Palette |
palette
|
| Fields inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer |
|---|
cache, CACHE_KEY_SEPARATOR, contourInterpolationMode, contourMode, controlPanel, currentZDimSlice, inputObjects, log, map, MAX_CACHE_SIZE_MB, neededInputObjects, NUM_VISUALIZATIONS, numberOfContours, opacity, preferredScaleFactor, VISUALIZATION_DESCRIPTIONS, VISUALIZATION_NAMES, VISUALIZATION_SHORT_NAMES, visualizationUpdateListener, zSize |
| Fields inherited from interface at.tuwien.ifs.somtoolbox.visualization.BackgroundImageVisualizer |
|---|
CACHE_KEY_SECTION_SEPARATOR, DEFAULT_BACKGROUND_VISUALIZATION_SCALE |
| Constructor Summary | |
|---|---|
AbstractMatrixVisualizer()
|
|
| Method Summary | |
|---|---|
protected cern.colt.matrix.DoubleMatrix2D |
computeHitHistogram(GrowingSOM gsom)
Computes the hit-histogram from the given GrowingSOM. |
protected flanagan.interpolation.BiCubicSplineFast |
computeSpline(GrowingSOM gsom,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
int unitWidth,
int unitHeight)
|
protected int |
constrainWithinPalette(int ci)
|
protected BufferedImage |
createImage(GrowingSOM gsom,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
boolean interpolate)
Creates an image from a matrix of heights. |
protected void |
drawContour(Graphics2D g,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
boolean fill)
|
Palette |
getCurrentPalette()
Returns the Palette this visualisation currently is set to. |
double |
getMaximumMatrixValue()
|
double |
getMinimumMatrixValue()
|
Color[] |
getPalette()
Gets the currently used palette. |
String |
getPreferredPaletteName()
Default implementation using Palettes.getDefaultPalette(). |
protected String |
getVisualisationSpecificCacheKey(int currentVariant)
|
BufferedImage |
getVisualization(int index,
GrowingSOM gsom,
int width,
int height)
overriding the method in the superclass as we have a different cache key, and to set the min & max matrix values to -1 |
void |
invalidateCache(Palette palette)
Deletes all cached elements that use the Palette with the given index. |
boolean |
isInterpolate()
|
void |
reversePalette()
Reverts the currently used palette. |
void |
setDefaultInterpolate(boolean defaultInterpolate)
|
void |
setInterpolate(boolean interpolate)
Sets whether this visualisation should interpolate the image |
void |
setPalette(Palette newPalette)
Sets a new palette. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Palette palette
private boolean interpolate
private boolean defaultInterpolate
protected double minimumMatrixValue
protected double maximumMatrixValue
| Constructor Detail |
|---|
public AbstractMatrixVisualizer()
| Method Detail |
|---|
public double getMinimumMatrixValue()
public double getMaximumMatrixValue()
public BufferedImage getVisualization(int index,
GrowingSOM gsom,
int width,
int height)
throws SOMToolboxException
getVisualization in interface BackgroundImageVisualizergetVisualization in class AbstractBackgroundImageVisualizerindex - the index of the variant to usegsom - the GrowingSOM to take build the visualisation forwidth - the desired width of the image, in pixelsheight - the desired height of the image, in pixels
SOMToolboxException - If there was an error creating the visualisationBackgroundImageVisualizer.getVisualization(int,
at.tuwien.ifs.somtoolbox.models.GrowingSOM, int, int)protected String getVisualisationSpecificCacheKey(int currentVariant)
getVisualisationSpecificCacheKey in class AbstractBackgroundImageVisualizerpublic void setInterpolate(boolean interpolate)
MatrixVisualizer
setInterpolate in interface MatrixVisualizerpublic void setDefaultInterpolate(boolean defaultInterpolate)
public boolean isInterpolate()
isInterpolate in interface MatrixVisualizer
protected void drawContour(Graphics2D g,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
boolean fill)
throws SOMToolboxException
SOMToolboxException
protected BufferedImage createImage(GrowingSOM gsom,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
boolean interpolate)
throws SOMToolboxException
gsom - The GrowingSOM to generate the image formatrix - The matrix with the calucalted heights.width - the desired width of the image, in pixelsheight - the desired height of the image, in pixels.interpolate - indicates whether the image should be interpolated if the widht or height exceeds the matrix
dimensions.
SOMToolboxException
protected flanagan.interpolation.BiCubicSplineFast computeSpline(GrowingSOM gsom,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
int unitWidth,
int unitHeight)
protected int constrainWithinPalette(int ci)
public Color[] getPalette()
MatrixVisualizer
getPalette in interface MatrixVisualizerpublic void setPalette(Palette newPalette)
MatrixVisualizer
setPalette in interface MatrixVisualizernewPalette - the new palettepublic void reversePalette()
MatrixVisualizer
reversePalette in interface MatrixVisualizerpublic Palette getCurrentPalette()
MatrixVisualizerPalette this visualisation currently is set to.
getCurrentPalette in interface MatrixVisualizerpublic String getPreferredPaletteName()
Palettes.getDefaultPalette(). Subclasses that want to use a different
palette should overwrite this method.
getPreferredPaletteName in interface MatrixVisualizerpublic void invalidateCache(Palette palette)
Palette with the given index.
protected cern.colt.matrix.DoubleMatrix2D computeHitHistogram(GrowingSOM gsom)
throws LayerAccessException
GrowingSOM. Also sets the values of
minimumMatrixValue and maximumMatrixValue
LayerAccessException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||