|
ThreeB 1.1
|
This class compute the log-diff-hess probability of a spot, given an image patch and background due to existing spots. More...
#include <sampled_multispot.h>
Public Member Functions | |
| double | get_val (double d) |
| Vector< 4 > | get_diff (double) |
| Matrix< 4 > | get_hess (double) |
| double | get_val (const pair< double, Vector< 4 > > &d) |
| Vector< 4 > | get_diff (const pair< double, Vector< 4 > > &d) |
| Matrix< 4 > | get_hess (const pair< double, Vector< 4 > > &) |
| double | get_val (const tuple< double, Vector< 4 >, Matrix< 4 > > &d) |
| Vector< 4 > | get_diff (const tuple< double, Vector< 4 >, Matrix< 4 > > &d) |
| Matrix< 4 > | get_hess (const tuple< double, Vector< 4 >, Matrix< 4 > > &d) |
| template<class C > | |
| bool | type_has_hess (const C &) |
| bool | type_has_hess (const tuple< double, Vector< 4 >, Matrix< 4 > > &) |
| template<class C > | |
| bool | type_has_diff (const C &) |
| bool | type_has_diff (const pair< double, Vector< 4 > > &) |
| bool | type_has_diff (const tuple< double, Vector< 4 >, Matrix< 4 > > &) |
| template<class Input > | |
| SpotWithBackgroundMasked (const vector< vector< double > > &sample_intensities, const SWBG_SPOT_INTENSITIES &spot_intensities, const vector< vector< double > > &pixel_intensities, const double variance, const vector< int > &mask) | |
| double | log (int state, int obs) const |
| Vector< 4 > | diff_log (int state, int obs) const |
| Matrix< 4 > | hess_log (int state, int obs) const |
| double | get_val (double d) |
| Vector< 4 > | get_diff (double) |
| Matrix< 4 > | get_hess (double) |
| double | get_val (const pair< double, Vector< 4 > > &d) |
| Vector< 4 > | get_diff (const pair< double, Vector< 4 > > &d) |
| Matrix< 4 > | get_hess (const pair< double, Vector< 4 > > &) |
| double | get_val (const tuple< double, Vector< 4 >, Matrix< 4 > > &d) |
| Vector< 4 > | get_diff (const tuple< double, Vector< 4 >, Matrix< 4 > > &d) |
| Matrix< 4 > | get_hess (const tuple< double, Vector< 4 >, Matrix< 4 > > &d) |
| template<class C > | |
| bool | type_has_hess (const C &) |
| bool | type_has_hess (const tuple< double, Vector< 4 >, Matrix< 4 > > &) |
| template<class C > | |
| bool | type_has_diff (const C &) |
| bool | type_has_diff (const pair< double, Vector< 4 > > &) |
| bool | type_has_diff (const tuple< double, Vector< 4 >, Matrix< 4 > > &) |
| template<class Input > | |
| SpotWithBackgroundMasked (const vector< vector< double > > &sample_intensities, const SWBG_SPOT_INTENSITIES &spot_intensities, const vector< vector< double > > &pixel_intensities, const double variance, const vector< int > &mask) | |
| double | log (int state, int obs) const |
| Vector< 4 > | diff_log (int state, int obs) const |
| Matrix< 4 > | hess_log (int state, int obs) const |
Public Attributes | |
| vector< pair< double, double > > | log_prob |
| vector< Vector< 4 > > | diff_log_prob |
| vector< Matrix< 4 > > | hess_log_prob |
Static Public Attributes | |
| static const int | NumParameters = 4 |
This class compute the log-diff-hess probability of a spot, given an image patch and background due to existing spots.
Definition at line 5 of file sampled_multispot.h.
| SampledMultispot::SpotWithBackgroundMasked::SpotWithBackgroundMasked | ( | const vector< vector< double > > & | sample_intensities, |
| const SWBG_SPOT_INTENSITIES & | spot_intensities, | ||
| const vector< vector< double > > & | pixel_intensities, | ||
| const double | variance, | ||
| const vector< int > & | mask | ||
| ) | [inline] |
Definition at line 40 of file sampled_multispot.h.
{
return i;
}
inline double intensity(const pair<double, Vector<4> >& i)
{
return i.first;
}
//Add and remove a spot over the entire region
template<class T>
void remove_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so remove it
for(unsigned int p=0; p < spot_intensities.size(); p++)
current_sample_intensities[frame][p] -= intensity(spot_intensities[p]);
}
template<class T>
void add_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so add it
for(unsigned int p=0; p < spot_intensities.size(); p++)
current_sample_intensities[frame][p] += intensity(spot_intensities[p]);
}
//Add and remove a spot only over a mask.
template<class T>
void remove_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so remove it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] -= intensity(spot_intensities[mask[p]]);
}
template<class T>
void add_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so add it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] += intensity(spot_intensities[mask[p]]);
}
//Add and remove a drifty spot only over a mask.
template<class T>
void remove_spot(vector<vector<double> >& current_sample_intensities, const vector<vector<T> > & spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
const int steps = spot_intensities.size();
const int frames = current_sample_intensities.size();
for(int frame=0; frame < frames; frame++)
{
int s = frame * steps / frames;
if(spot_sample[frame] == 0) //Spot is on, so remove it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] -= intensity(spot_intensities[s][mask[p]]);
}
}
template<class T>
void add_spot(vector<vector<double> >& current_sample_intensities, const vector<vector<T> >& spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
const int steps = spot_intensities.size();
const int frames = current_sample_intensities.size();
for(int frame=0; frame < frames; frame++)
{
int s = frame * steps / frames;
if(spot_sample[frame] == 0) //Spot is on, so add it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] += intensity(spot_intensities[s][mask[p]]);
}
}
//Compute the spot intensity for a given spot at each pixel
inline vector<double> compute_spot_intensity(const vector<ImageRef>& pixels, const Vector<4>& params)
| SampledMultispot::SpotWithBackgroundMasked::SpotWithBackgroundMasked | ( | const vector< vector< double > > & | sample_intensities, |
| const SWBG_SPOT_INTENSITIES & | spot_intensities, | ||
| const vector< vector< double > > & | pixel_intensities, | ||
| const double | variance, | ||
| const vector< int > & | mask | ||
| ) | [inline] |
Definition at line 40 of file sampled_multispot.h.
{
return i;
}
inline double intensity(const pair<double, Vector<4> >& i)
{
return i.first;
}
//Add and remove a spot over the entire region
template<class T>
void remove_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so remove it
for(unsigned int p=0; p < spot_intensities.size(); p++)
current_sample_intensities[frame][p] -= intensity(spot_intensities[p]);
}
template<class T>
void add_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so add it
for(unsigned int p=0; p < spot_intensities.size(); p++)
current_sample_intensities[frame][p] += intensity(spot_intensities[p]);
}
//Add and remove a spot only over a mask.
template<class T>
void remove_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so remove it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] -= intensity(spot_intensities[mask[p]]);
}
template<class T>
void add_spot(vector<vector<double> >& current_sample_intensities, const vector<T>& spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
for(unsigned int frame=0; frame < current_sample_intensities.size(); frame++)
if(spot_sample[frame] == 0) //Spot is on, so add it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] += intensity(spot_intensities[mask[p]]);
}
//Add and remove a drifty spot only over a mask.
template<class T>
void remove_spot(vector<vector<double> >& current_sample_intensities, const vector<vector<T> > & spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
const int steps = spot_intensities.size();
const int frames = current_sample_intensities.size();
for(int frame=0; frame < frames; frame++)
{
int s = frame * steps / frames;
if(spot_sample[frame] == 0) //Spot is on, so remove it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] -= intensity(spot_intensities[s][mask[p]]);
}
}
template<class T>
void add_spot(vector<vector<double> >& current_sample_intensities, const vector<vector<T> >& spot_intensities, const vector<State>& spot_sample, const vector<int>& mask)
{
const int steps = spot_intensities.size();
const int frames = current_sample_intensities.size();
for(int frame=0; frame < frames; frame++)
{
int s = frame * steps / frames;
if(spot_sample[frame] == 0) //Spot is on, so add it
for(unsigned int p=0; p < mask.size(); p++)
current_sample_intensities[frame][mask[p]] += intensity(spot_intensities[s][mask[p]]);
}
}
//Compute the spot intensity for a given spot at each pixel
inline vector<double> compute_spot_intensity(const vector<ImageRef>& pixels, const Vector<4>& params)
| double SampledMultispot::SpotWithBackgroundMasked::get_val | ( | double | d | ) | [inline] |
Definition at line 13 of file sampled_multispot.h.
{
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::get_diff | ( | double | ) | [inline] |
Definition at line 14 of file sampled_multispot.h.
{
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::get_hess | ( | double | ) | [inline] |
Definition at line 15 of file sampled_multispot.h.
| double SampledMultispot::SpotWithBackgroundMasked::get_val | ( | const pair< double, Vector< 4 > > & | d | ) | [inline] |
Definition at line 17 of file sampled_multispot.h.
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::get_diff | ( | const pair< double, Vector< 4 > > & | d | ) | [inline] |
Definition at line 18 of file sampled_multispot.h.
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::get_hess | ( | const pair< double, Vector< 4 > > & | ) | [inline] |
Definition at line 19 of file sampled_multispot.h.
{
| double SampledMultispot::SpotWithBackgroundMasked::get_val | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | d | ) | [inline] |
Definition at line 21 of file sampled_multispot.h.
{
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::get_diff | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | d | ) | [inline] |
Definition at line 22 of file sampled_multispot.h.
{
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::get_hess | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | d | ) | [inline] |
Definition at line 23 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_hess | ( | const C & | ) | [inline] |
Definition at line 25 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_hess | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | ) | [inline] |
Definition at line 26 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_diff | ( | const C & | ) | [inline] |
Definition at line 28 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_diff | ( | const pair< double, Vector< 4 > > & | ) | [inline] |
Definition at line 29 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_diff | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | ) | [inline] |
Definition at line 30 of file sampled_multispot.h.
{
| double SampledMultispot::SpotWithBackgroundMasked::log | ( | int | state, |
| int | obs | ||
| ) | const [inline] |
Definition at line 135 of file sampled_multispot.h.
{
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::diff_log | ( | int | state, |
| int | obs | ||
| ) | const [inline] |
Definition at line 146 of file sampled_multispot.h.
{
vector<tuple<double, Vector<4>, Matrix<4> > > hessian(pixels.size());
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::hess_log | ( | int | state, |
| int | obs | ||
| ) | const [inline] |
Definition at line 157 of file sampled_multispot.h.
{
| double SampledMultispot::SpotWithBackgroundMasked::get_val | ( | double | d | ) | [inline] |
Definition at line 13 of file sampled_multispot.h.
{
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::get_diff | ( | double | ) | [inline] |
Definition at line 14 of file sampled_multispot.h.
{
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::get_hess | ( | double | ) | [inline] |
Definition at line 15 of file sampled_multispot.h.
| double SampledMultispot::SpotWithBackgroundMasked::get_val | ( | const pair< double, Vector< 4 > > & | d | ) | [inline] |
Definition at line 17 of file sampled_multispot.h.
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::get_diff | ( | const pair< double, Vector< 4 > > & | d | ) | [inline] |
Definition at line 18 of file sampled_multispot.h.
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::get_hess | ( | const pair< double, Vector< 4 > > & | ) | [inline] |
Definition at line 19 of file sampled_multispot.h.
{
| double SampledMultispot::SpotWithBackgroundMasked::get_val | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | d | ) | [inline] |
Definition at line 21 of file sampled_multispot.h.
{
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::get_diff | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | d | ) | [inline] |
Definition at line 22 of file sampled_multispot.h.
{
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::get_hess | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | d | ) | [inline] |
Definition at line 23 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_hess | ( | const C & | ) | [inline] |
Definition at line 25 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_hess | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | ) | [inline] |
Definition at line 26 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_diff | ( | const C & | ) | [inline] |
Definition at line 28 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_diff | ( | const pair< double, Vector< 4 > > & | ) | [inline] |
Definition at line 29 of file sampled_multispot.h.
{
| bool SampledMultispot::SpotWithBackgroundMasked::type_has_diff | ( | const tuple< double, Vector< 4 >, Matrix< 4 > > & | ) | [inline] |
Definition at line 30 of file sampled_multispot.h.
{
| double SampledMultispot::SpotWithBackgroundMasked::log | ( | int | state, |
| int | obs | ||
| ) | const [inline] |
Definition at line 135 of file sampled_multispot.h.
{
| Vector<4> SampledMultispot::SpotWithBackgroundMasked::diff_log | ( | int | state, |
| int | obs | ||
| ) | const [inline] |
Definition at line 146 of file sampled_multispot.h.
{
vector<tuple<double, Vector<4>, Matrix<4> > > hessian(pixels.size());
| Matrix<4> SampledMultispot::SpotWithBackgroundMasked::hess_log | ( | int | state, |
| int | obs | ||
| ) | const [inline] |
Definition at line 157 of file sampled_multispot.h.
{
static const int SampledMultispot::SpotWithBackgroundMasked::NumParameters = 4 [static] |
Definition at line 7 of file sampled_multispot.h.
| vector< pair< double, double > > SampledMultispot::SpotWithBackgroundMasked::log_prob |
Definition at line 9 of file sampled_multispot.h.
| vector< Vector< 4 > > SampledMultispot::SpotWithBackgroundMasked::diff_log_prob |
Definition at line 10 of file sampled_multispot.h.
| vector< Matrix< 4 > > SampledMultispot::SpotWithBackgroundMasked::hess_log_prob |
Definition at line 11 of file sampled_multispot.h.
1.7.4