comparison layer/Colour3DPlotLayer.cpp @ 1412:79032214f79d

Debug tweaks
author Chris Cannam
date Wed, 19 Dec 2018 10:40:17 +0000
parents f08a3b8cdb9d
children fa986b91d77f
comparison
equal deleted inserted replaced
1411:6dc3a36d9794 1412:79032214f79d
203 203
204 void 204 void
205 Colour3DPlotLayer::invalidateMagnitudes() 205 Colour3DPlotLayer::invalidateMagnitudes()
206 { 206 {
207 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 207 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
208 cerr << "Colour3DPlotLayer::invalidateMagnitudes called" << endl; 208 SVDEBUG << "Colour3DPlotLayer::invalidateMagnitudes called" << endl;
209 #endif 209 #endif
210 m_viewMags.clear(); 210 m_viewMags.clear();
211 } 211 }
212 212
213 Dense3DModelPeakCache * 213 Dense3DModelPeakCache *
624 Colour3DPlotLayer::setLayerDormant(const LayerGeometryProvider *v, bool dormant) 624 Colour3DPlotLayer::setLayerDormant(const LayerGeometryProvider *v, bool dormant)
625 { 625 {
626 if (dormant) { 626 if (dormant) {
627 627
628 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 628 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
629 cerr << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")" 629 SVDEBUG << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")"
630 << endl; 630 << endl;
631 #endif 631 #endif
632 632
633 if (isLayerDormant(v)) { 633 if (isLayerDormant(v)) {
634 return; 634 return;
1116 1116
1117 if (magRange.isSet()) { 1117 if (magRange.isSet()) {
1118 if (m_viewMags[viewId] != magRange) { 1118 if (m_viewMags[viewId] != magRange) {
1119 m_viewMags[viewId] = magRange; 1119 m_viewMags[viewId] = magRange;
1120 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1120 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1121 cerr << "mag range in this view has changed: " 1121 SVDEBUG << "mag range in this view has changed: "
1122 << magRange.getMin() << " -> " << magRange.getMax() << endl; 1122 << magRange.getMin() << " -> "
1123 << magRange.getMax() << endl;
1123 #endif 1124 #endif
1124 } 1125 }
1125 } 1126 }
1126 1127
1127 if (!continuingPaint && m_normalizeVisibleArea && 1128 if (!continuingPaint && m_normalizeVisibleArea &&
1128 m_viewMags[viewId] != m_lastRenderedMags[viewId]) { 1129 m_viewMags[viewId] != m_lastRenderedMags[viewId]) {
1129 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1130 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1130 cerr << "mag range has changed from last rendered range: re-rendering" 1131 SVDEBUG << "mag range has changed from last rendered range: re-rendering"
1131 << endl; 1132 << endl;
1132 #endif 1133 #endif
1133 delete m_renderers[viewId]; 1134 delete m_renderers[viewId];
1134 m_renderers.erase(viewId); 1135 m_renderers.erase(viewId);
1135 v->updatePaintRect(v->getPaintRect()); 1136 v->updatePaintRect(v->getPaintRect());
1144 SVDEBUG << "Colour3DPlotLayer::paint: model says shouldUseLogValueScale = " << m_model->shouldUseLogValueScale() << endl; 1145 SVDEBUG << "Colour3DPlotLayer::paint: model says shouldUseLogValueScale = " << m_model->shouldUseLogValueScale() << endl;
1145 } 1146 }
1146 */ 1147 */
1147 Profiler profiler("Colour3DPlotLayer::paint"); 1148 Profiler profiler("Colour3DPlotLayer::paint");
1148 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1149 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1149 cerr << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", rect is (" << rect.x() << "," << rect.y() << ") " << rect.width() << "x" << rect.height() << endl; 1150 SVDEBUG << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << ", rect is (" << rect.x() << "," << rect.y() << ") " << rect.width() << "x" << rect.height() << endl;
1150 #endif 1151 #endif
1151 1152
1152 int completion = 0; 1153 int completion = 0;
1153 if (!m_model || !m_model->isOK() || !m_model->isReady(&completion)) { 1154 if (!m_model || !m_model->isOK() || !m_model->isReady(&completion)) {
1154 if (completion > 0) { 1155 if (completion > 0) {
1158 return; 1159 return;
1159 } 1160 }
1160 1161
1161 if (m_model->getWidth() == 0) { 1162 if (m_model->getWidth() == 0) {
1162 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1163 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
1163 cerr << "Colour3DPlotLayer::paint(): model width == 0, " 1164 SVDEBUG << "Colour3DPlotLayer::paint(): model width == 0, "
1164 << "nothing to paint (yet)" << endl; 1165 << "nothing to paint (yet)" << endl;
1165 #endif 1166 #endif
1166 return; 1167 return;
1167 } 1168 }
1168 1169
1303 } else if (columnNormalization == "hybrid") { 1304 } else if (columnNormalization == "hybrid") {
1304 setNormalization(ColumnNormalization::Hybrid); 1305 setNormalization(ColumnNormalization::Hybrid);
1305 } else if (columnNormalization == "none") { 1306 } else if (columnNormalization == "none") {
1306 setNormalization(ColumnNormalization::None); 1307 setNormalization(ColumnNormalization::None);
1307 } else { 1308 } else {
1308 cerr << "NOTE: Unknown or unsupported columnNormalization attribute \"" 1309 SVCERR << "NOTE: Unknown or unsupported columnNormalization attribute \""
1309 << columnNormalization << "\"" << endl; 1310 << columnNormalization << "\"" << endl;
1310 } 1311 }
1311 } 1312 }
1312 1313
1313 if (!haveNewStyleNormalization) { 1314 if (!haveNewStyleNormalization) {
1314 1315