w2kmeans::ProbabilisticSwathAdvector< GridType > Class Template Reference

Inheritance diagram for w2kmeans::ProbabilisticSwathAdvector< GridType >:

w2kmeans::ProbabilisticAdvector< GridType > w2kmeans::MotionAdvector< GridType > w2kmeans::MotionEstimateHandler< GridType > List of all members.

Detailed Description

template<class GridType>
class w2kmeans::ProbabilisticSwathAdvector< GridType >

Uses the motion vectors to advect the data forward, but in a probabilistic sense, so that the output images are a swathe of the probability of location until (not at) the desired time.

Author:
Lakshman
Version:
Id
w2kmeans_ProbabilisticSwathAdvector.h,v 1.3 2009/06/02 20:17:58 lakshman Exp


Public Member Functions

 ProbabilisticSwathAdvector (const code::TimeInterval &howFarAhead, const std::string &filtername)
 filtername is of the form probswath:thresh where you are interested in creating probability forecasts that a grid point will experience a dataval > thresh any time within the next howFarAhead minutes.
virtual ~ProbabilisticSwathAdvector ()
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 void handleIntermediateProduct (const code::DataType &prod)

Protected Member Functions

virtual void computeDisorgProb (const std::vector< typename ProbabilisticAdvector< GridType >::AdvectedPixel > &advected_pixels, code::Image< float > &disorg)
virtual void computeOrgProb (const std::vector< typename ProbabilisticAdvector< GridType >::AdvectedPixel > &advected_pixels, const code::Image< float > &splatKernel, code::Image< float > &disorg)
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)
 does a PUT in a probabilistic sense.
virtual void setOutputTypeName (GridType &data)
 Output is Prob_InType_xxxMin and uses ProbabilisticForecast colormap.
std::vector< CombinedProb > & getConfiguredCombinedProb ()
void addAdvectedPixel (int origx, int origy, int newx, int newy, int dimx, int dimy, float current_prob, float expected_prob, const code::Image< float > &splatWeights, std::vector< AdvectedPixel > *advected_pixels)
code::Image< float > createProbabilityKernel (float meanx, float meany, float sigmax, float sigmay, float xscale, float yscale)
CombinedProb getCombinedProb (const std::string &productname, float thresh)
virtual void computeDisorgProb (const std::vector< AdvectedPixel > &advected_pixels, code::Image< float > &disorg)
virtual void computeOrgProb (const std::vector< AdvectedPixel > &advected_pixels, const code::Image< float > &splatKernel, code::Image< float > &disorg)
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 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.
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)

Protected Attributes

std::map< std::string, ProductParam > product_params
float dataThresh
std::vector< CombinedProb > combined


Constructor & Destructor Documentation

template<class GridType>
w2kmeans::ProbabilisticSwathAdvector< GridType >::ProbabilisticSwathAdvector ( const code::TimeInterval &  howFarAhead,
const std::string &  filtername 
)

filtername is of the form probswath:thresh where you are interested in creating probability forecasts that a grid point will experience a dataval > thresh any time within the next howFarAhead minutes.

template<class GridType>
virtual w2kmeans::ProbabilisticSwathAdvector< GridType >::~ProbabilisticSwathAdvector (  )  [inline, virtual]


Member Function Documentation

template<class GridType>
void w2kmeans::ProbabilisticAdvector< GridType >::addAdvectedPixel ( int  origx,
int  origy,
int  newx,
int  newy,
int  dimx,
int  dimy,
float  current_prob,
float  expected_prob,
const code::Image< float > &  splatWeights,
std::vector< AdvectedPixel > *  advected_pixels 
) [protected, inherited]

template<class GridType>
bool w2kmeans::MotionAdvector< GridType >::advect ( const GridType &  data,
const std::string &  productName,
code::Image< float > *  result,
double  xscale,
double  yscale,
double  secs 
) [protected, inherited]

template method that sets up the motion estimates and then calls doAdvect

template<class GridType>
bool w2kmeans::MotionAdvector< GridType >::advect ( GridType &  data  )  [inherited]

advects the data given, returning true if the advection happened.

template<class GridType>
virtual void w2kmeans::ProbabilisticAdvector< GridType >::computeDisorgProb ( const std::vector< AdvectedPixel > &  advected_pixels,
code::Image< float > &  disorg 
) [protected, virtual, inherited]

template<class GridType>
virtual void w2kmeans::ProbabilisticSwathAdvector< GridType >::computeDisorgProb ( const std::vector< typename ProbabilisticAdvector< GridType >::AdvectedPixel > &  advected_pixels,
code::Image< float > &  disorg 
) [protected, virtual]

template<class GridType>
virtual void w2kmeans::ProbabilisticAdvector< GridType >::computeOrgProb ( const std::vector< AdvectedPixel > &  advected_pixels,
const code::Image< float > &  splatKernel,
code::Image< float > &  disorg 
) [protected, virtual, inherited]

