|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.piece.JitteringSynthesizer
public class JitteringSynthesizer
Jittering image synthesizer with progressive rendering. Static variant of regular NxN jitering.
Field Summary | |
---|---|
protected double |
actTime
Actual time (for RealFunction). |
protected double |
addX
Horizontal translation (for RealFunction). |
protected double |
addY
Vertical translation (for RealFunction). |
protected static java.lang.String |
CATEGORY
Object category. |
protected double |
gamma
Gamma-correction for frame-buffer efficiency. |
protected int |
imageHeight
Actual image height in pixels. |
protected int |
imageWidth
Actual image width in pixels. |
protected static int |
INIT_CELL
Initial image cell size in pixels. |
protected double |
jittering
Actual jittering amplitude ( 0.0 to 1.0 ). |
static java.lang.String |
JITTERING
|
protected double |
mulX
Horizontal scaling coefficient (for RealFunction). |
protected double |
mulY
Vertical scaling coefficient (for RealFunction). |
static RegPiece |
reg
Static registration instance for this class. |
protected static RandomJames |
rnd
Global random generator. |
protected int |
setHeight
|
protected int |
setWidth
|
protected int |
supersampling
Linear supersampling factor. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected double[] |
tmp
|
protected int |
totalSamples
Actual number of samples per pixel ( supersampling 2). |
static java.lang.String |
USE_GRAY
|
static java.lang.String |
USE_TIME
|
protected boolean |
useGray
Use gray palette (for RealFunction). |
protected boolean |
useTime
Use time variable (for RealFunction). |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.ImageSynthesizer |
---|
GAMMA, HEIGHT, SUPERSAMPLING, WIDTH |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
JitteringSynthesizer()
|
Method Summary | |
---|---|
void |
commit()
Commits all previous changes to the internal object state. |
protected void |
computePixel(ImageFunction f,
int x,
int y,
double[] pre)
|
protected void |
computePixel(RealFunction rf,
int x,
int y,
double[] pre)
|
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
double |
getTime()
Returns the actual time value for the object (used in animations). |
double[] |
getTimeInterval(double[] pre)
Retrieve the valid bounds for time variable. |
protected void |
imageBounds()
Transfers image size from associated RasterGraphics if necessary. |
void |
renderAll()
Render the whole image. |
double[] |
renderPixel(int x,
int y,
double[] pre)
Render the given pixel of the image. |
void |
renderRectangle(int x1,
int y1,
int x2,
int y2)
Render the given rectangle. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
void |
setBounds(int width,
int height)
Sets resolution of an output raster image. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
setTime(double time)
Sets the actual time value for the object (used in animations). |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
protected int imageWidth
protected int imageHeight
protected boolean useGray
protected boolean useTime
protected double actTime
protected double mulX
protected double addX
protected double mulY
protected double addY
protected int supersampling
protected int totalSamples
supersampling
2).
protected static final int INIT_CELL
protected double jittering
0.0
to 1.0
).
protected static final RandomJames rnd
protected double[] tmp
protected double gamma
0.0
to turn off gamma-correction and color clamping.
public static final java.lang.String JITTERING
public static final java.lang.String USE_GRAY
public static final java.lang.String USE_TIME
protected int setWidth
protected int setHeight
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public JitteringSynthesizer()
Method Detail |
---|
protected void imageBounds()
RasterGraphics
if necessary.
protected void computePixel(ImageFunction f, int x, int y, double[] pre)
protected void computePixel(RealFunction rf, int x, int y, double[] pre)
public double[] getTimeInterval(double[] pre)
getTimeInterval
in interface TimeDependent
pre
- Pre-allocated double[2]
array to hold the result (can be
null
).
result[0]
.. minimum time value, result[1]
.. maximum
time value.getTime()
,
setTime(double)
public double getTime()
getTime
in interface TimeDependent
setTime(double)
public void setTime(double time)
setTime
in interface TimeDependent
time
- New scene time (in seconds).getTime()
,
getTimeInterval(double[])
public void setBounds(int width, int height)
setBounds
in interface ImageSynthesizer
width
- Horizontal image size in pixels.height
- Vertical image size in pixels.public double[] renderPixel(int x, int y, double[] pre)
renderPixel
in interface ImageSynthesizer
x
- X coordinate of the pixel.y
- Y coordinate of the pixel.pre
- Pre-allocated double[3]
array to hold results (can be
null
).
renderRectangle(int, int, int, int)
,
renderAll()
public void renderRectangle(int x1, int y1, int x2, int y2)
renderRectangle
in interface ImageSynthesizer
x1
- X coordinate of the upper left corner.y1
- Y coordinate of the upper left corner.x2
- X coordinate of the lower right corner (outside pixel).y2
- Y coordinate of the upper left corner (outside pixel).renderPixel(int, int, double[])
,
renderAll()
public void renderAll()
renderAll
in interface ImageSynthesizer
renderPixel(int, int, double[])
,
renderRectangle(int, int, int, int)
public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
null
.public void commit()
commit
in interface Property
commit
in class DefaultProperty
public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |