

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object core.field.Vec3Field core.postprocessing.Colorizer
Colorizer adds color to a given LIC image after it has been computed (post processing). It can simply add a color, or add a color and color code according to the magnituge of the field which is used to generate the LIC, in a variety of ways, or add a color which is determined by the region of the image. Colorizer does the colorization in HSV color space and then converts to RGB color space. Uses JAVA's Color class for the HSV > RGB conversion method.
Field Summary  
boolean 
bBrighten
Flag for doing more brightening of the image above the break point (brightening flushes out the streaks in the LIC at high field stregth to pure white). 
BaseObject 
emsource
This is our emsource which we use to get the field if we color by field magnitude. 
BaseExperiment 
experiment
This is the experiment which determines the colors by region via experiment.getHue() if we color by region. 
double 
fallOff
Rate at which color fades to black below the break point. 
boolean 
flatColor
If this flag is true we only color, if it is false we also color code the LIC to indicate the field strength of the vector field used to generate the LIC. 
Vec 
RegionColor
These are the values of the colors if we color by region. 
double 
saturationPoint
Break point level of the strength of the LIC field for deciding where to start color fade to black. 
double 
scale
This is the scale factor. 
Vec3 
symVec3
This is the center of the image, used in reconstructing the vector position in space r if we color by region. 
double 
TargetHue
Hue for the colorization of the field. 
double 
TargetSaturation
Saturation for the colorization of the field. 
double 
TargetValue
Value for the colorization of the field. 
Vec3 
Xdir
This is the X direction in plotting the image, used in reconstructing the vecor position in space r if we color by region. 
Vec3 
Ydir
This is the Y direction in plotting the image, used in reconstructing the vecor position in space r if we color by region. 
Constructor Summary  
Colorizer(double MyTargetHue,
double MyTargetSaturation,
double MyTargetValue,
double MysaturationPoint,
double MyfallOff,
boolean MyBrighten,
boolean MyflatColor)
This constructor is used when we are not coloring by region. 

Colorizer(double MyTargetHue,
double MyTargetSaturation,
double MyTargetValue,
double MysaturationPoint,
double MyfallOff,
boolean MyBrighten,
boolean MyflatColor,
Vec RegionColor,
BaseExperiment experiment,
BaseObject emsource,
Vec3 symVec3,
Vec3 Xdir,
Vec3 Ydir,
double scale)
This constructor is used when we are coloring by region. 
Method Summary  
private double 
Brighten(double fieldMag,
Vec3 p)
Brightens the image if we are well above the break point. 
private Vec3 
ConvertToRGB(float Hue,
float Saturation,
float Value)
Converts our HSV values to RGB values. 
private double 
DecreaseVal(double fieldMag)
Defines the value of V in HSV if we are below the break point in field strength. 
Vec3 
get(Vec3 p,
Vec2 xpos,
Vec3 f)
Takes the input p which codes the x and y field components at this point in the array and the image value, and returns an RGB color f for the pixel at this point in the array. 
private double 
IncreaseSat(double fieldMag)
Defines the value of S in HSV if we are above the break point in field strength. 
private static void 
println(java.lang.String s)
A local way to print a string 
Methods inherited from class core.field.Vec3Field 
get 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 
public double saturationPoint
public double TargetHue
public double TargetSaturation
public double TargetValue
public double fallOff
public boolean bBrighten
public boolean flatColor
public Vec RegionColor
public BaseExperiment experiment
public BaseObject emsource
public Vec3 symVec3
public Vec3 Xdir
public Vec3 Ydir
public double scale
Constructor Detail 
public Colorizer(double MyTargetHue, double MyTargetSaturation, double MyTargetValue, double MysaturationPoint, double MyfallOff, boolean MyBrighten, boolean MyflatColor)
MyTargetHue
 Color hue of field.MyTargetSaturation
 Color saturation of field, only used it flatcolor = true.MyTargetValue
 Color saturation of field, only used if flatcolr = trueMysaturationPoint
 Break point on field strength magnitude below which we fade to black.MyfallOff
 Rate at which field color goes to black below break point.MyBrighten
 Determines brightening algorithm.MyflatColor
 If true colors according to HSV = (MyTargetHue,MyTargetSaturatioin,MyTargetValue)public Colorizer(double MyTargetHue, double MyTargetSaturation, double MyTargetValue, double MysaturationPoint, double MyfallOff, boolean MyBrighten, boolean MyflatColor, Vec RegionColor, BaseExperiment experiment, BaseObject emsource, Vec3 symVec3, Vec3 Xdir, Vec3 Ydir, double scale)
MyTargetHue
 Color hue of field.MyTargetSaturation
 Color saturation of field, only used it flatcolor = true.MyTargetValue
 Color saturation of field, only used if flatcolr = trueMysaturationPoint
 Break point on field strength magnitude below which we fade to black.MyfallOff
 Rate at which field color goes to black below break point.MyBrighten
 Determines brightening algorithm.MyflatColor
 If true colors according to HSV = (MyTargetHue,MyTargetSaturatioin,MyTargetValue)RegionColor
 The values of the colors if we color by region.experiment
 The experiment which determines the colors by region via experiment.getHue() if we color by region.emsource
 The emsource which we use to get the field if we color by field magnitude.symVec3
 The center of the image, used in reconstructing the vector position in space r if we color by region.Xdir
 The X direction in plotting the image, used in reconstructing the vecor position in space r if we color by region.Ydir
 The Y direction in plotting the image, used in reconstructing the vecor position in space r if we color by region.scale
 The scale of the image.Method Detail 
public Vec3 get(Vec3 p, Vec2 xpos, Vec3 f)
get
in class Vec3Field
p
 The Vec3 p is input. The components p.x and p.y are the x and y values of the vector field used to generate the LIC at
this point in the array, and p.z is the image value of the LIC image at this point in the array (0255).f
 The RGB values of the color that we are returning for this image value at this point in the
array, based on the field magnitude given by the sqrt of the sum of the squares of p.x and p.y (for flatColor
not equal to true). This method is called from RGBImage.fromScalarImageMagnitude
private double IncreaseSat(double fieldMag)
fieldMag
 The value of magnitude of the field used to generate the LIC at this point.
private double DecreaseVal(double fieldMag)
fieldMag
 The value of magnitude of the field used to generate the LIC at this point.
private Vec3 ConvertToRGB(float Hue, float Saturation, float Value)
Hue
 H of HSV, as specified.Saturation
 S of HSV, computed based on the break point and fieldMag if flatColor == false.Value
 V of HSV, computed based on the break point and fieldMag if flatColor == false.
private double Brighten(double fieldMag, Vec3 p)
fieldMag
 The magnitude of the field at this point in the array.p
 The quantity p.z is the only component of p used here, and it is the image value of the LIC image
at this point in the array (0255).
private static void println(java.lang.String s)


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 