comparison layer/Colour3DPlotLayer.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 41029a6e55c6
children 67e6d518ac27
comparison
equal deleted inserted replaced
681:eaf4446a1bef 682:1a0dfcbffaf1
687 687
688 if (m_invertVertical) sy = m_model->getHeight() - sy - 1; 688 if (m_invertVertical) sy = m_model->getHeight() - sy - 1;
689 689
690 float value = m_model->getValueAt(sx0, sy); 690 float value = m_model->getValueAt(sx0, sy);
691 691
692 // std::cerr << "bin value (" << sx0 << "," << sy << ") is " << value << std::endl; 692 // cerr << "bin value (" << sx0 << "," << sy << ") is " << value << endl;
693 693
694 QString binName = m_model->getBinName(sy); 694 QString binName = m_model->getBinName(sy);
695 if (binName == "") binName = QString("[%1]").arg(sy + 1); 695 if (binName == "") binName = QString("[%1]").arg(sy + 1);
696 else binName = QString("%1 [%2]").arg(binName).arg(sy + 1); 696 else binName = QString("%1 [%2]").arg(binName).arg(sy + 1);
697 697
784 if (pixel >= 0 && pixel < 256) { 784 if (pixel >= 0 && pixel < 256) {
785 QRgb c = m_cache->color(pixel); 785 QRgb c = m_cache->color(pixel);
786 paint.setPen(QColor(qRed(c), qGreen(c), qBlue(c))); 786 paint.setPen(QColor(qRed(c), qGreen(c), qBlue(c)));
787 paint.drawLine(5, 11 + y, cw - 5, 11 + y); 787 paint.drawLine(5, 11 + y, cw - 5, 11 + y);
788 } else { 788 } else {
789 std::cerr << "WARNING: Colour3DPlotLayer::paintVerticalScale: value " << value << ", mmin " << mmin << ", mmax " << mmax << " leads to invalid pixel " << pixel << std::endl; 789 cerr << "WARNING: Colour3DPlotLayer::paintVerticalScale: value " << value << ", mmin " << mmin << ", mmax " << mmax << " leads to invalid pixel " << pixel << endl;
790 } 790 }
791 } 791 }
792 792
793 QString minstr = QString("%1").arg(min); 793 QString minstr = QString("%1").arg(min);
794 QString maxstr = QString("%1").arg(max); 794 QString maxstr = QString("%1").arg(max);
968 m_cacheValidEnd = 0; 968 m_cacheValidEnd = 0;
969 } 969 }
970 970
971 if (m_cacheValidStart <= firstBin && m_cacheValidEnd >= lastBin) { 971 if (m_cacheValidStart <= firstBin && m_cacheValidEnd >= lastBin) {
972 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 972 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
973 std::cerr << "Cache is valid in this region already" << std::endl; 973 cerr << "Cache is valid in this region already" << endl;
974 #endif 974 #endif
975 return; 975 return;
976 } 976 }
977 977
978 size_t fillStart = firstBin; 978 size_t fillStart = firstBin;
1004 m_cacheValidStart = fillStart; 1004 m_cacheValidStart = fillStart;
1005 m_cacheValidEnd = fillEnd; 1005 m_cacheValidEnd = fillEnd;
1006 } 1006 }
1007 1007
1008 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1008 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1009 std::cerr << "Cache size " << cacheWidth << "x" << cacheHeight << " will be valid from " << m_cacheValidStart << " to " << m_cacheValidEnd << std::endl; 1009 cerr << "Cache size " << cacheWidth << "x" << cacheHeight << " will be valid from " << m_cacheValidStart << " to " << m_cacheValidEnd << endl;
1010 #endif 1010 #endif
1011 1011
1012 DenseThreeDimensionalModel::Column values; 1012 DenseThreeDimensionalModel::Column values;
1013 1013
1014 float min = m_model->getMinimumLevel(); 1014 float min = m_model->getMinimumLevel();
1227 return; 1227 return;
1228 } 1228 }
1229 1229
1230 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1230 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1231 SVDEBUG << "Colour3DPlotLayer::paint: w " << x1-x0 << ", h " << h << ", sx0 " << sx0 << ", sx1 " << sx1 << ", sw " << sx1-sx0 << ", sh " << sh << endl; 1231 SVDEBUG << "Colour3DPlotLayer::paint: w " << x1-x0 << ", h " << h << ", sx0 " << sx0 << ", sx1 " << sx1 << ", sw " << sx1-sx0 << ", sh " << sh << endl;
1232 std::cerr << "Colour3DPlotLayer: sample rate is " << m_model->getSampleRate() << ", resolution " << m_model->getResolution() << std::endl; 1232 cerr << "Colour3DPlotLayer: sample rate is " << m_model->getSampleRate() << ", resolution " << m_model->getResolution() << endl;
1233 #endif 1233 #endif
1234 1234
1235 QPoint illuminatePos; 1235 QPoint illuminatePos;
1236 bool illuminate = v->shouldIlluminateLocalFeatures(this, illuminatePos); 1236 bool illuminate = v->shouldIlluminateLocalFeatures(this, illuminatePos);
1237 char labelbuf[10]; 1237 char labelbuf[10];
1287 paint.setPen(v->getForeground()); 1287 paint.setPen(v->getForeground());
1288 } 1288 }
1289 } 1289 }
1290 1290
1291 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1291 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1292 // std::cerr << "rect " << r.x() << "," << r.y() << " " 1292 // cerr << "rect " << r.x() << "," << r.y() << " "
1293 // << r.width() << "x" << r.height() << std::endl; 1293 // << r.width() << "x" << r.height() << endl;
1294 #endif 1294 #endif
1295 1295
1296 paint.drawRect(r); 1296 paint.drawRect(r);
1297 1297
1298 if (showLabel) { 1298 if (showLabel) {