SPATMOD::IMAGE::FILTER_LINEAR Class Reference

Filter to perform linear combination on samples in image. More...

#include <spatmod/imagefilterlinear.h>

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

List of all members.

Public Member Functions

 FILTER_LINEAR (STAGE *pPreviousStage, bool TakeOwnership, UINT16 NumTgtSamples=0, bool PassOpacity=true)
virtual ~FILTER_LINEAR ()
double GetCoefficient (UINT16 TgtSampleNum, UINT16 SrcSampleNum) const
void GetCoefficients (MIMATRIX &Coefficients) const
double GetOffset (UINT16 TgtSampleNum) const
void GetOffsets (MIMATRIX &Offsets) const
ERRVALUE SetCoefficient (UINT16 TgtSampleNum, UINT16 SrcSampleNum, double value)
ERRVALUE SetCoefficients (const MIMATRIX &Coefficients)
ERRVALUE SetOffset (UINT16 TgtSampleNum, double value)
void SetOffsets (const double *Offsets)
ERRVALUE SetOffsets (const MIMATRIX &Offsets)

Protected Member Functions

virtual ERRVALUE v_Initialize ()

Detailed Description

Filter to perform linear combination on samples in image.


Constructor & Destructor Documentation

SPATMOD::IMAGE::FILTER_LINEAR::FILTER_LINEAR ( STAGE pPreviousStage,
bool  TakeOwnership,
UINT16  NumTgtSamples = 0,
bool  PassOpacity = true 
)

Constructor.

If PassOpacity is specified as true and NumTgtSamples is non-zero then NumTgtSamples should not include any target opacity samples. In addition, all opacity samples must come after non-opacity samples in the source and will be placed after non-opacity samples in target. If PassOpacity is false then source opacity samples are processed and counted the same as all other sample types when determining default number of target samples.

Parameters:
pPreviousStage Pointer to previous stage
TakeOwnership Filter takes ownership of previous stage and will delete when needed
NumTgtSamples Number of target samples, 0 to determine from previous stage
PassOpacity Pass opacity samples unchanged
virtual SPATMOD::IMAGE::FILTER_LINEAR::~FILTER_LINEAR (  )  [virtual]

Destructor.


Member Function Documentation

double SPATMOD::IMAGE::FILTER_LINEAR::GetCoefficient ( UINT16  TgtSampleNum,
UINT16  SrcSampleNum 
) const

Get coefficient in linear combination matrix.

If either sample index is out of range then 0 will be returned.

Parameters:
TgtSampleNum Target sample index
SrcSampleNum Source sample index
void SPATMOD::IMAGE::FILTER_LINEAR::GetCoefficients ( MIMATRIX Coefficients  )  const

Get coefficients as MIMATRIX.

Parameters:
Coefficients Coefficient matrix returned
double SPATMOD::IMAGE::FILTER_LINEAR::GetOffset ( UINT16  TgtSampleNum  )  const

Get offset for target sample.

If sample index is out of range then 0 will be returned.

Parameters:
TgtSampleNum Target sample index
void SPATMOD::IMAGE::FILTER_LINEAR::GetOffsets ( MIMATRIX Offsets  )  const

Get offsets as MIMATRIX.

Parameters:
Offsets Offset matrix returned
ERRVALUE SPATMOD::IMAGE::FILTER_LINEAR::SetCoefficient ( UINT16  TgtSampleNum,
UINT16  SrcSampleNum,
double  value 
)

Set coefficient in linear combination matrix.

Parameters:
TgtSampleNum Target sample index
SrcSampleNum Source sample index
value Value to set
ERRVALUE SPATMOD::IMAGE::FILTER_LINEAR::SetCoefficients ( const MIMATRIX Coefficients  ) 

Set coefficients from matrix.

Columns in matrix correspond to source sample indices. Rows in matrix correspond to target sample indices.

Parameters:
Coefficients Coefficient matrix
ERRVALUE SPATMOD::IMAGE::FILTER_LINEAR::SetOffset ( UINT16  TgtSampleNum,
double  value 
)

Set offset for target sample.

Parameters:
TgtSampleNum Target sample index
value Value to set
void SPATMOD::IMAGE::FILTER_LINEAR::SetOffsets ( const double *  Offsets  ) 

Set offsets for target samples.

Parameters:
Offsets Offsets
ERRVALUE SPATMOD::IMAGE::FILTER_LINEAR::SetOffsets ( const MIMATRIX Offsets  ) 

Set offsets for target samples.

Matrix must be vector of with size corresponding to number of target samples.

Parameters:
Offsets Offsets as vector matrix
virtual ERRVALUE SPATMOD::IMAGE::FILTER_LINEAR::v_Initialize (  )  [protected, virtual]

Initialize stage before insertion into pipeline.

Derived class must call base method before doing own processing. Pointer to source stage should be re-obtained if needed afterward as this method will insert intermediate filter if required.

Implements SPATMOD::IMAGE::STAGE.


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

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