##// END OF EJS Templates
Remove cmake function called that isn't necessary and makes failed the configuration test if test is enable
Remove cmake function called that isn't necessary and makes failed the configuration test if test is enable

File last commit:

r987:2928e8449245
r1069:6684c2bc54eb
Show More
SpectrogramSeries.cpp
50 lines | 2.1 KiB | text/x-c | CppLexer
/ core / src / Data / SpectrogramSeries.cpp
Alexandre Leroux
Creates SpectrogramSeries...
r863 #include <Data/SpectrogramSeries.h>
SpectrogramSeries::SpectrogramSeries(std::vector<double> xAxisData, std::vector<double> yAxisData,
std::vector<double> valuesData, const Unit &xAxisUnit,
Alexandre Leroux
Updates spectrogram to hold time resolution...
r987 const Unit &yAxisUnit, const Unit &valuesUnit,
double resolution)
Alexandre Leroux
Creates SpectrogramSeries...
r863 : SpectrogramSeries{
Alexandre Leroux
Updates spectrogram to hold time resolution...
r987 std::make_shared<ArrayData<1> >(std::move(xAxisData)),
xAxisUnit,
std::make_shared<ArrayData<2> >(std::move(valuesData), yAxisData.size()),
valuesUnit,
OptionalAxis{std::make_shared<ArrayData<1> >(std::move(yAxisData)), yAxisUnit},
resolution}
Alexandre Leroux
Creates SpectrogramSeries...
r863 {
}
SpectrogramSeries::SpectrogramSeries(std::shared_ptr<ArrayData<1> > xAxisData,
const Unit &xAxisUnit,
std::shared_ptr<ArrayData<2> > valuesData,
Alexandre Leroux
Updates spectrogram to hold time resolution...
r987 const Unit &valuesUnit, OptionalAxis yAxis, double resolution)
Alexandre Leroux
Creates SpectrogramSeries...
r863 : DataSeries{std::move(xAxisData), xAxisUnit, std::move(valuesData), valuesUnit,
Alexandre Leroux
Updates spectrogram to hold time resolution...
r987 std::move(yAxis)},
m_XResolution{resolution}
Alexandre Leroux
Creates SpectrogramSeries...
r863 {
}
std::unique_ptr<IDataSeries> SpectrogramSeries::clone() const
{
return std::make_unique<SpectrogramSeries>(*this);
}
std::shared_ptr<IDataSeries> SpectrogramSeries::subDataSeries(const SqpRange &range)
{
auto subXAxisData = std::vector<double>();
auto subValuesData = QVector<double>(); // Uses QVector to append easily values to it
this->lockRead();
auto bounds = xAxisRange(range.m_TStart, range.m_TEnd);
for (auto it = bounds.first; it != bounds.second; ++it) {
subXAxisData.push_back(it->x());
subValuesData.append(it->values());
}
auto yAxis = this->yAxis();
this->unlock();
return std::make_shared<SpectrogramSeries>(
std::make_shared<ArrayData<1> >(std::move(subXAxisData)), this->xAxisUnit(),
std::make_shared<ArrayData<2> >(subValuesData.toStdVector(), yAxis.size()),
this->valuesUnit(), std::move(yAxis));
}