Inheritance diagram for w2kmeans::MotionAdvector< GridType >:
Public Member Functions | |
MotionAdvector (const code::TimeInterval &howFarAhead) | |
void | setAdvectInterval (const code::TimeInterval &howFarAhead) |
to change interval after creation. | |
void | setPreferredScale (size_t newScale) |
Set the scale of regions to follow. | |
void | setMaxIsBetter (bool flag) |
Are smaller values storms (as in infrared temperature) or bigger values (as in radar reflectivity)? | |
void | setAccelerationCorrection (bool flag) |
Should we do acceleration correction? By default, we dont. | |
virtual void | handleMotionEstimate (const GridType &east, const GridType &south, const GridType &incRate, size_t scale, bool complete) |
simply updates its internal motion vector storage. | |
bool | advect (GridType &data) |
advects the data given, returning true if the advection happened. | |
bool | hasValidMotionEstimate (const code::Time &t) const |
is the motion estimate that we have valid at this time? | |
const code::TimeInterval & | getAdvectInterval () const |
void | setPostprocessingFilter (code::SmartPtr< w2img::ImageFilter > newFilter) |
Add a postprocessing filter on the advected locations. | |
void | setRateOfIncreaseFlag (bool inFlag) |
void | setConstantUVFlag (bool inFlag) |
By default, every grid point receives a different motion vector, but you can ask for a constant UV to be applied to the entire field by setting this flag. | |
void | setMaxRateOfIncrease (double maxGrowth, double maxDecay) |
void | setSplatting (bool) |
turn on/off splatting during advection. | |
virtual | ~MotionAdvector () |
virtual void | handleIntermediateProduct (const code::DataType &prod) |
Protected Member Functions | |
bool | advect (const GridType &data, const std::string &productName, code::Image< float > *result, double xscale, double yscale, double secs) |
template method that sets up the motion estimates and then calls doAdvect | |
virtual bool | doAdvect (const code::Image< float > &orig, const std::string &productName, code::Image< float > *result, double xscale, double yscale, double secs, int directionFactor, const GridType &motx, const GridType &moty, const GridType &growth)=0 |
advects the image given and puts the result into result which has to be initialized to be the same size as the original and inited to missing data. | |
virtual std::pair< GridType, GridType > | doChangeMotionVectors (const GridType &motx, const GridType &moty, double xscale, double yscale, double secs) |
Subclasses can over-ride this method to change the motion vector before it is presented to doAdvect. | |
virtual void | setOutputTypeName (GridType &data) |
set the output typename and colormap. | |
void | setSplatWeights (const code::Image< float > &wts) |
the default splat-weights is a Cressman kernel of radius 3 | |
const code::Image< float > & | getSplatWeights () const |
float | getForecastValue (float inval, float secs, float growth, int directionFactor) const |
Static Protected Member Functions | |
static void | setValueIfBetter (code::Image< float > *result, int x, int y, double value, bool is_max_better) |
static void | setValueIfBetter (code::Image< float > *result, int x, int y, double value, const code::Image< float > &splatWeights, bool is_max_better) |
w2kmeans::MotionAdvector< GridType >::MotionAdvector | ( | const code::TimeInterval & | howFarAhead | ) |
virtual w2kmeans::MotionAdvector< GridType >::~MotionAdvector | ( | ) | [inline, virtual] |
bool w2kmeans::MotionAdvector< GridType >::advect | ( | const GridType & | data, | |
const std::string & | productName, | |||
code::Image< float > * | result, | |||
double | xscale, | |||
double | yscale, | |||
double | secs | |||
) | [protected] |
template method that sets up the motion estimates and then calls doAdvect
bool w2kmeans::MotionAdvector< GridType >::advect | ( | GridType & | data | ) |
advects the data given, returning true if the advection happened.
virtual bool w2kmeans::MotionAdvector< GridType >::doAdvect | ( | const code::Image< float > & | orig, | |
const std::string & | productName, | |||
code::Image< float > * | result, | |||
double | xscale, | |||
double | yscale, | |||
double | secs, | |||
int | directionFactor, | |||
const GridType & | motx, | |||
const GridType & | moty, | |||
const GridType & | growth | |||
) | [protected, pure virtual] |
advects the image given and puts the result into result which has to be initialized to be the same size as the original and inited to missing data.
xscale | how many pixels to move if the movement is 1 m/s | |
yscale | ||
secs | how may seconds are we advecting? used in combination with rateOfIncrease | |
directionFactor | is 1 if max is better and -1 if min is better. | |
motx,moty,growth | are the motion estimates to be used. |
Implemented in w2kmeans::ProbabilisticAdvector< GridType >, w2kmeans::PutGetAdvector< GridType >, and w2kmeans::SwathAdvector< GridType >.
virtual std::pair<GridType,GridType> w2kmeans::MotionAdvector< GridType >::doChangeMotionVectors | ( | const GridType & | motx, | |
const GridType & | moty, | |||
double | xscale, | |||
double | yscale, | |||
double | secs | |||
) | [inline, protected, virtual] |
Subclasses can over-ride this method to change the motion vector before it is presented to doAdvect.
const code::TimeInterval& w2kmeans::MotionAdvector< GridType >::getAdvectInterval | ( | ) | const [inline] |
float w2kmeans::MotionAdvector< GridType >::getForecastValue | ( | float | inval, | |
float | secs, | |||
float | growth, | |||
int | directionFactor | |||
) | const [inline, protected] |
const code::Image<float>& w2kmeans::MotionAdvector< GridType >::getSplatWeights | ( | ) | const [inline, protected] |
virtual void w2kmeans::MotionEstimateHandler< GridType >::handleIntermediateProduct | ( | const code::DataType & | prod | ) | [virtual, inherited] |
virtual void w2kmeans::MotionAdvector< GridType >::handleMotionEstimate | ( | const GridType & | east, | |
const GridType & | south, | |||
const GridType & | incRate, | |||
size_t | scale, | |||
bool | complete | |||
) | [virtual] |
simply updates its internal motion vector storage.
Actual advection is done using this estimate by the advect methods.
Implements w2kmeans::MotionEstimateHandler< GridType >.
bool w2kmeans::MotionAdvector< GridType >::hasValidMotionEstimate | ( | const code::Time & | t | ) | const |
is the motion estimate that we have valid at this time?
void w2kmeans::MotionAdvector< GridType >::setAccelerationCorrection | ( | bool | flag | ) | [inline] |
Should we do acceleration correction? By default, we dont.
void w2kmeans::MotionAdvector< GridType >::setAdvectInterval | ( | const code::TimeInterval & | howFarAhead | ) |
to change interval after creation.
void w2kmeans::MotionAdvector< GridType >::setConstantUVFlag | ( | bool | inFlag | ) | [inline] |
By default, every grid point receives a different motion vector, but you can ask for a constant UV to be applied to the entire field by setting this flag.
void w2kmeans::MotionAdvector< GridType >::setMaxIsBetter | ( | bool | flag | ) |
Are smaller values storms (as in infrared temperature) or bigger values (as in radar reflectivity)?
By default, larger values are better i.e. flag is true.
void w2kmeans::MotionAdvector< GridType >::setMaxRateOfIncrease | ( | double | maxGrowth, | |
double | maxDecay | |||
) |
virtual void w2kmeans::MotionAdvector< GridType >::setOutputTypeName | ( | GridType & | data | ) | [protected, virtual] |
set the output typename and colormap.
The default is use Intype_xxxmin and the same color map as the original product.
Reimplemented in w2kmeans::ProbabilisticAdvector< GridType >, and w2kmeans::SwathAdvector< GridType >.
void w2kmeans::MotionAdvector< GridType >::setPostprocessingFilter | ( | code::SmartPtr< w2img::ImageFilter > | newFilter | ) | [inline] |
Add a postprocessing filter on the advected locations.
by default, there is no postprocessing done on these.
void w2kmeans::MotionAdvector< GridType >::setPreferredScale | ( | size_t | newScale | ) |
Set the scale of regions to follow.
By default, we follow the 1st scale ( 0 is most detailed ) and for every 30 min advance, we go up 1. So a 60min forecaster prefers scale=2, 90min-->3 and so on. Use this method to change this default.
void w2kmeans::MotionAdvector< GridType >::setRateOfIncreaseFlag | ( | bool | inFlag | ) | [inline] |
void w2kmeans::MotionAdvector< GridType >::setSplatting | ( | bool | ) |
turn on/off splatting during advection.
By default, splatting is off.
void w2kmeans::MotionAdvector< GridType >::setSplatWeights | ( | const code::Image< float > & | wts | ) | [protected] |
the default splat-weights is a Cressman kernel of radius 3
static void w2kmeans::MotionAdvector< GridType >::setValueIfBetter | ( | code::Image< float > * | result, | |
int | x, | |||
int | y, | |||
double | value, | |||
const code::Image< float > & | splatWeights, | |||
bool | is_max_better | |||
) | [static, protected] |
static void w2kmeans::MotionAdvector< GridType >::setValueIfBetter | ( | code::Image< float > * | result, | |
int | x, | |||
int | y, | |||
double | value, | |||
bool | is_max_better | |||
) | [static, protected] |