SPATMOD::IMAGE::FILTER_STEREO_DUAL Class Reference

Filter to generate stereo image pair. More...

#include <spatmod/imagefilterstereodual.h>

Inheritance diagram for SPATMOD::IMAGE::FILTER_STEREO_DUAL:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FILTER_STEREO_DUAL (STAGE *pStageDrape, bool TakeOwnershipDrape, STAGE *pStageTerrain, bool TakeOwnershipTerrain, const STEREOSHIFT &StereoShift, const BASE &RefImage, RESAMPLEMETHOD ResampleMethod)
 FILTER_STEREO_DUAL (STAGE *pStageDrape, bool TakeOwnershipDrape, STAGE *pStageTerrain, bool TakeOwnershipTerrain, const STEREOSHIFT &StereoShift, const DIMENSIONS &Dimensions, const GEOREFERENCE &Georeference, RESAMPLEMETHOD ResampleMethod)
virtual ~FILTER_STEREO_DUAL ()
void SetAccuracy (double accuracy)
void SetPixelNoTerrain (const PIXEL &pixel, double BlendFactor)

Detailed Description

Filter to generate stereo image pair.

This filter creates a pair of images, with first (left), second (right) or both displaced for subsequent stereo viewing. The sequence of image sample will be duplicated, thus if the source has 4 samples of RGBA, the result will have have 8 samples of RGBARGBA. The input must have an "alpha" sample, and the output alpha values will reflect the "validity" such that an output alpha of 0 is considered completely transparent.

All samples from the drape stage must have the same data type. The terrain stage must have a single component of any numeric data type.

The value for DisplacementScale should be chosen such that the maximum actual displacement is reasonably small, typically no more than 50 pixels, both in order to maintain visual stereo fusion, as well as for processing efficiency. This value effectively controls the "vertical exaggeration" and relative "depth" of the rendering. The value for DisplacementZeroValue must be within the range of the overall terrain value and typically will be near the maximum terrain value for a particular rendering. This may require implementation of user controls for adjustment, or a preprocessing pass may be made to estimate this value based on the portion of the terrain used in the rendering. Rendered pixels on the terrain "above" the "zero displacement" will appear "closer" to the viewer than the rendering plane (monitor screen). Pixels on the terrain far "below" the "zero displacement" level may appear with too much separation.

The coordinate transformation between resulting image and input stage is computed using georeference as specified in the constructor, or georeference from the specified reference image, along with the georeference from the input stage. An optional transformation accuracy may be specified via SetAccuracy() to allow use of efficient affine transformation if appropriate. Note that the source image will not be processed "sequentially", and the sections specified in PullBegin for the source will overlap. It is recommended that this filter be placed early in the pipeline or that a suitable caching filter be placed ahead of it if the input requires significant computation or sequential iteration.


Constructor & Destructor Documentation

SPATMOD::IMAGE::FILTER_STEREO_DUAL::FILTER_STEREO_DUAL ( STAGE pStageDrape,
bool  TakeOwnershipDrape,
STAGE pStageTerrain,
bool  TakeOwnershipTerrain,
const STEREOSHIFT StereoShift,
const DIMENSIONS Dimensions,
const GEOREFERENCE Georeference,
RESAMPLEMETHOD  ResampleMethod 
)

Construct using specified dimensions and georeference.

Parameters:
pStageDrape Pointer to stage to "drape" onto terrain
TakeOwnershipDrape Filter takes ownership of drape stage and will delete when needed
pStageTerrain Pointer to stage for terrain elevation
TakeOwnershipTerrain Filter takes ownership of terrain stage and will delete when needed
StereoShift Stereo shift settings
Dimensions Resulting image dimensions
Georeference Georeference for resulting image
ResampleMethod Resampling method
SPATMOD::IMAGE::FILTER_STEREO_DUAL::FILTER_STEREO_DUAL ( STAGE pStageDrape,
bool  TakeOwnershipDrape,
STAGE pStageTerrain,
bool  TakeOwnershipTerrain,
const STEREOSHIFT StereoShift,
const BASE RefImage,
RESAMPLEMETHOD  ResampleMethod 
)

Construct to match specified reference image.

Parameters:
pStageDrape Pointer to stage to "drape" onto terrain
TakeOwnershipDrape Filter takes ownership of drape stage and will delete when needed
pStageTerrain Pointer to stage for terrain elevation
TakeOwnershipTerrain Filter takes ownership of terrain stage and will delete when needed
StereoShift Stereo shift settings
RefImage Reference image to match
ResampleMethod Resampling method
virtual SPATMOD::IMAGE::FILTER_STEREO_DUAL::~FILTER_STEREO_DUAL (  )  [virtual]

Member Function Documentation

void SPATMOD::IMAGE::FILTER_STEREO_DUAL::SetAccuracy ( double  accuracy  )  [inline]

Set transformation accuracy in source cells.

If within the specified accuracy, a fast affine transformation will be used for computation. If used, must be done before Initialize(). Default accuracy is .5 cells.

Parameters:
accuracy Transformation accuracy in source cells.
void SPATMOD::IMAGE::FILTER_STEREO_DUAL::SetPixelNoTerrain ( const PIXEL pixel,
double  BlendFactor 
)

Set pixel value to use or blend where no terrain is available.

Only non-alpha samples are affected, alpha/opacity samples are left unchanged.

Parameters:
pixel Pixel value, must have properties matching drape stage
BlendFactor Blend factor (0-1) to control amount used from specified pixel value

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:39:59 2012 for TNTsdk 2012 by  doxygen 1.6.1