Filter to perform linear combination on samples in image. More...
#include <spatmod/imagefilterlinear.h>

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 () |
Filter to perform linear combination on samples in image.
| 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.
| 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.
| 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.
| TgtSampleNum | Target sample index | |
| SrcSampleNum | Source sample index |
| void SPATMOD::IMAGE::FILTER_LINEAR::GetCoefficients | ( | MIMATRIX & | Coefficients | ) | const |
Get coefficients as MIMATRIX.
| 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.
| TgtSampleNum | Target sample index |
| void SPATMOD::IMAGE::FILTER_LINEAR::GetOffsets | ( | MIMATRIX & | Offsets | ) | const |
Get offsets as MIMATRIX.
| Offsets | Offset matrix returned |
| ERRVALUE SPATMOD::IMAGE::FILTER_LINEAR::SetCoefficient | ( | UINT16 | TgtSampleNum, | |
| UINT16 | SrcSampleNum, | |||
| double | value | |||
| ) |
Set coefficient in linear combination matrix.
| TgtSampleNum | Target sample index | |
| SrcSampleNum | Source sample index | |
| value | Value to set |
Set coefficients from matrix.
Columns in matrix correspond to source sample indices. Rows in matrix correspond to target sample indices.
| Coefficients | Coefficient matrix |
Set offset for target sample.
| TgtSampleNum | Target sample index | |
| value | Value to set |
| void SPATMOD::IMAGE::FILTER_LINEAR::SetOffsets | ( | const double * | Offsets | ) |
Set offsets for target samples.
| Offsets | Offsets |
Set offsets for target samples.
Matrix must be vector of with size corresponding to number of target samples.
| 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.
1.6.1