|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.rendering.Renderer
The Renderer class handles all the code that draws and evolves the DLIC and the experiment. Built in are several handlers for adjusting all of the rendering parameters that might conceivably need adjusting (image size, kernel matrix, streamlength, color coding mode, etc.). The main() should create an instance of the desired experiment and pass it to an instance of this renderer, followed (if necessary) by a series of calls to the Renderer's configuration handlers, and concluded with a call to the renderer's StartRender() function. DLIC generation will then proceed as usual.
Field Summary | |
static int |
CM_COLOR_1
The image is a colored image generated using the first color coding algorithm |
static int |
CM_COLOR_2
The image is a colored image generated using the second color coding algorithm |
static int |
CM_COLOR_3
The image is a colored image generated using the third color coding algorithm |
static int |
CM_COLOR_4
The image is a colored image generated using the fourth color coding algorithm, which is regional coloring |
static int |
CM_GREYSCALE
The image is greyscale |
(package private) double |
colorHue
The HSV hue of the color used in the image. |
(package private) int |
colorMode
The color mode of the image (that is, how the image is colored). |
(package private) double |
colorSaturation
The HSV saturation S of the color used in the image for color mode 1. |
(package private) double |
colorStrength
This essentially controls how bright the color will be, and how quickly it starts to fall off to black. |
(package private) double |
colorValue
The HSV value V of the color used in the image for color mode 1. |
(package private) int |
doubleHeight
double the height of the output image in pixels. |
(package private) int |
doubleWidth
double the width of the output image in pixels. |
(package private) double |
dt
Time step for evolution between frames |
(package private) int |
endFrame
The end frame of the inteval where we will actually render an image. |
(package private) BaseExperiment |
experiment
|
(package private) double |
fallOff
rate at which color falls to black below the saturation value |
(package private) int |
filterRepeat
The number of times the kernel is applied to the image (normally should be 1). |
(package private) double |
FluidFlowSpeed
Flowspeed when we let have flow along E(B) varying with the magnitude of E(B) |
(package private) java.lang.String |
fname
String which is the path for the sequence file name of the tiffs produced, including the full path to those files. |
(package private) double |
Fnorm
Field normalization for the flowspeed when we let have flow along E(B) varying with the magnitude of E(B) The calculated speed is FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
(package private) double |
Fpower
Field power for the flowspeed when we let have flow along E(B) varying with the magnitude of E(B) |
(package private) int |
frames
number of frames of the animation to be produced. |
(package private) int |
halfHeight
half of the height of the output image in pixels. |
(package private) int |
halfWidth
half of the width of the output image in pixels. |
(package private) int |
height
height of output image in pixels |
(package private) double[] |
ikernel
kernel for the image (this controls the blending of the image). |
(package private) boolean |
OKToRun
flag to make sure the renderer has all the required info before running |
(package private) Vec3 |
origin
The origin for the plot, non-zero and used only when there is no symmerty |
(package private) RGBImage |
outimage
The rgb version of output which now has the full (width,height) dimensions, with the additional information (if any) computed from the assumed symmetry of the image. |
(package private) AccumImage |
output
The image as actually computed, which depending on the symmetry can be either 1/4 or 1/2 or the full final image written to file and displayed in "window". |
(package private) Vec |
RegionColor
RegionColor for when we use different colors in different regions of the image |
(package private) Vec |
RegionFlow
RegionFlow for when we use different flow speeds in different regions of the image |
(package private) RGBImage |
rgbimage
The rgb verzion of output with the same dimensions as output. |
(package private) double |
scale
Overall scale factor for image |
(package private) int |
startFrame
The beginning frame of the inteval where we will actually render an image. |
(package private) int |
streamlen
length of convolution kernel in pixels |
static int |
SYM_BOTH
The image is symmetric about both the vertical and the horizontal axis |
static int |
SYM_HORIZONTAL
The image is symmetric about the horizontal axis |
static int |
SYM_NONE
The image has no symmetry |
static int |
SYM_VERTICAL
The image is symmetric about the vertical axis |
(package private) int |
symmetry
Key to the symmetry of the image. |
(package private) int |
width
width of output image in pixels |
(package private) OutputWindow |
window
As the rendering proceeds, the program displays an output image on the screen frame by frame in "window". |
(package private) Vec3 |
Xdir
Unit axis for the X-direction of the image |
(package private) Vec3 |
Ydir
Unit axis for the Y-direction of the image |
Constructor Summary | |
Renderer()
The default constructor for the Renderer, which sets the default values for the various options and parameters. |
Method Summary | |
(package private) boolean |
CheckStatus()
CheckStatus() is only used internally by Renderer. |
double |
GetColorHue()
GetColorHue() returns the hue of the image as a normalized double. |
int |
GetColorMode()
GetColorMode() returns the color mode of the image as an integer. |
double |
GetColorSaturation()
GetColorSaturation() returns the HSV saturation of the image as a normalized double. |
double |
GetColorStrength()
GetColorStrength() returns the color strength of the image. |
double |
GetColorValue()
GetColorValue() returns the HSV value of the image as a normalized double. |
BaseExperiment |
GetExperiment()
GetExperiment() returns the experiment that is currently set to render. |
double |
GetFallOff()
GetFallOff() returns the fallOff of the image. |
java.lang.String |
GetFileName()
GetFileName() returns the filename of the image (including path). |
double |
GetFluidFlowSpeed()
GetFluidFlowSpeed() returns fluid flow speed in the equation FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
double |
GetFnorm()
GetFnorm() returns Fnorm in FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
double |
GetFpower()
GetFpower() returns Fpower in FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
int |
GetFrames()
GetFrames() returns the number of frames to be rendered. |
int |
GetHeight()
GetHeight() returns the height of the image. |
double[] |
GetIKernel()
GetIKernel() returns the kernel for the image. |
int |
GetIKernelFilterRepeat()
GetIKernelFilterRepeat() returns the number of times the kernel is applied to the image. |
Vec3 |
GetOrigin()
GetOrigin() returns the origin of the plot, non-zero only if there is no symmetry. |
Vec |
GetRegionColor()
GetRegionColor() returns colors of the various color regions, if used. |
Vec |
GetRegionFlow()
GetRegionFlow() returns flow speeds of the various flow regions, if used. |
double |
GetScale()
GetScale() returns the "scale" of the image. |
int |
GetStreamLen()
GetStreamLen() returns the streamlength of the image (streamlen). |
int |
GetSymmetry()
GetSymmetry() returns the symmetry of the image as an integer. |
double |
GetTimeStep()
GetTimeStep() returns the time step for the evolution of the experiment. |
int |
GetWidth()
GetWidth() returns the width of the image. |
Vec3 |
GetXdir()
Get the X coordinate unit vector of the image. |
Vec3 |
GetYdir()
Get the Y coordinate unit vector of the image. |
(package private) void |
InitOutputWindow()
InitOutputWindow() is only used internally by Renderer. |
private static java.lang.String |
PadZeros(int x,
int len)
A method to pad the names of the image files produced with beginning zeroes. |
private static void |
println(java.lang.String s)
A local way to print a string |
void |
PrintRenderInfo()
Prints out the characteristics of this renderer |
void |
SetColorHue(double myHue)
SetColorHue() sets the HSV hue of the color used in the image. |
void |
SetColorMode(int myColorMode)
SetColorMode() sets the color mode of the image (that is, how the image is colored). |
void |
SetColorSaturation(double myColorSaturation)
SetColorSaturation() sets the HSV saturation used in the image. |
void |
SetColorStrength(double myStrength)
SetColorStrength() sets the strength or intensity of the coloring. |
void |
SetColorValue(double myColorValue)
SetColorValue() sets the HSV value used in the image. |
void |
SetEndFrame(int end)
SetEndFrame() sets the frame at which DLIC rendering ends |
void |
SetExperiment(BaseExperiment myExperiment)
SetExperiment() sets the experiment that the renderer will render. |
void |
SetFallOff(double myFallOff)
SetFallOff() sets the fallOff of the coloring. |
void |
SetFileName(java.lang.String myName)
SetFileName() sets the filename of the image (including path). |
void |
SetFluidFlowSpeed(double FluidFlowSpeed)
SetFluidFlowSpeed() sets the flow speeds in FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
void |
SetFnorm(double Fnorm)
SetFnorm() sets the Fnorm in FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
void |
SetFpower(double Fpower)
SetFpower() sets the Fpower in FluidFlowSpeed*(B(E)/Fnorm)^Fpower. |
void |
SetFrames(int myFrames)
SetFrames() sets the number of frames to be rendered. |
void |
SetHeight(int myHeight)
SetHeight() sets the height of the image, WHICH MUST BE EVEN BECAUSE OF OUR SYMMETRIZATION PROCESSES. |
void |
SetIKernel(double[] myIKernel)
SetIKernel() sets the kernel for the image (this controls the blending of the image). |
void |
SetIKernelFilterRepeat(int myRepeat)
SetIKernelFilterRepeat() sets the number of times the kernel is applied to the image (should usually be 1). |
void |
SetOrigin(Vec3 Origin)
SetOrigin() sets the origin of the plot, non-zero only if there is no symmetry. |
void |
SetRegionColor(Vec RegionColor)
SetRegionColor() sets the colors of the various color regions, if used. |
void |
SetRegionFlow(Vec RegionFlow)
SetRegionFlow() sets the flow speeds of the various flow regions, if used. |
void |
SetScale(double myScale)
SetScale() sets the "scale" of the image. |
void |
SetStartFrame(int start)
SetStartFrame() sets the frame at which DLIC rendering starts |
void |
SetStreamLen(int myStreamlen)
SetStreamLen() sets the streamlength of the image (streamlen). |
void |
SetSymmetry(int mySymmetry)
SetSymmetry() sets the symmetry of the image. |
void |
SetTimeStep(double myStep)
SetTimeStep() sets the time step for the evolution of the experiment. |
void |
SetWidth(int myWidth)
SetWidth() sets the width of the image, WHICH MUST BE EVEN BECAUSE OF OUR SYMMETRIZATION PROCESSES. |
void |
SetXdir(Vec3 myXdir)
Set the X coordinate unit vector of the image. |
void |
SetYdir(Vec3 myYdir)
Set the Y coordinate unit vector of the image. |
void |
StartRender()
StartRender() starts the program rendering. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SYM_NONE
public static final int SYM_VERTICAL
public static final int SYM_HORIZONTAL
public static final int SYM_BOTH
public static final int CM_GREYSCALE
public static final int CM_COLOR_1
public static final int CM_COLOR_2
public static final int CM_COLOR_3
public static final int CM_COLOR_4
OutputWindow window
AccumImage output
RGBImage rgbimage
RGBImage outimage
int width
int halfWidth
int doubleWidth
int height
int halfHeight
int doubleHeight
int streamlen
int frames
java.lang.String fname
int startFrame
int endFrame
double dt
double scale
double[] ikernel
int filterRepeat
int symmetry
Vec3 Xdir
Vec3 Ydir
int colorMode
double colorHue
double colorSaturation
double colorValue
double colorStrength
double fallOff
Vec RegionColor
Vec RegionFlow
double FluidFlowSpeed
double Fnorm
double Fpower
Vec3 origin
BaseExperiment experiment
boolean OKToRun
Constructor Detail |
public Renderer()
Method Detail |
public void SetExperiment(BaseExperiment myExperiment)
public BaseExperiment GetExperiment()
public void SetWidth(int myWidth)
public int GetWidth()
public void SetHeight(int myHeight)
public int GetHeight()
public void SetStreamLen(int myStreamlen)
public int GetStreamLen()
public void SetFileName(java.lang.String myName)
public java.lang.String GetFileName()
public void SetFrames(int myFrames)
public void SetStartFrame(int start)
public void SetEndFrame(int end)
public int GetFrames()
public void SetTimeStep(double myStep)
public double GetTimeStep()
public void SetScale(double myScale)
public double GetScale()
public void SetIKernel(double[] myIKernel)
public double[] GetIKernel()
public void SetIKernelFilterRepeat(int myRepeat)
public int GetIKernelFilterRepeat()
public void SetSymmetry(int mySymmetry)
public int GetSymmetry()
public void SetColorMode(int myColorMode)
public int GetColorMode()
public void SetColorHue(double myHue)
public double GetColorHue()
public void SetColorSaturation(double myColorSaturation)
public double GetColorSaturation()
public void SetColorValue(double myColorValue)
public double GetColorValue()
public void SetColorStrength(double myStrength)
public double GetColorStrength()
public void SetFallOff(double myFallOff)
public double GetFallOff()
public void SetRegionColor(Vec RegionColor)
public Vec GetRegionColor()
public void SetRegionFlow(Vec RegionFlow)
public Vec GetRegionFlow()
public double GetFluidFlowSpeed()
public void SetFluidFlowSpeed(double FluidFlowSpeed)
public double GetFnorm()
public void SetFnorm(double Fnorm)
public double GetFpower()
public void SetFpower(double Fpower)
public Vec3 GetOrigin()
public void SetOrigin(Vec3 Origin)
public void PrintRenderInfo()
public void SetXdir(Vec3 myXdir)
public Vec3 GetXdir()
public void SetYdir(Vec3 myYdir)
public Vec3 GetYdir()
boolean CheckStatus()
void InitOutputWindow()
public void StartRender()
private static java.lang.String PadZeros(int x, int len)
private static void println(java.lang.String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |