mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:10:06 +00:00
Fixing color table limits and threshold value
This commit is contained in:
parent
aa48d8610a
commit
73d2b8323b
2 changed files with 3 additions and 4 deletions
|
|
@ -298,7 +298,7 @@ void RadarProductLayer::UpdateColorTable()
|
||||||
gl.glGenerateMipmap(GL_TEXTURE_1D);
|
gl.glGenerateMipmap(GL_TEXTURE_1D);
|
||||||
|
|
||||||
gl.glUniform1ui(p->uDataMomentOffsetLocation_, rangeMin);
|
gl.glUniform1ui(p->uDataMomentOffsetLocation_, rangeMin);
|
||||||
gl.glUniform1f(p->uDataMomentScaleLocation_, rangeMax - rangeMin);
|
gl.glUniform1f(p->uDataMomentScaleLocation_, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::UpdateColorTableNextFrame()
|
void RadarProductLayer::UpdateColorTableNextFrame()
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ void Level2ProductView::UpdateColorTable()
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::integer_range<uint16_t> dataRange =
|
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_;
|
std::vector<boost::gil::rgba8_pixel_t>& lut = p->colorTableLut_;
|
||||||
lut.resize(rangeMax - rangeMin + 1);
|
lut.resize(rangeMax - rangeMin + 1);
|
||||||
|
|
@ -309,8 +309,7 @@ void Level2ProductView::ComputeSweep()
|
||||||
// Compute threshold at which to display an individual bin
|
// Compute threshold at which to display an individual bin
|
||||||
const float scale = momentData0->scale();
|
const float scale = momentData0->scale();
|
||||||
const float offset = momentData0->offset();
|
const float offset = momentData0->offset();
|
||||||
const uint16_t snrThreshold =
|
const uint16_t snrThreshold = momentData0->snr_threshold_raw();
|
||||||
std::lroundf(momentData0->snr_threshold_raw() * scale / 10 + offset);
|
|
||||||
|
|
||||||
// Azimuth resolution spacing:
|
// Azimuth resolution spacing:
|
||||||
// 1 = 0.5 degrees
|
// 1 = 0.5 degrees
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue