com.vwp.awt.image
Class StereoImage

java.lang.Object
  extended by com.vwp.awt.image.StereoImage

public class StereoImage
extends Object

This class can be used to create stereoscopic images (mainly anaglyphs) out of two images. These images should represent the same picture but with different angles of view according to the two human eyes. The calculation of the resulting image is started directly after the image for the right eye was set. The StereoImage itself is resized automatically so that its width and height is equal to the dimension of the both incoming images


Field Summary
static int MODE_STEREO_NONE
          This value can be used to specify that no stereo calculation has to be performed.
static int MODE_STEREO_REDGREEN
          This constant causes a calculation of standard anaglyphs which use red/green separation with resulting black and white images
static int MODE_STEREO_REDGREEN_COLOR
          This constant causes a red/green anaglyph calculation too but here it is tried to get a result which is coloured instead of black and white only.
 
Constructor Summary
StereoImage(int StereoMode)
          Constructs a new StereoImage object which is able to create a stereoscopic representation
 
Method Summary
 BufferedImage getLastStereoImage()
          Returns the last stereo image which was created.
 void setLeftImage(BufferedImage left)
          First the image for the left eye has to be set
 BufferedImage setRightImage(BufferedImage right)
          After calling setLeftImage() the image for the right eye has to be set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_STEREO_NONE

public static final int MODE_STEREO_NONE
This value can be used to specify that no stereo calculation has to be performed. In this case StereoImage doesn't has to be used

See Also:
Constant Field Values

MODE_STEREO_REDGREEN

public static final int MODE_STEREO_REDGREEN
This constant causes a calculation of standard anaglyphs which use red/green separation with resulting black and white images

See Also:
Constant Field Values

MODE_STEREO_REDGREEN_COLOR

public static final int MODE_STEREO_REDGREEN_COLOR
This constant causes a red/green anaglyph calculation too but here it is tried to get a result which is coloured instead of black and white only. This basic colorization reults in some loss of the three-dimensional impression

See Also:
Constant Field Values
Constructor Detail

StereoImage

public StereoImage(int StereoMode)
Constructs a new StereoImage object which is able to create a stereoscopic representation

Parameters:
StereoMode - the stereo image calculation mode
Method Detail

setLeftImage

public void setLeftImage(BufferedImage left)
First the image for the left eye has to be set

Parameters:
left - the left eyes image

setRightImage

public BufferedImage setRightImage(BufferedImage right)
After calling setLeftImage() the image for the right eye has to be set. Calling this method starts the calculation of the image. The method returns the resulting BufferedImage after this work has done which can need some time depending on the images sizes.

Parameters:
right - the right eyes image
Returns:
the calculated stereo image

getLastStereoImage

public BufferedImage getLastStereoImage()
Returns the last stereo image which was created. This requires calling if the methods setLeftImage() and setRightImage() at least once. This method mustn't be called during the execution of setRightImage().

Returns:
the last stereo image which was created