template<class GridType>
virtual void w2kmeans::ProbabilisticSwathAdvector< GridType >::computeOrgProb ( const std::vector< typename ProbabilisticAdvector< GridType >::AdvectedPixel > &  advected_pixels,
const code::Image< float > &  splatKernel,
code::Image< float > &  disorg 
) [protected, virtual]

template<class GridType>
code::Image<float> w2kmeans::ProbabilisticAdvector< GridType >::createProbabilityKernel ( float  meanx,
float  meany,
float  sigmax,
float  sigmay,
float  xscale,
float  yscale 
) [protected, inherited]

template<class GridType>
virtual bool w2kmeans::ProbabilisticAdvector< 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, virtual, inherited]

does a PUT in a probabilistic sense.

Ignores growth rate.

Implements w2kmeans::MotionAdvector< GridType >.

template<class 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, inherited]

Subclasses can over-ride this method to change the motion vector before it is presented to doAdvect.

template<class GridType>
const code::TimeInterval& w2kmeans::MotionAdvector< GridType >::getAdvectInterval (  )  const [inline, inherited]

template<class GridType>
CombinedProb w2kmeans::ProbabilisticAdvector< GridType >::getCombinedProb ( const std::string &  productname,
float  thresh 
) [protected, inherited]

template<class GridType>
std::vector<CombinedProb>& w2kmeans::ProbabilisticAdvector< GridType >::getConfiguredCombinedProb (  )  [inline, protected, inherited]

template<class GridType>
float w2kmeans::MotionAdvector< GridType >::getForecastValue ( float  inval,
float  secs,
float  growth,
int  directionFactor 
) const [inline, protected, inherited]

template<class GridType>
const code::Image<float>& w2kmeans::MotionAdvector< GridType >::getSplatWeights (  )  const [inline, protected, inherited]

template<class GridType>
virtual void w2kmeans::MotionEstimateHandler< GridType >::handleIntermediateProduct ( const code::DataType &  prod  )  [virtual, inherited]

template<class GridType>
virtual void w2kmeans::MotionAdvector< GridType >::handleMotionEstimate ( const GridType &  east,
const GridType &  south,
const GridType &  incRate,
size_t  scale,
bool  complete 
) [virtual, inherited]

simply updates its internal motion vector storage.

Actual advection is done using this estimate by the advect methods.

Implements w2kmeans::MotionEstimateHandler< GridType >.

template<class GridType>
bool w2kmeans::MotionAdvector< GridType >::hasValidMotionEstimate ( const code::Time &  t  )  const [inherited]

is the motion estimate that we have valid at this time?

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setAccelerationCorrection ( bool  flag  )  [inline, inherited]

Should we do acceleration correction? By default, we dont.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setAdvectInterval ( const code::TimeInterval &  howFarAhead  )  [inherited]

to change interval after creation.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setConstantUVFlag ( bool  inFlag  )  [inline, inherited]

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.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setMaxIsBetter ( bool  flag  )  [inherited]

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.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setMaxRateOfIncrease ( double  maxGrowth,
double  maxDecay 
) [inherited]

template<class GridType>
virtual void w2kmeans::ProbabilisticAdvector< GridType >::setOutputTypeName ( GridType &  data  )  [protected, virtual, inherited]

Output is Prob_InType_xxxMin and uses ProbabilisticForecast colormap.

Reimplemented from w2kmeans::MotionAdvector< GridType >.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setPostprocessingFilter ( code::SmartPtr< w2img::ImageFilter newFilter  )  [inline, inherited]

Add a postprocessing filter on the advected locations.

by default, there is no postprocessing done on these.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setPreferredScale ( size_t  newScale  )  [inherited]

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.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setRateOfIncreaseFlag ( bool  inFlag  )  [inline, inherited]

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setSplatting ( bool   )  [inherited]

turn on/off splatting during advection.

By default, splatting is off.

template<class GridType>
void w2kmeans::MotionAdvector< GridType >::setSplatWeights ( const code::Image< float > &  wts  )  [protected, inherited]

the default splat-weights is a Cressman kernel of radius 3

template<class GridType>
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, inherited]

template<class GridType>
static void w2kmeans::MotionAdvector< GridType >::setValueIfBetter ( code::Image< float > *  result,
int  x,
int  y,
double  value,
bool  is_max_better 
) [static, protected, inherited]


Member Data Documentation

template<class GridType>
std::vector<CombinedProb> w2kmeans::ProbabilisticAdvector< GridType >::combined [protected, inherited]

template<class GridType>
float w2kmeans::ProbabilisticAdvector< GridType >::dataThresh [protected, inherited]

template<class GridType>
std::map<std::string, ProductParam> w2kmeans::ProbabilisticAdvector< GridType >::product_params [protected, inherited]


Generated on Fri May 4 13:40:24 2012 for WDSS-IIw2algs by  doxygen 1.4.7