comparison layer/SliceLayer.cpp @ 682:1a0dfcbffaf1

Drop std:: from cout, cerr, endl -- pull these in through Debug.h
author Chris Cannam
date Tue, 26 Nov 2013 14:06:40 +0000
parents 5b72899d692b
children 1d526ba11a24
comparison
equal deleted inserted replaced
681:eaf4446a1bef 682:1a0dfcbffaf1
55 { 55 {
56 const DenseThreeDimensionalModel *sliceable = 56 const DenseThreeDimensionalModel *sliceable =
57 dynamic_cast<const DenseThreeDimensionalModel *>(model); 57 dynamic_cast<const DenseThreeDimensionalModel *>(model);
58 58
59 if (model && !sliceable) { 59 if (model && !sliceable) {
60 std::cerr << "WARNING: SliceLayer::setSliceableModel(" << model 60 cerr << "WARNING: SliceLayer::setSliceableModel(" << model
61 << "): model is not a DenseThreeDimensionalModel" << std::endl; 61 << "): model is not a DenseThreeDimensionalModel" << endl;
62 } 62 }
63 63
64 if (m_sliceableModel == sliceable) return; 64 if (m_sliceableModel == sliceable) return;
65 65
66 m_sliceableModel = sliceable; 66 m_sliceableModel = sliceable;
358 int f0x = v->getXForFrame(f0); 358 int f0x = v->getXForFrame(f0);
359 f0 = v->getFrameForX(f0x); 359 f0 = v->getFrameForX(f0x);
360 size_t f1 = v->getFrameForX(f0x + 1); 360 size_t f1 = v->getFrameForX(f0x + 1);
361 if (f1 > f0) --f1; 361 if (f1 > f0) --f1;
362 362
363 // std::cerr << "centre frame " << v->getCentreFrame() << ", x " << f0x << ", f0 " << f0 << ", f1 " << f1 << std::endl; 363 // cerr << "centre frame " << v->getCentreFrame() << ", x " << f0x << ", f0 " << f0 << ", f1 " << f1 << endl;
364 364
365 size_t res = m_sliceableModel->getResolution(); 365 size_t res = m_sliceableModel->getResolution();
366 size_t col0 = f0 / res; 366 size_t col0 = f0 / res;
367 size_t col1 = col0; 367 size_t col1 = col0;
368 if (m_samplingMode != NearestSample) col1 = f1 / res; 368 if (m_samplingMode != NearestSample) col1 = f1 / res;
369 f0 = col0 * res; 369 f0 = col0 * res;
370 f1 = (col1 + 1) * res - 1; 370 f1 = (col1 + 1) * res - 1;
371 371
372 // std::cerr << "resolution " << res << ", col0 " << col0 << ", col1 " << col1 << ", f0 " << f0 << ", f1 " << f1 << std::endl; 372 // cerr << "resolution " << res << ", col0 " << col0 << ", col1 " << col1 << ", f0 " << f0 << ", f1 " << f1 << endl;
373 373
374 m_currentf0 = f0; 374 m_currentf0 = f0;
375 m_currentf1 = f1; 375 m_currentf1 = f1;
376 376
377 BiasCurve curve; 377 BiasCurve curve;
620 620
621 *min = -50; 621 *min = -50;
622 *max = 50; 622 *max = 50;
623 *deflt = 0; 623 *deflt = 0;
624 624
625 std::cerr << "gain is " << m_gain << ", mode is " << m_samplingMode << std::endl; 625 cerr << "gain is " << m_gain << ", mode is " << m_samplingMode << endl;
626 626
627 val = lrint(log10(m_gain) * 20.0); 627 val = lrint(log10(m_gain) * 20.0);
628 if (val < *min) val = *min; 628 if (val < *min) val = *min;
629 if (val > *max) val = *max; 629 if (val > *max) val = *max;
630 630