at.tuwien.ifs.somtoolbox.visualization.thematicmap
Class RegionManager

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.visualization.thematicmap.RegionManager

public class RegionManager
extends Object

Version:
$Id: RegionManager.java 3888 2010-11-02 17:42:53Z frank $
Author:
Taha Abdel Aziz

Field Summary
static int BORDER
           
(package private)  SOMLibClassInformation classInfo
           
static int DEFAULT_ZOOM_FACTOR
           
(package private)  int height
           
(package private)  int initialSize
           
(package private)  edu.cornell.cs.voronoi.Simplex initialTriangle
           
(package private)  edu.cornell.cs.voronoi.DelaunayTriangulation mainDt
           
(package private)  double min_visible_class
           
private  org.jfree.util.PaintList paintList
           
(package private)  ArrayList<SOMRegion> regions
           
(package private)  edu.cornell.cs.voronoi.DelaunayTriangulation resolvedDt
           
(package private)  int width
           
private  int zoom
           
 
Constructor Summary
RegionManager(SOMLibClassInformation classInfo, org.jfree.util.PaintList paintList, int width, int height, double min_visible_class)
           
RegionManager(SOMLibClassInformation classInfo, org.jfree.util.PaintList paintList, int width, int height, double min_visible_class, int zoom)
          Creates a new instance of SOMegions
 
Method Summary
 SOMRegion addNewRegion(Unit unit)
           
 void build()
           
 void build(ArrayList<SOMRegion> regions, edu.cornell.cs.voronoi.DelaunayTriangulation dt)
           
 void cut()
           
 void drawDelaunayTrangulation(Graphics2D g)
           
 void drawRegions(Graphics2D g)
           
 void fillRegions(Graphics2D g, boolean chessboard)
           
 void fillSingleRegion(Graphics2D g, boolean chessboard, int ClassID)
          Fills SOMRegions according to the specified ClassID.
 SOMRegion getMaximumEntropyRegion()
          Goes through all the Regions and returns the Region with smallest Entropy Error.
 SOMRegion getMinimumEntropyRegion()
          Goes through all the Regions and returns the Region with biggest Entropy Error.
 SOMRegion getRegion(ArrayList<SOMRegion> candidates, double x, double y)
           
 SOMRegion getRegion(ArrayList<SOMRegion> candidates, edu.cornell.cs.voronoi.Pnt center)
           
 ArrayList<SOMRegion> getRegions()
           
 void removeRegion(SOMRegion r)
           
 void resetResolvingState()
          Allows to reset the resolved state, for reusing the diagram.
 void resolve()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BORDER

public static final int BORDER
See Also:
Constant Field Values

DEFAULT_ZOOM_FACTOR

public static final int DEFAULT_ZOOM_FACTOR
See Also:
Constant Field Values

zoom

private int zoom

initialSize

int initialSize

width

int width

height

int height

regions

ArrayList<SOMRegion> regions

initialTriangle

edu.cornell.cs.voronoi.Simplex initialTriangle

mainDt

edu.cornell.cs.voronoi.DelaunayTriangulation mainDt

resolvedDt

edu.cornell.cs.voronoi.DelaunayTriangulation resolvedDt

classInfo

SOMLibClassInformation classInfo

min_visible_class

double min_visible_class

paintList

private org.jfree.util.PaintList paintList
Constructor Detail

RegionManager

public RegionManager(SOMLibClassInformation classInfo,
                     org.jfree.util.PaintList paintList,
                     int width,
                     int height,
                     double min_visible_class)

RegionManager

public RegionManager(SOMLibClassInformation classInfo,
                     org.jfree.util.PaintList paintList,
                     int width,
                     int height,
                     double min_visible_class,
                     int zoom)
Creates a new instance of SOMegions

Method Detail

getRegion

public SOMRegion getRegion(ArrayList<SOMRegion> candidates,
                           double x,
                           double y)

getRegion

public SOMRegion getRegion(ArrayList<SOMRegion> candidates,
                           edu.cornell.cs.voronoi.Pnt center)

addNewRegion

public SOMRegion addNewRegion(Unit unit)

removeRegion

public void removeRegion(SOMRegion r)

drawRegions

public void drawRegions(Graphics2D g)

drawDelaunayTrangulation

public void drawDelaunayTrangulation(Graphics2D g)

fillRegions

public void fillRegions(Graphics2D g,
                        boolean chessboard)

fillSingleRegion

public void fillSingleRegion(Graphics2D g,
                             boolean chessboard,
                             int ClassID)
Fills SOMRegions according to the specified ClassID. Note that SOMRegions where the ClassID is not the Main class are colored lighter.


build

public void build()

cut

public void cut()

build

public void build(ArrayList<SOMRegion> regions,
                  edu.cornell.cs.voronoi.DelaunayTriangulation dt)

resolve

public void resolve()

resetResolvingState

public void resetResolvingState()
Allows to reset the resolved state, for reusing the diagram.


getMaximumEntropyRegion

public SOMRegion getMaximumEntropyRegion()
Goes through all the Regions and returns the Region with smallest Entropy Error. This is used in the End to spread the Value among the whole Palette Interval (used for Visualization)

Returns:
smallest Entropy

getMinimumEntropyRegion

public SOMRegion getMinimumEntropyRegion()
Goes through all the Regions and returns the Region with biggest Entropy Error. This is used in the End to spread the Value among the whole Palette Interval (used for Visualization)

Returns:
biggest Entropy

getRegions

public ArrayList<SOMRegion> getRegions()