edu.jhu.cs.cisst.vent.renderer.processing
Class VectorField2DRenderer

java.lang.Object
  extended by edu.jhu.cs.cisst.vent.renderer.processing.RendererProcessing
      extended by edu.jhu.cs.cisst.vent.renderer.processing.RendererProcessing2D
          extended by edu.jhu.cs.cisst.vent.renderer.processing.VectorField2DRenderer
All Implemented Interfaces:
VisualizationParameters, ParamViewObserver

public class VectorField2DRenderer
extends RendererProcessing2D

The Class VectorField2DRenderer.


Field Summary
protected  VisualizationProcessing applet
          The applet.
protected  java.awt.Color arrowColor
          The arrow color.
protected  ParamColor arrowColorParam
          The arrow color param.
protected  float arrowHeadHeight
          The arrow head height.
protected  ParamFloat arrowHeadHeightParam
          The arrow head height param.
protected  float arrowHeadWidth
          The arrow head width.
protected  ParamFloat arrowHeadWidthParam
          The arrow head width param.
protected  float arrowWidth
          The arrow width.
protected  ParamFloat arrowWidthParam
          The arrow width param.
protected  float brightness
          The brightness.
protected  int cols
          The cols.
protected  float contrast
          The contrast.
protected  ImageDataFloat image
          The image.
protected  float[][] magImage
          The magnitude image.
protected  float maxMagnitude
          The max magnitude.
protected  int rows
          The cols.
protected  int sampleRate
          The sample rate.
protected  ParamInteger sampleRateParam
          The sample rate param.
protected  float transparency
          The transparency.
protected  ParamFloat transparencyParam
          The transparency param.
protected  Vector2f[][] vectorField
          The vector field.
protected  boolean visible
          The visible.
protected  ParamBoolean visibleParam
          The visible param.
 
Fields inherited from class edu.jhu.cs.cisst.vent.renderer.processing.RendererProcessing2D
bounds
 
Constructor Summary
VectorField2DRenderer(ImageDataFloat img, VisualizationProcessing applet)
          Instantiates a new vector field2 d renderer.
 
Method Summary
protected  void clearCache()
          Clear cache.
 void createVisualizationParameters(ParamCollection visualizationParameters)
          Creates the visualization parameters.
 void draw()
          Draw.
protected  void draw(int x, int y, Vector3f v)
          Draw.
 Vector2f[][] getVectorField()
          Gets the vector field.
 void setArrowColor(java.awt.Color arrowColor)
          Sets the arrow color.
 void setArrowHeadHeight(float arrowHeadHeight)
          Sets the arrow head height.
 void setArrowHeadWidth(float arrowHeadWidth)
          Sets the arrow head width.
 void setBrightness(float brightness)
          Sets the brightness.
 void setContrast(float contrast)
          Sets the contrast.
 void setSampleRate(int sampleRate)
          Sets the sample rate.
 void setTransparency(float transparency)
          Sets the transparency.
 void setup()
          Setup.
 void setVisible(boolean visible)
          Sets the visible.
 void update(ParamModel model, ParamInputView view)
          Update.
 void updateVisualizationParameters()
          Update all visualization parameters.
 
Methods inherited from class edu.jhu.cs.cisst.vent.renderer.processing.RendererProcessing2D
contains, getHeight, getPositionX, getPositionY, getWidth, setBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

protected ImageDataFloat image
The image.


vectorField

protected Vector2f[][] vectorField
The vector field.


magImage

protected float[][] magImage
The magnitude image.


contrast

protected float contrast
The contrast.


brightness

protected float brightness
The brightness.


transparency

protected float transparency
The transparency.


sampleRate

protected int sampleRate
The sample rate.


arrowHeadWidth

protected float arrowHeadWidth
The arrow head width.


arrowHeadHeight

protected float arrowHeadHeight
The arrow head height.


arrowWidth

protected float arrowWidth
The arrow width.


arrowWidthParam

protected ParamFloat arrowWidthParam
The arrow width param.


visible

protected boolean visible
The visible.


rows

protected int rows
The cols.


cols

protected int cols
The cols.


arrowColor

protected java.awt.Color arrowColor
The arrow color.


arrowColorParam

protected ParamColor arrowColorParam
The arrow color param.


applet

protected VisualizationProcessing applet
The applet.


maxMagnitude

protected float maxMagnitude
The max magnitude.


sampleRateParam

protected ParamInteger sampleRateParam
The sample rate param.


visibleParam

protected ParamBoolean visibleParam
The visible param.


transparencyParam

protected ParamFloat transparencyParam
The transparency param.


arrowHeadWidthParam

protected ParamFloat arrowHeadWidthParam
The arrow head width param.


arrowHeadHeightParam

protected ParamFloat arrowHeadHeightParam
The arrow head height param.

Constructor Detail

VectorField2DRenderer

public VectorField2DRenderer(ImageDataFloat img,
                             VisualizationProcessing applet)
Instantiates a new vector field2 d renderer.

Parameters:
img - the img
applet - the applet
Method Detail

setArrowHeadWidth

public void setArrowHeadWidth(float arrowHeadWidth)
Sets the arrow head width.

Parameters:
arrowHeadWidth - the new arrow head width

setArrowHeadHeight

public void setArrowHeadHeight(float arrowHeadHeight)
Sets the arrow head height.

Parameters:
arrowHeadHeight - the new arrow head height

setArrowColor

public void setArrowColor(java.awt.Color arrowColor)
Sets the arrow color.

Parameters:
arrowColor - the new arrow color

clearCache

protected void clearCache()
Clear cache.


setTransparency

public void setTransparency(float transparency)
Sets the transparency.

Parameters:
transparency - the new transparency

setVisible

public void setVisible(boolean visible)
Sets the visible.

Parameters:
visible - the new visible

setSampleRate

public void setSampleRate(int sampleRate)
Sets the sample rate.

Parameters:
sampleRate - the new sample rate

getVectorField

public Vector2f[][] getVectorField()
Gets the vector field.

Returns:
the vector field

setup

public void setup()
Setup.

Specified by:
setup in class RendererProcessing
See Also:
edu.jhu.cs.cisst.vent.renderers.RendererProcessing#setup()

draw

public void draw()
Draw.

Specified by:
draw in class RendererProcessing
See Also:
edu.jhu.cs.cisst.vent.renderers.RendererProcessing#draw()

draw

protected void draw(int x,
                    int y,
                    Vector3f v)
Draw.

Parameters:
x - the x
y - the y
v - the v

setContrast

public void setContrast(float contrast)
Sets the contrast.

Parameters:
contrast - the new contrast

setBrightness

public void setBrightness(float brightness)
Sets the brightness.

Parameters:
brightness - the new brightness

createVisualizationParameters

public void createVisualizationParameters(ParamCollection visualizationParameters)
Creates the visualization parameters.

Parameters:
visualizationParameters - the visualization parameters
See Also:
VisualizationParameters.createVisualizationParameters(edu.jhu.ece.iacl.jist.pipeline.parameter.ParamCollection)

update

public void update(ParamModel model,
                   ParamInputView view)
Update.

Parameters:
model - the model
view - the view
See Also:
ParamViewObserver.update(edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel, edu.jhu.ece.iacl.jist.pipeline.view.input.ParamInputView)

updateVisualizationParameters

public void updateVisualizationParameters()
Description copied from interface: VisualizationParameters
Update all visualization parameters.