edu.uthscsa.ric.visualization
Class SurfaceOverlay

java.lang.Object
  extended by edu.uthscsa.ric.visualization.SurfaceOverlay

public class SurfaceOverlay
extends Object

A SurfaceOverlay contains data related to surface coloring, often associated with an overlay image.


Field Summary
static float BRIGHTNESS_DEFAULT
           
static int DEFAULT_ALPHA
           
static String DEFAULT_LUT
           
protected  boolean hasPreparedForTimepoints
           
protected  boolean isBuilding
           
protected  boolean isProcessAllTimepoints
           
 
Constructor Summary
  SurfaceOverlay(float[] scalarsArray, Object overlay, String colorTableName, String name, float min, float max, float brightness)
          The constructor.
  SurfaceOverlay(FloatBuffer scalars, Object overlay, String colorTableName, String name, float min, float max, float brightness)
          The constructor.
protected SurfaceOverlay(Object overlay, String colorTableName, String name, float min, float max, float brightness)
           
 
Method Summary
protected  void addScalars(Object obj, int timepoint)
           
static void findScalarsRange(FloatBuffer scalars, float[] range)
          A utility method to scan the scalars buffer and find the maximum range.
 int getAlpha()
          Returns the alpha value of this surface overlay (used for color mixing, 0-255).
 float getBrightness()
          Returns the brightness of the overlay colors (default = 1.5).
 String getColorTableName()
          Returns the color table name.
 float getMax()
          Returns the maximum value of the color table range.
 float getMin()
          Returns the minimum value of the color table range.
 String getName()
          Returns the surface overlay name.
 int getNumScalars()
          Returns the number of scalars.
protected  int getNumTimepoints()
           
 Object getOverlay()
          Returns the associated overlay object.
 FloatBuffer getScalars()
          Returns the scalars buffer.
 float[] getScalarsArray()
          Returns the scalars array (used in Java3D 1.3).
 float getScalarsValue(int offset)
          Returns a scalar value.
protected  float getSearchDistance()
           
protected  Object getTempRGBData()
           
protected  boolean hasPreparedForTimepoints()
           
 boolean isAssociatedWithImage()
          Returns true if this SurfaceOverlay contains an overlay object.
 boolean isLoadedFromFile()
          Returns true if the surface overlay was loaded from file.
protected  boolean isProcessAllTimepoints()
           
protected  void prepareForTimepoints(int numTimepoints, int currentTimepoint)
           
 void setAlpha(int val)
          Sets the alpha value of this surface overlay (used for color mixing, 0-255).
 void setBrightness(float val)
          Sets the brightness of the overlay colors (default = 1.5).
 void setColorTableName(String name)
          Sets the color table name.
protected  void setCurrentTimepoint(int timepoint)
           
 void setName(String name)
          Sets the surface overlay name.
 void setOverlay(Object ovl)
          Sets the associated overlay object.
protected  void setProcessAllTimepoints(boolean bool)
           
 void setScalars(FloatBuffer buf)
          Sets the scalars buffer.
 void setScalarsValue(int offset, float value)
          Sets a scalar value.
 void setScreenRange(float min, float max)
          Sets the minimum and maximum values of the color table range.
protected  void setSearchDistance(float val)
           
protected  void setTempRGBData(Object ob)
           
 String toString()
          Returns the same as getName().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isBuilding

protected boolean isBuilding

hasPreparedForTimepoints

protected boolean hasPreparedForTimepoints

isProcessAllTimepoints

protected boolean isProcessAllTimepoints

DEFAULT_LUT

public static final String DEFAULT_LUT
See Also:
Constant Field Values

BRIGHTNESS_DEFAULT

public static final float BRIGHTNESS_DEFAULT
See Also:
Constant Field Values

DEFAULT_ALPHA

public static final int DEFAULT_ALPHA
See Also:
Constant Field Values
Constructor Detail

SurfaceOverlay

protected SurfaceOverlay(Object overlay,
                         String colorTableName,
                         String name,
                         float min,
                         float max,
                         float brightness)

SurfaceOverlay

public SurfaceOverlay(FloatBuffer scalars,
                      Object overlay,
                      String colorTableName,
                      String name,
                      float min,
                      float max,
                      float brightness)
The constructor.

Parameters:
scalars - the scalar values associated with this surface overlay
overlay - the overlay object
colorTableName - the color table name
name - the surface overlay name
min - the color table range minimum
max - the color table range maximum
brightness - the brightness of the surface overlay

