mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-02 03:20:05 +00:00
Adding color table layer
This commit is contained in:
parent
5bbfb1ecd9
commit
1c093d01f4
12 changed files with 324 additions and 25 deletions
|
|
@ -122,20 +122,42 @@ Level2ProductView::Level2ProductView(
|
|||
Level2ProductView::~Level2ProductView() = default;
|
||||
|
||||
const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
Level2ProductView::color_table(uint16_t& minValue, uint16_t& maxValue) const
|
||||
Level2ProductView::color_table() const
|
||||
{
|
||||
if (p->colorTableLut_.size() == 0)
|
||||
{
|
||||
return RadarProductView::color_table(minValue, maxValue);
|
||||
return RadarProductView::color_table();
|
||||
}
|
||||
else
|
||||
{
|
||||
minValue = p->colorTableMin_;
|
||||
maxValue = p->colorTableMax_;
|
||||
return p->colorTableLut_;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t Level2ProductView::color_table_min() const
|
||||
{
|
||||
if (p->colorTableLut_.size() == 0)
|
||||
{
|
||||
return RadarProductView::color_table_min();
|
||||
}
|
||||
else
|
||||
{
|
||||
return p->colorTableMin_;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t Level2ProductView::color_table_max() const
|
||||
{
|
||||
if (p->colorTableLut_.size() == 0)
|
||||
{
|
||||
return RadarProductView::color_table_max();
|
||||
}
|
||||
else
|
||||
{
|
||||
return p->colorTableMax_;
|
||||
}
|
||||
}
|
||||
|
||||
float Level2ProductView::elevation() const
|
||||
{
|
||||
return p->elevationCut_;
|
||||
|
|
@ -306,7 +328,6 @@ void Level2ProductView::ComputeSweep()
|
|||
return;
|
||||
}
|
||||
|
||||
float elevation;
|
||||
std::shared_ptr<wsr88d::rda::ElevationScan> radarData;
|
||||
std::tie(radarData, p->elevationCut_, p->elevationCuts_) =
|
||||
p->radarProductManager_->GetLevel2Data(p->dataBlockType_,
|
||||
|
|
|
|||
|
|
@ -29,10 +29,11 @@ public:
|
|||
std::shared_ptr<manager::RadarProductManager> radarProductManager);
|
||||
~Level2ProductView();
|
||||
|
||||
const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
color_table(uint16_t& minValue, uint16_t& maxValue) const override;
|
||||
float elevation() const override;
|
||||
float range() const override;
|
||||
const std::vector<boost::gil::rgba8_pixel_t>& color_table() const override;
|
||||
uint16_t color_table_min() const override;
|
||||
uint16_t color_table_max() const override;
|
||||
float elevation() const override;
|
||||
float range() const override;
|
||||
std::chrono::system_clock::time_point sweep_time() const override;
|
||||
const std::vector<float>& vertices() const override;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,13 +33,21 @@ RadarProductView::RadarProductView() :
|
|||
RadarProductView::~RadarProductView() = default;
|
||||
|
||||
const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
RadarProductView::color_table(uint16_t& minValue, uint16_t& maxValue) const
|
||||
RadarProductView::color_table() const
|
||||
{
|
||||
minValue = DEFAULT_COLOR_TABLE_MIN;
|
||||
maxValue = DEFAULT_COLOR_TABLE_MAX;
|
||||
return DEFAULT_COLOR_TABLE;
|
||||
}
|
||||
|
||||
uint16_t RadarProductView::color_table_min() const
|
||||
{
|
||||
return DEFAULT_COLOR_TABLE_MIN;
|
||||
}
|
||||
|
||||
uint16_t RadarProductView::color_table_max() const
|
||||
{
|
||||
return DEFAULT_COLOR_TABLE_MAX;
|
||||
}
|
||||
|
||||
float RadarProductView::elevation() const
|
||||
{
|
||||
return 0.0f;
|
||||
|
|
|
|||
|
|
@ -25,10 +25,11 @@ public:
|
|||
explicit RadarProductView();
|
||||
~RadarProductView();
|
||||
|
||||
virtual const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
color_table(uint16_t& minValue, uint16_t& maxValue) const;
|
||||
virtual float elevation() const;
|
||||
virtual float range() const;
|
||||
virtual const std::vector<boost::gil::rgba8_pixel_t>& color_table() const;
|
||||
virtual uint16_t color_table_min() const;
|
||||
virtual uint16_t color_table_max() const;
|
||||
virtual float elevation() const;
|
||||
virtual float range() const;
|
||||
virtual std::chrono::system_clock::time_point sweep_time() const;
|
||||
virtual const std::vector<float>& vertices() const = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue