Exemplo n.º 1
0
void R3DComputeMatchesThread::prepareResultStrings(const R3DComputeMatches::R3DComputeMatchesStatistics &statistics,
	wxTimeSpan runTime)
{
	resultStrings_.Clear();

	const std::vector<int> &numberOfKeypoints = statistics.numberOfKeypoints_;

	if(!numberOfKeypoints.empty())
	{
		accumulator_set<int, stats<tag::median, tag::min, tag::max, tag::mean> > acc;
		for(size_t i = 0; i < numberOfKeypoints.size(); i++)
		{
			acc(numberOfKeypoints[i]);
		}

		resultStrings_.Add(wxT("Keypoints per image (min/max/avg/median)"));
		resultStrings_.Add(wxString::Format(wxT("%d/%d/%d/%d"), 
			(min)(acc), (max)(acc),
			static_cast<int>(mean(acc)),
			static_cast<int>(median(acc))));
	}

	pComputeMatches_->numberOfKeypoints_ = numberOfKeypoints;

	wxString runTimeStr;
	if(runTime.GetHours() > 0)
		runTimeStr = runTime.Format(wxT("%H:%M:%S.%l"));
	else
		runTimeStr = runTime.Format(wxT("%M:%S.%l"));
	resultStrings_.Add(wxT("Elapsed time"));
	resultStrings_.Add(runTimeStr);
	pComputeMatches_->runningTime_ = runTimeStr;
}
Exemplo n.º 2
0
void serverPage::EnableCaching(wxTimeSpan expire_span) {
    wxDateTime      expire_date = wxDateTime::Now() + expire_span;

    D(debug("serverPage::EnableCaching(%s)\n", expire_span.Format(wxDefaultTimeSpanFormat).c_str()));

    m_bEnableCaching    = true;
    m_sCacheExpires     = expire_date.Format(wxT("%a, %d %b %Y %T GMT") , wxDateTime::UTC );

    return;
}
Exemplo n.º 3
0
bool wxTimeSpinCtrl::SetValue(const wxTimeSpan &span)
{
	m_txt->SetValue(span.Format(m_format));
	spinValue = span.GetSeconds().GetLo();
	return true;
}