public class MapPNode
extends edu.umd.cs.piccolo.PNode
SOMViewer application. This class makes use of the Piccolo framework and is the top PNode for all
map-level visualisations. The class holds several other PNodes as children:
GeneralUnitPNode - unitscurrentVisualizationImagebackgroundImage| Modifier and Type | Field and Description |
|---|---|
private edu.umd.cs.piccolo.nodes.PImage |
backgroundImage |
private boolean |
backgroundImageVisible |
private SOMLibClassInformation |
classInfo |
private TreeBuilder |
clusteringTreeBuilder |
private java.util.SortedMap<java.lang.Integer,ClusterElementsStorage> |
currentClusteringElements |
private ClusteringTree |
currentClusteringTree |
private BackgroundImageVisualizer |
currentVisualization |
protected edu.umd.cs.piccolo.nodes.PImage |
currentVisualizationImage |
private int |
currentVisualizationVariant |
private SOMLibDataInformation |
dataInfo |
static java.awt.Font |
DEFAULT_TOOLTIP_FONT |
static java.awt.Font |
DEFAULT_TOOLTIP_FONT_UNITINFO |
static int |
DEFAULT_UNIT_HEIGHT |
static int |
DEFAULT_UNIT_WIDTH |
private GrowingSOM |
gsom |
private edu.umd.cs.piccolo.PNode |
imageDataNode
Holds the images associated with the mapped input vectors
|
private edu.umd.cs.piccolo.PNode |
inputCorrectionsPNode |
private edu.umd.cs.piccolo.nodes.PPath |
inputLinkagePath |
private SharedSOMVisualisationData |
inputObjects |
private edu.umd.cs.piccolo.PNode |
manualLabels
Holds the manually placed labels
|
private java.awt.image.BufferedImage |
originalBackgroundImage |
private AbstractMatrixVisualizer |
overlayVis |
private int |
overlayVis_index |
private edu.umd.cs.piccolo.nodes.PImage |
overlayVisualizationImage |
private javax.swing.JFrame |
parentFrame |
private static long |
serialVersionUID |
private CommonSOMViewerStateData |
state |
private int |
UNIT_HEIGHT |
private int |
UNIT_WIDTH |
private GeneralUnitPNode[][] |
units |
private edu.umd.cs.piccolo.PNode |
unitsNode |
private BackgroundImageVisualizer[] |
visualizations
Deprecated.
use
Visualizations instead |
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE| Constructor and Description |
|---|
MapPNode(javax.swing.JFrame parentFrame,
GrowingSOM gsom,
GrowingLayer growingLayer,
CommonSOMViewerStateData state)
Constructor for a already loaded GrowingLayer - can be used for visualize sublayers of a ghsom!
|
MapPNode(javax.swing.JFrame parentFrame,
SOMLibFormatInputReader inputReader,
CommonSOMViewerStateData state,
boolean inizializeVis)
Constructor if input files have already been read.
|
MapPNode(javax.swing.JFrame parentFrame,
java.lang.String weightVectorFileName,
java.lang.String unitDescriptionFileName,
java.lang.String mapDescriptionFileName,
CommonSOMViewerStateData state)
Default constructors - reading of input files not yet done.
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildTree(ClusteringTree tree)
Rebuilds a clustering from the given tree.
|
void |
buildTree(TreeBuilder builder)
Creates new
TreeBuilder. |
boolean |
changePalette(Palette palette) |
void |
clearHistogramOverlayVisualization()
Removes temporary histogram based visualization
|
void |
clearInputCorrections() |
void |
clearInputCorrections(InputCorrections.CreationType type) |
private void |
createDataImages() |
void |
createInputCorrectionArrows() |
void |
createLabel()
Adds a manual label to the map.
|
java.util.ArrayList<edu.umd.cs.piccolo.PNode> |
getAllClusterLabels() |
java.awt.image.BufferedImage |
getBackgroundImage() |
private int |
getBackgroundImageHeight() |
private int |
getBackgroundImageWidth() |
java.awt.Color[] |
getClassLegendColors() |
java.lang.String[] |
getClassLegendNames() |
ClusteringTree |
getClusteringTree() |
TreeBuilder |
getClusteringTreeBuilder() |
java.util.ArrayList<edu.umd.cs.piccolo.PNode>[] |
getClusterLabelsByLevel() |
ClusteringTree |
getCurrentClusteringTree() |
BackgroundImageVisualizer |
getCurrentVisualization() |
GeneralUnitPNode |
getGeneralUnitPNodeAtPos(double x,
double y) |
GeneralUnitPNode |
getGeneralUnitPNodeAtPos(float x,
float y) |
GeneralUnitPNode |
getGeneralUnitPNodeAtPos(java.awt.geom.Point2D p) |
GrowingSOM |
getGsom() |
double |
getHeight()
Return the map height in pixels, i.e.
|
edu.umd.cs.piccolo.PNode |
getInputCorrectionsPNode() |
SharedSOMVisualisationData |
getInputObjects() |
edu.umd.cs.piccolo.PNode |
getManualLabels() |
javax.swing.JFrame |
getParentFrame() |
private java.awt.Point |
getPointLocation(java.lang.String name)
Calculates the absolute position of an input on the
MapPNode. |
private int |
getScaledBackgroundImageHeight() |
private int |
getScaledBackgroundImageHeight(BackgroundImageVisualizer visualization) |
private int |
getScaledBackgroundImageWidth() |
private int |
getScaledBackgroundImageWidth(BackgroundImageVisualizer visualization) |
java.awt.Point[] |
getStarCoords(Unit unit,
int unitSize) |
CommonSOMViewerStateData |
getState() |
ThematicClassMapVisualizer |
getThematicClassMapVisualizer()
Deprecated.
use
Visualizations instead |
GeneralUnitPNode |
getUnit(int x,
int y)
Return the GeneralUnitPNode at the unit index x/y.
|
GeneralUnitPNode |
getUnit(Unit u)
Return the GeneralUnitPNode at the unit index x/y.
|
int |
getUnitHeight()
Return the unit height in pixels.
|
edu.umd.cs.piccolo.PNode |
getUnitsNode() |
int |
getUnitWidth()
Return the unit width in pixles.
|
private java.awt.image.BufferedImage |
getVisualisation()
Gets the visualisation variant from the current
currentVisualization obtaining the values from
currentVisualizationVariant, getScaledBackgroundImageWidth() and
getScaledBackgroundImageHeight(). |
BackgroundImageVisualizer[] |
getVisualizations()
Deprecated.
use
Visualizations.singleton instead |
double |
getWidth()
Return the map width in pixels, i.e.
|
boolean |
hasDataImages() |
private void |
init(javax.swing.JFrame parentFrame,
SOMLibFormatInputReader inputReader,
CommonSOMViewerStateData state,
GrowingLayer growingLayer,
boolean inizializeVis) |
private void |
initCurrentVisualisation() |
private java.awt.Point[][] |
initInputLocations(Unit unit)
Computes the locations of each input vector within a specific unit
|
boolean |
isBackgroundImageVisible() |
void |
reInitLabels() |
void |
reInitUnitDetails() |
void |
reInitUnitPNodes(int detailLevel) |
boolean |
reloadPaletteAfterEditing(Palette palette)
Reloads the given palette after it has been edited with the
PaletteEditor, i.e. |
void |
resetArrows()
Resets the list of arrows originating from a unit for each unit on the map.
|
boolean |
reversePalette() |
void |
setBackgroundImage(java.awt.image.BufferedImage background) |
void |
setBackgroundImageVisibility(boolean visible) |
boolean |
setBounds(double x,
double y,
double width,
double height) |
void |
setClassColor(int index,
java.awt.Color color) |
void |
setClassColors(java.awt.Color[] colors) |
void |
setClusteringElements(java.util.SortedMap<java.lang.Integer,ClusterElementsStorage> elements)
Replaces currentClusteringElements with elements and makes sure the correct stuff is displayed.
|
boolean |
setInitialVisualizationOnStartup(BackgroundImageVisualizer vis,
int variant)
Method to be used for setting the initial visualisation on startup - does not actually create the image, just
sets the
currentVisualization and currentVisualizationVariant. |
void |
setInputCorrectionsVisible(boolean visible) |
void |
setLinkageVisibilityMode(boolean visible) |
void |
setNoVisualization() |
void |
setShowOnlySelectedClasses(boolean selectedClassesOnly) |
boolean |
setVisualization(BackgroundImageVisualizer vis,
int variant) |
boolean |
setVisualization(int vis,
int variant) |
void |
showClusters(int count)
Display the specified number of clusters
|
void |
showClusters(int count,
boolean sticky)
Display the specified number of Clusters.
|
void |
showHistogramOverlayVisualization(int[][] hist,
int vis_index)
Creates a histogram based visualization, which is *temporarily* placed over the current visualization
|
void |
updateClassInfo(SOMLibClassInformation classInfo) |
void |
updateClassSelection(int[] indices) |
void |
updateClassVisibility() |
void |
updateDataImagesVisibility() |
void |
updateDetailsAfterMoving() |
void |
updatePointLocations() |
void |
updateVisualization() |
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, internalUpdateBounds, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, paint, paintAfterChildren, paramString, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaintprivate static final long serialVersionUID
public static final int DEFAULT_UNIT_HEIGHT
public static final int DEFAULT_UNIT_WIDTH
public static final java.awt.Font DEFAULT_TOOLTIP_FONT
public static final java.awt.Font DEFAULT_TOOLTIP_FONT_UNITINFO
private GrowingSOM gsom
private SOMLibClassInformation classInfo
private SOMLibDataInformation dataInfo
private GeneralUnitPNode[][] units
private int UNIT_WIDTH
private int UNIT_HEIGHT
@Deprecated private BackgroundImageVisualizer[] visualizations
Visualizations insteadprivate BackgroundImageVisualizer currentVisualization
private int currentVisualizationVariant
private edu.umd.cs.piccolo.nodes.PImage backgroundImage
protected edu.umd.cs.piccolo.nodes.PImage currentVisualizationImage
private AbstractMatrixVisualizer overlayVis
private int overlayVis_index
private edu.umd.cs.piccolo.nodes.PImage overlayVisualizationImage
private java.util.SortedMap<java.lang.Integer,ClusterElementsStorage> currentClusteringElements
private ClusteringTree currentClusteringTree
private edu.umd.cs.piccolo.PNode manualLabels
private edu.umd.cs.piccolo.PNode unitsNode
private edu.umd.cs.piccolo.PNode inputCorrectionsPNode
private edu.umd.cs.piccolo.PNode imageDataNode
private SharedSOMVisualisationData inputObjects
private javax.swing.JFrame parentFrame
private CommonSOMViewerStateData state
private java.awt.image.BufferedImage originalBackgroundImage
private boolean backgroundImageVisible
private edu.umd.cs.piccolo.nodes.PPath inputLinkagePath
private TreeBuilder clusteringTreeBuilder
public MapPNode(javax.swing.JFrame parentFrame,
java.lang.String weightVectorFileName,
java.lang.String unitDescriptionFileName,
java.lang.String mapDescriptionFileName,
CommonSOMViewerStateData state)
throws java.io.FileNotFoundException,
SOMLibFileFormatException
java.io.FileNotFoundExceptionSOMLibFileFormatExceptionpublic MapPNode(javax.swing.JFrame parentFrame,
SOMLibFormatInputReader inputReader,
CommonSOMViewerStateData state,
boolean inizializeVis)
public MapPNode(javax.swing.JFrame parentFrame,
GrowingSOM gsom,
GrowingLayer growingLayer,
CommonSOMViewerStateData state)
private void init(javax.swing.JFrame parentFrame,
SOMLibFormatInputReader inputReader,
CommonSOMViewerStateData state,
GrowingLayer growingLayer,
boolean inizializeVis)
private void createDataImages()
public void createInputCorrectionArrows()
public void updateDetailsAfterMoving()
private java.awt.Point getPointLocation(java.lang.String name)
MapPNode.public java.awt.Point[] getStarCoords(Unit unit, int unitSize)
private java.awt.Point[][] initInputLocations(Unit unit)
@Deprecated public BackgroundImageVisualizer[] getVisualizations()
Visualizations.singleton instead@Deprecated public ThematicClassMapVisualizer getThematicClassMapVisualizer()
Visualizations insteadpublic BackgroundImageVisualizer getCurrentVisualization()
public void setNoVisualization()
public void updateVisualization()
private void initCurrentVisualisation()
public void showHistogramOverlayVisualization(int[][] hist,
int vis_index)
hist - int[][] with histogram data, e.g. unit countsvis_index - visualization variant index (0 = flat, 1 = smoothed)public void clearHistogramOverlayVisualization()
public boolean reversePalette()
throws SOMToolboxException
SOMToolboxExceptionpublic boolean reloadPaletteAfterEditing(Palette palette) throws SOMToolboxException
PaletteEditor, i.e. basically invalidates the
cache for all visualisations and then calls changePalette(Palette)SOMToolboxExceptionpublic boolean changePalette(Palette palette) throws SOMToolboxException
SOMToolboxExceptionpublic void showClusters(int count)
public void showClusters(int count,
boolean sticky)
sticky - should this level ov clustering stay visible when other levels of clustering are displayed.public void buildTree(TreeBuilder builder) throws ClusteringAbortedException
TreeBuilder. if the builder is null, the current clustering is removed.ClusteringAbortedExceptionpublic void buildTree(ClusteringTree tree)
public ClusteringTree getCurrentClusteringTree()
public void setClusteringElements(java.util.SortedMap<java.lang.Integer,ClusterElementsStorage> elements)
public void createLabel()
public edu.umd.cs.piccolo.PNode getManualLabels()
public java.util.ArrayList<edu.umd.cs.piccolo.PNode> getAllClusterLabels()
public java.util.ArrayList<edu.umd.cs.piccolo.PNode>[] getClusterLabelsByLevel()
public ClusteringTree getClusteringTree()
private int getScaledBackgroundImageWidth()
private int getScaledBackgroundImageWidth(BackgroundImageVisualizer visualization)
private int getScaledBackgroundImageHeight()
private int getScaledBackgroundImageHeight(BackgroundImageVisualizer visualization)
private int getBackgroundImageWidth()
private int getBackgroundImageHeight()
public boolean setVisualization(int vis,
int variant)
throws SOMToolboxException
SOMToolboxExceptionpublic boolean setInitialVisualizationOnStartup(BackgroundImageVisualizer vis, int variant) throws SOMToolboxException
currentVisualization and currentVisualizationVariant.SOMToolboxExceptionprivate java.awt.image.BufferedImage getVisualisation()
throws SOMToolboxException
currentVisualization obtaining the values from
currentVisualizationVariant, getScaledBackgroundImageWidth() and
getScaledBackgroundImageHeight().SOMToolboxExceptionpublic boolean setVisualization(BackgroundImageVisualizer vis, int variant) throws SOMToolboxException
SOMToolboxExceptionpublic GeneralUnitPNode getUnit(int x, int y)
public GeneralUnitPNode getUnit(Unit u)
public int getUnitWidth()
public int getUnitHeight()
public double getWidth()
getWidth in class edu.umd.cs.piccolo.PNodepublic double getHeight()
getHeight in class edu.umd.cs.piccolo.PNodepublic boolean setBounds(double x,
double y,
double width,
double height)
setBounds in class edu.umd.cs.piccolo.PNodepublic void setLinkageVisibilityMode(boolean visible)
public void reInitUnitDetails()
public java.awt.Color[] getClassLegendColors()
public void setClassColor(int index,
java.awt.Color color)
public void setClassColors(java.awt.Color[] colors)
public java.lang.String[] getClassLegendNames()
public void setShowOnlySelectedClasses(boolean selectedClassesOnly)
public void updateClassSelection(int[] indices)
public void updateDataImagesVisibility()
public boolean hasDataImages()
public void updatePointLocations()
public SharedSOMVisualisationData getInputObjects()
public void updateClassInfo(SOMLibClassInformation classInfo)
public void updateClassVisibility()
public GrowingSOM getGsom()
public void setBackgroundImage(java.awt.image.BufferedImage background)
public void setBackgroundImageVisibility(boolean visible)
public void reInitLabels()
public java.awt.image.BufferedImage getBackgroundImage()
public boolean isBackgroundImageVisible()
public CommonSOMViewerStateData getState()
public javax.swing.JFrame getParentFrame()
public void resetArrows()
public void reInitUnitPNodes(int detailLevel)
public edu.umd.cs.piccolo.PNode getInputCorrectionsPNode()
public void setInputCorrectionsVisible(boolean visible)
public void clearInputCorrections()
public void clearInputCorrections(InputCorrections.CreationType type)
public TreeBuilder getClusteringTreeBuilder()
public GeneralUnitPNode getGeneralUnitPNodeAtPos(java.awt.geom.Point2D p)
public GeneralUnitPNode getGeneralUnitPNodeAtPos(double x, double y)
public GeneralUnitPNode getGeneralUnitPNodeAtPos(float x, float y)
public edu.umd.cs.piccolo.PNode getUnitsNode()