SPATMOD::IMAGE::HELPER_RESAMPLE Class Reference

Helper for resampling operations. More...

#include <spatmod/imagehelperresample.h>

List of all members.

Public Types

enum  FLAGS { FLAG_None = 0, FLAG_PullSinglePixels = 0x01, FLAG_CheckTargetValidity = 0x02 }

Public Member Functions

 HELPER_RESAMPLE ()
 ~HELPER_RESAMPLE ()
ERRVALUE BeginSection (const SECTION &SrcSection, BUFFER &WorkBuffer)
ERRVALUE BeginSection (const SECTION &SrcSection)
ERRVALUE ConvertCoordTgtToSrc (const TRANS2D_MAPGEN &TransTgtToSrc, const DOUBLE_ARRAY< DPOINT2D > &TgtCoord, DOUBLE_ARRAY< DPOINT2D > &SrcCoord, UINT8 *CoordValid) const
void FreeWorkBuffer ()
ERRVALUE ProcessRow (INT32 TgtRow, BUFFER &TgtBuffer, const DOUBLE_ARRAY< DPOINT2D > &SrcCoord)
ERRVALUE ReserveWorkBuffer (INT32 MaxColumns, INT32 MaxRows)
ERRVALUE Setup (STAGE *pStageSrc, RESAMPLEMETHOD ResampleMethod, FLAGS flags=FLAG_None)

Detailed Description

Helper for resampling operations.

Provides method for processing single row. Optimized to avoid memory allocation during row processing.


Member Enumeration Documentation

Flags for setup.

Enumerator:
FLAG_None 
FLAG_PullSinglePixels 

Pull pixels one at a time, for cases of large space between source pixels.

FLAG_CheckTargetValidity 

Use initial target validity values to determine if should process pixel.


Constructor & Destructor Documentation

SPATMOD::IMAGE::HELPER_RESAMPLE::HELPER_RESAMPLE (  ) 

Constructor.

SPATMOD::IMAGE::HELPER_RESAMPLE::~HELPER_RESAMPLE (  ) 

Destructor.


Member Function Documentation

ERRVALUE SPATMOD::IMAGE::HELPER_RESAMPLE::BeginSection ( const SECTION SrcSection,
BUFFER WorkBuffer 
)

Begin processing section using shared work buffer.

Parameters:
SrcSection Section of source to resample from
WorkBuffer Work buffer, must remain in existence during processing
ERRVALUE SPATMOD::IMAGE::HELPER_RESAMPLE::BeginSection ( const SECTION SrcSection  ) 

Begin processing section using own work buffer.

Work buffer will be resized if necessary.

Parameters:
SrcSection Section of source to resample from
ERRVALUE SPATMOD::IMAGE::HELPER_RESAMPLE::ConvertCoordTgtToSrc ( const TRANS2D_MAPGEN TransTgtToSrc,
const DOUBLE_ARRAY< DPOINT2D > &  TgtCoord,
DOUBLE_ARRAY< DPOINT2D > &  SrcCoord,
UINT8 CoordValid 
) const

Convert coordinates from target to source.

Only points with a corresponding nonzero entry in CoordValid may be processed. Any points that cannot be converted will have the corresponding CoordValid entry set to 0.

Parameters:
TransTgtToSrc Transformation from target to source coordinates
TgtCoord Target coordinates
SrcCoord Source coordinates returned, cannot be same array as TgtCoord
CoordValid Source coordinate validity passed/returned, cannot be NULL
void SPATMOD::IMAGE::HELPER_RESAMPLE::FreeWorkBuffer (  )  [inline]

Free work buffer.

ERRVALUE SPATMOD::IMAGE::HELPER_RESAMPLE::ProcessRow ( INT32  TgtRow,
BUFFER TgtBuffer,
const DOUBLE_ARRAY< DPOINT2D > &  SrcCoord 
)

Process row of pixels into target buffer.

Parameters:
TgtRow Row in target buffer
TgtBuffer Target buffer
SrcCoord Coordinates in source image, number of items determines number of output pixels
ERRVALUE SPATMOD::IMAGE::HELPER_RESAMPLE::ReserveWorkBuffer ( INT32  MaxColumns,
INT32  MaxRows 
)

Reserve work buffer with specified initial maximum size.

Parameters:
MaxColumns Maximum expected columns
MaxRows Maximum expected rows
ERRVALUE SPATMOD::IMAGE::HELPER_RESAMPLE::Setup ( STAGE pStageSrc,
RESAMPLEMETHOD  ResampleMethod,
FLAGS  flags = FLAG_None 
)

Setup to process specified source.

Parameters:
pStageSrc Pointer to source stage
ResampleMethod Resampling method
flags Optional flags

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

Generated on Sun Oct 7 21:40:01 2012 for TNTsdk 2012 by  doxygen 1.6.1