SurfaceOverlay

public SurfaceOverlay(float[] scalarsArray,
                      Object overlay,
                      String colorTableName,
                      String name,
                      float min,
                      float max,
                      float brightness)
The constructor.

Parameters:
overlay - the overlay object
colorTableName - the color table name
name - the surface overlay name
min - the color table range minimum
max - the color table range maximum
brightness - the brightness of the surface overlay
Method Detail

getColorTableName

public String getColorTableName()
Returns the color table name.

Returns:
the color table name

setColorTableName

public void setColorTableName(String name)
Sets the color table name.

Parameters:
name - the color table name

getName

public String getName()
Returns the surface overlay name.

Returns:
the surface overlay name

setName

public void setName(String name)
Sets the surface overlay name.

Parameters:
name - the surface overlay name

getOverlay

public Object getOverlay()
Returns the associated overlay object.

Returns:
the overlay object

setOverlay

public void setOverlay(Object ovl)
Sets the associated overlay object.

Parameters:
ovl - the overlay object

isLoadedFromFile

public boolean isLoadedFromFile()
Returns true if the surface overlay was loaded from file.

Returns:
true if loaded from file, false otherwise

isAssociatedWithImage

public boolean isAssociatedWithImage()
Returns true if this SurfaceOverlay contains an overlay object.

Returns:
true if this SurfaceOverlay contains an overlay object, false otherwise

getScalars

public FloatBuffer getScalars()
Returns the scalars buffer.

Returns:
the scalars buffer

getScalarsArray

public float[] getScalarsArray()
Returns the scalars array (used in Java3D 1.3).

Returns:
the scalars array

setScalars

public void setScalars(FloatBuffer buf)
Sets the scalars buffer.

Parameters:
buf - the scalars buffer

getScalarsValue

public float getScalarsValue(int offset)
Returns a scalar value.

Parameters:
offset - offset into the buffer or array
Returns:
the value

setScalarsValue

public void setScalarsValue(int offset,
                            float value)
Sets a scalar value.

Parameters:
offset - offset into the buffer or array
value - the value to set

getNumScalars

public int getNumScalars()
Returns the number of scalars.

Returns:
the number of scalars

getMin

public float getMin()
Returns the minimum value of the color table range.

Returns:
the minimum value of the color table range

getMax

public float getMax()
Returns the maximum value of the color table range.

Returns:
the maximum value of the color table range

setScreenRange

public void setScreenRange(float min,
                           float max)
Sets the minimum and maximum values of the color table range.

Parameters:
min - the minimum value of the color table range
max - the maximum value of the color table range

getAlpha

public int getAlpha()
Returns the alpha value of this surface overlay (used for color mixing, 0-255).

Returns:
the alpha

setAlpha

public void setAlpha(int val)
Sets the alpha value of this surface overlay (used for color mixing, 0-255).

Parameters:
val - the alpha

getBrightness

public float getBrightness()
Returns the brightness of the overlay colors (default = 1.5).

Returns:
the brightness of the overlay colors

setBrightness

public void setBrightness(float val)
Sets the brightness of the overlay colors (default = 1.5).

Parameters:
val - the brightness of the overlay colors

findScalarsRange

public static void findScalarsRange(FloatBuffer scalars,
                                    float[] range)
A utility method to scan the scalars buffer and find the maximum range.

Parameters:
scalars - a FloatBuffer
range - a float array containing at least two indices (min = 0, max = 1)

toString

public String toString()
Returns the same as getName().

Overrides:
toString in class Object
Returns:
the name of the surface overlay

setTempRGBData

protected void setTempRGBData(Object ob)

getTempRGBData

protected Object getTempRGBData()

getSearchDistance

protected float getSearchDistance()

setSearchDistance

protected void setSearchDistance(float val)

prepareForTimepoints

protected void prepareForTimepoints(int numTimepoints,
                                    int currentTimepoint)

setCurrentTimepoint

protected void setCurrentTimepoint(int timepoint)
                            throws Exception
Throws:
Exception

addScalars

protected void addScalars(Object obj,
                          int timepoint)
                   throws Exception
Throws:
Exception

hasPreparedForTimepoints

protected boolean hasPreparedForTimepoints()

getNumTimepoints

protected int getNumTimepoints()

setProcessAllTimepoints

protected void setProcessAllTimepoints(boolean bool)

isProcessAllTimepoints

protected boolean isProcessAllTimepoints()