1 #ifndef INTERSECTION_HPP 2 #define INTERSECTION_HPP 27 m_intersection_pos = 0.0;
62 return m_intersection_pos;
72 m_intersection_pos = t;
104 m_avg_computed =
false;
114 m_points = std::move(points);
115 m_avg_computed =
false;
177 m_avg_computed =
false;
189 m_spline->evaluateSingle(m_intersection_pos,p);
200 return m_origAvgValue;
213 for(
auto it = m_points.begin(); it != m_points.end(); it++)
215 bool sign =
sgn(direction) ==
sgn(m_cosTheta);
220 else if(*it > 0 && !sign)
226 if (m_points.size()==0){
230 m_avgValue = m_avgValue/m_points.size();
246 positive = std::accumulate(m_points.begin(), m_points.end(), 0,
247 [](
int k, T l){
if(l > 0)
return k + 1;
return k; }
250 negative = m_points.size()-positive;
252 T pos_weight = (T)(positive - negative)/(double)(positive + negative);
253 pos_weight = pos_weight * pos_weight;
254 T ret = A*pos_weight;
255 if(abs(m_cosTheta) > a && abs(m_cosTheta) < b)
288 if(m_img->
inImage(img_x, img_y))
290 m_img->
regionGrow(m_points,(
int)img_x, (
int)img_y);
296 void __computeAverage()
298 m_avgValue = std::accumulate(m_points.begin(), m_points.end(), 0.0, plus<T>());
300 m_origAvgValue = m_avgValue;
301 m_avg_computed =
true;
303 if (m_points.size()==0){
307 m_avgValue = m_avgValue/(T)m_points.size();
312 T m_intersection_pos;
323 #endif //INTERSECTION_HPP void correctAliasing(T direction, T Vnyq)
T estimateVelocitySimple()
T getParameterPosition() const
void setPoints(const vector< T > &points)
void setSpline(const Spline3D< T > *spline)
const Spline3D< T > * getSpline() const
void evaluate(T p[3]) const
T sampleWeight(const T A, const T a, const T b) const
void setMetaImage(const MetaImage< inData_t > *img)
void setValid(bool valid)
void setPoints(vector< T > &&points)
const MetaImage< inData_t > * getMetaImage() const
vector< T > & getPoints()
void setParameterPosition(T t)