de.grogra.ray2.tracing
Class MetropolisRenderer
java.lang.Object
de.grogra.task.Task
de.grogra.ray2.tracing.PixelwiseRenderer
de.grogra.ray2.tracing.MetropolisRenderer
- All Implemented Interfaces:
- Renderer
public class MetropolisRenderer
- extends PixelwiseRenderer
Fields inherited from class de.grogra.ray2.tracing.PixelwiseRenderer |
antialiasing, ANTIALIASING, AUTO_ADJUST, AUTO_ADJUST_MAX_VALUE, autoAdjust, autoAdjustMaxValue, brightness, BRIGHTNESS, camera, cameraTransformation, DEBUG_LINE, DEBUG_PIXEL, DEBUG_SUBPIXEL, DEBUG_X, DEBUG_Y, hdr, HDR, hdrPixels, height, image, imageUpdateDistance, imageUpdateRate, lineState, maxValue, monitor, observer, originalScene, RAYPROCESSOR, REMOVE_OUTLIERS, removeOutliers, renderedLines, rgbaPixels, seed, SEED, THREAD_COUNT, threadCount, width |
Method Summary |
Solver |
createLocalSolver(boolean sameThread)
|
protected void |
dispose(PartialTask task)
This method is invoked when an active solver is removed or
invokes Task.partialTaskDone(Solver) in order to tell this
task that the partial task of the solver is no longer processed. |
protected boolean |
done()
Returns true iff the complete task has been solved. |
float |
getFirstStageImageValue(int x,
int y)
|
float[] |
getPixelsForLine2Vertex(Environment env,
Point3d vertex)
|
void |
increaseNotMutatedPixels(int count)
|
void |
initialize(Options opts,
ProgressMonitor progress)
Initializes the renderer. |
void |
merge(PixelwiseRenderer.Result res)
|
protected PartialTask |
nextPartialTask(int solverIndex)
This method returns the next partial task for this task. |
void |
render(Scene scene,
Sensor camera,
Matrix4d cameraTransformation,
int width,
int height,
java.awt.image.ImageObserver obs)
Renders an image of a scene . |
protected void |
renderMLT(Antialiasing antialiasing,
int mutatedPixPerProc,
int solverNo,
PixelwiseRenderer.Result res)
|
void |
stop()
This method is invoked in order to stop the computation
of this task. |
Methods inherited from class de.grogra.ray2.tracing.PixelwiseRenderer |
getAdjustFactor, getAutoAdjust, getBooleanOption, getBrightness, getCamera, getCameraTransformation, getClassOption, getNumericOption, getScene, getSeed, luminance, removeOutliers, renderLines, setAntialiasing, setAutoAdjust, setAutoAdjustMaxValue, setBrightness, setHDR, setMessage, setThreadCount, toIntColor, toRGBA |
Methods inherited from class de.grogra.task.Task |
addSolver, finishSolve, getSolverCount, getSolvers, isSolving, isStopped, partialTaskDone, prepareSolve, removeSolver, removeSolvers, solve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
actRenderingStage
public static int actRenderingStage
directLightning_Ref
public static boolean directLightning_Ref
expectedValues_Ref
public static boolean expectedValues_Ref
FIRST_STAGE
public static final int FIRST_STAGE
- See Also:
- Constant Field Values
firstStageAverageValue
protected Color4f firstStageAverageValue
firstStageBrightestValue
protected Color4f firstStageBrightestValue
firstStageDarkestValue
protected Color4f firstStageDarkestValue
firstStageHdrPixels
protected float[][] firstStageHdrPixels
firstStageImage
protected java.awt.image.BufferedImage firstStageImage
firstStageRgbaPixels
protected int[] firstStageRgbaPixels
importanceSampling_Ref
public static boolean importanceSampling_Ref
INITIAL_COUNT
public static final java.lang.String INITIAL_COUNT
- See Also:
- Constant Field Values
initialCount
public static int initialCount
mutatedPixPerProc
public int mutatedPixPerProc
MUTATION_PP_COUNT
public static final java.lang.String MUTATION_PP_COUNT
- See Also:
- Constant Field Values
mutationPPCount
public static int mutationPPCount
notMutatedPixelsLeft
public int notMutatedPixelsLeft
pixelChangeArray
protected int[] pixelChangeArray
rnd
protected net.goui.util.MTRandom rnd
SECOND_STAGE
public static final int SECOND_STAGE
- See Also:
- Constant Field Values
SEED_COUNT
public static final java.lang.String SEED_COUNT
- See Also:
- Constant Field Values
seedPathCount
public static int seedPathCount
solverCount
public int solverCount
testimageCorrectionFactor
protected static float testimageCorrectionFactor
testimageMutperPix
public static int testimageMutperPix
twoStage_Ref
public static boolean twoStage_Ref
MetropolisRenderer
public MetropolisRenderer()
createLocalSolver
public Solver createLocalSolver(boolean sameThread)
- Overrides:
createLocalSolver
in class PixelwiseRenderer
dispose
protected void dispose(PartialTask task)
- Description copied from class:
Task
- This method is invoked when an active solver is removed or
invokes
Task.partialTaskDone(Solver)
in order to tell this
task that the partial task of the solver is no longer processed.
Note that the solver may not have completely processed
its partial task.
- Overrides:
dispose
in class PixelwiseRenderer
- Parameters:
task
- partial task which is no longer processed
done
protected boolean done()
- Description copied from class:
Task
- Returns
true
iff the complete task has been solved.
- Overrides:
done
in class PixelwiseRenderer
- Returns:
- has the task been solved?
getFirstStageImageValue
public float getFirstStageImageValue(int x,
int y)
getPixelsForLine2Vertex
public float[] getPixelsForLine2Vertex(Environment env,
Point3d vertex)
increaseNotMutatedPixels
public void increaseNotMutatedPixels(int count)
initialize
public void initialize(Options opts,
ProgressMonitor progress)
- Description copied from interface:
Renderer
- Initializes the renderer. This method has to be invoked
at first.
- Specified by:
initialize
in interface Renderer
- Overrides:
initialize
in class PixelwiseRenderer
- Parameters:
opts
- options to use (may be null
)progress
- monitor to display rendering progress
(may be null
)
merge
public void merge(PixelwiseRenderer.Result res)
- Overrides:
merge
in class PixelwiseRenderer
nextPartialTask
protected PartialTask nextPartialTask(int solverIndex)
- Description copied from class:
Task
- This method returns the next partial task for this task.
If all parts of the task have been solved or currently are being
solved,
null
is returned. However, a later invocation
may return a partial task if a currently active solver
does not completely solve its partial task.
- Overrides:
nextPartialTask
in class PixelwiseRenderer
- Parameters:
solverIndex
- index of solver which will be used for next task
- Returns:
- next partial task, or
null
render
public void render(Scene scene,
Sensor camera,
Matrix4d cameraTransformation,
int width,
int height,
java.awt.image.ImageObserver obs)
- Description copied from interface:
Renderer
- Renders an image of a
scene
.
- Specified by:
render
in interface Renderer
- Overrides:
render
in class PixelwiseRenderer
- Parameters:
scene
- scene to rendercamera
- camera to usecameraTransformation
- transformation from camera coordinates
to world coordinateswidth
- width of imageheight
- height of imageobs
- the observer receives the image data
renderMLT
protected void renderMLT(Antialiasing antialiasing,
int mutatedPixPerProc,
int solverNo,
PixelwiseRenderer.Result res)
stop
public void stop()
- Description copied from class:
Task
- This method is invoked in order to stop the computation
of this task.
- Specified by:
stop
in interface Renderer
- Overrides:
stop
in class Task