Fixing color table limits and threshold value

This commit is contained in:
Dan Paulat 2021-11-13 12:16:22 -06:00
parent aa48d8610a
commit 73d2b8323b
2 changed files with 3 additions and 4 deletions

View file

@ -298,7 +298,7 @@ void RadarProductLayer::UpdateColorTable()
gl.glGenerateMipmap(GL_TEXTURE_1D);
gl.glUniform1ui(p->uDataMomentOffsetLocation_, rangeMin);
gl.glUniform1f(p->uDataMomentScaleLocation_, rangeMax - rangeMin);
gl.glUniform1f(p->uDataMomentScaleLocation_, scale);
}
void RadarProductLayer::UpdateColorTableNextFrame()

View file

@ -209,7 +209,7 @@ void Level2ProductView::UpdateColorTable()
}
boost::integer_range<uint16_t> dataRange =
boost::irange<uint16_t>(rangeMin, rangeMax);
boost::irange<uint16_t>(rangeMin, rangeMax + 1);
std::vector<boost::gil::rgba8_pixel_t>& lut = p->colorTableLut_;
lut.resize(rangeMax - rangeMin + 1);
@ -309,8 +309,7 @@ void Level2ProductView::ComputeSweep()
// Compute threshold at which to display an individual bin
const float scale = momentData0->scale();
const float offset = momentData0->offset();
const uint16_t snrThreshold =
std::lroundf(momentData0->snr_threshold_raw() * scale / 10 + offset);
const uint16_t snrThreshold = momentData0->snr_threshold_raw();
// Azimuth resolution spacing:
// 1 = 0.5 degrees