motris.gui
Class VectorFieldLayer

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.gui.ColorizedLayer
              extended bymotris.gui.VectorFieldLayer
All Implemented Interfaces:
Layer, ParameterizedObject
Direct Known Subclasses:
DerivativeLayer, DisplacementRateDisplayLayer, EdgeElementAssignmentLayer, EdgeElementView, OpticalFlowDisplayLayer

public abstract class VectorFieldLayer
extends ColorizedLayer

Abstract Display Layer for the visualization of Data that contains a 3-d vector at each pixel

Author:
ottlik

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
protected  boolean allowCustomDraw
           
protected static int ANGLEMODE
           
(package private)  boolean blackPointsTransparent
           
private  double clipMax
           
private  double clipMin
           
protected static int CUSTOMMODE
           
protected static java.lang.String D2
           
protected static java.lang.String D3
           
protected  java.awt.image.BufferedImage displayImage
           
protected  int displayMode
           
(package private)  double maxValue
           
(package private)  double minValue
           
protected static int NORMMODE
           
(package private)  double opacity
           
private  boolean useAbsolute
           
(package private)  double[][][] vectorData
           
protected static int VECTORMODE
           
(package private)  int xoff
           
(package private)  int yoff
           
 
Fields inherited from class motris.gui.ColorizedLayer
color, strokeWidth
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
VectorFieldLayer()
           
VectorFieldLayer(java.awt.Color color)
           
 
Method Summary
 void colorizedDraw(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 void drawAngle(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 void drawArrow(java.awt.Graphics g, int xpos, int ypos, int vecx, int vecy)
           
 void drawArrows(java.awt.Graphics g, double zoomFactor)
           
abstract  void drawCustom(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 void drawNorm(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 int getColor(double value)
           
(package private) abstract  java.lang.String getCustomDrawName()
           
 double getNormalizedValue(double value)
           
 ParameterSet getParameters()
          Get a Vector of Strings with a description of each Parameter
 ParameterSet getPixelDetails(Double2Vector position)
          Get Detailed information (read-only) for pixel
 java.awt.Dimension getPreferedDimension(int currentTime)
           
private  double norm2D(double[] vector)
           
 boolean setParameters(ParameterSet _params)
          Set Parameters of this class
abstract  void setVectorData()
           
 
Methods inherited from class motris.gui.ColorizedLayer
draw, getIdentification
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
addParameterChangedListener, finalize, fireParameterChanged, parameterEdited, removeParameterChangedListener
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface motris.gui.Layer
getDisplayedName
 
Methods inherited from interface parameter.ParameterizedObject
addParameterChangedListener, parameterEdited, removeParameterChangedListener
 

Field Detail

VECTORMODE

protected static int VECTORMODE

NORMMODE

protected static int NORMMODE

ANGLEMODE

protected static int ANGLEMODE

CUSTOMMODE

protected static int CUSTOMMODE

D2

protected static java.lang.String D2

D3

protected static java.lang.String D3

vectorData

double[][][] vectorData

xoff

int xoff

yoff

int yoff

displayMode

protected int displayMode

displayImage

protected java.awt.image.BufferedImage displayImage

opacity

double opacity

useAbsolute

private boolean useAbsolute

minValue

double minValue

maxValue

double maxValue

allowCustomDraw

protected boolean allowCustomDraw

clipMin

private double clipMin

clipMax

private double clipMax

blackPointsTransparent

boolean blackPointsTransparent
Constructor Detail

VectorFieldLayer

public VectorFieldLayer()

VectorFieldLayer

public VectorFieldLayer(java.awt.Color color)
Method Detail

colorizedDraw

public void colorizedDraw(java.awt.Graphics g,
                          javax.swing.JPanel _c,
                          double zoomFactor)
Specified by:
colorizedDraw in class ColorizedLayer

drawArrows

public void drawArrows(java.awt.Graphics g,
                       double zoomFactor)

drawArrow

public void drawArrow(java.awt.Graphics g,
                      int xpos,
                      int ypos,
                      int vecx,
                      int vecy)

drawNorm

public void drawNorm(java.awt.Graphics g,
                     javax.swing.JPanel _c,
                     double zoomFactor)

getNormalizedValue

public double getNormalizedValue(double value)

drawCustom

public abstract void drawCustom(java.awt.Graphics g,
                                javax.swing.JPanel _c,
                                double zoomFactor)

getColor

public int getColor(double value)

drawAngle

public void drawAngle(java.awt.Graphics g,
                      javax.swing.JPanel _c,
                      double zoomFactor)

norm2D

private double norm2D(double[] vector)

getPreferedDimension

public java.awt.Dimension getPreferedDimension(int currentTime)

setVectorData

public abstract void setVectorData()

getParameters

public ParameterSet getParameters()
Description copied from interface: ParameterizedObject
Get a Vector of Strings with a description of each Parameter

Specified by:
getParameters in interface ParameterizedObject
Overrides:
getParameters in class ColorizedLayer

setParameters

public boolean setParameters(ParameterSet _params)
Description copied from interface: ParameterizedObject
Set Parameters of this class

Specified by:
setParameters in interface ParameterizedObject
Overrides:
setParameters in class ColorizedLayer

getCustomDrawName

abstract java.lang.String getCustomDrawName()

getPixelDetails

public ParameterSet getPixelDetails(Double2Vector position)
Description copied from interface: Layer
Get Detailed information (read-only) for pixel

Specified by:
getPixelDetails in interface Layer
Overrides:
getPixelDetails in class ColorizedLayer