本文整理汇总了C++中TimeFrequencyData::GetSingleImage方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeFrequencyData::GetSingleImage方法的具体用法?C++ TimeFrequencyData::GetSingleImage怎么用?C++ TimeFrequencyData::GetSingleImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeFrequencyData
的用法示例。
在下文中一共展示了TimeFrequencyData::GetSingleImage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Add
void IterationsPlot::Add(TimeFrequencyData &data, TimeFrequencyMetaDataCPtr)
{
Item item;
Mask2DCPtr mask = data.GetSingleMask();
item.mode = ThresholdTools::Mode(data.GetSingleImage(), mask);
item.winsorizedMode = ThresholdTools::WinsorizedMode(data.GetSingleImage(), mask);
item.flaggedRatio = (double) mask->GetCount<true>() / ((double) mask->Width() * (double) mask->Height());
_stats.push_back(item);
}
示例2: PlotPowerTime
void RFIGuiController::PlotPowerTime()
{
if(IsImageLoaded())
{
Plot2D &plot = _plotManager->NewPlot2D("Power over time");
plot.SetLogarithmicYAxis(true);
TimeFrequencyData activeData = ActiveData();
Image2DCPtr image = activeData.GetSingleImage();
Mask2DPtr mask =
Mask2D::CreateSetMaskPtr<false>(image->Width(), image->Height());
Plot2DPointSet &totalPlot = plot.StartLine("Total");
RFIPlots::MakePowerTimePlot(totalPlot, image, mask, MetaData());
mask = Mask2D::CreateCopy(activeData.GetSingleMask());
if(!mask->AllFalse())
{
Plot2DPointSet &uncontaminatedPlot = plot.StartLine("Uncontaminated");
RFIPlots::MakePowerTimePlot(uncontaminatedPlot, image, mask, MetaData());
mask->Invert();
Plot2DPointSet &rfiPlot = plot.StartLine("RFI");
RFIPlots::MakePowerTimePlot(rfiPlot, image, mask, MetaData());
}
_plotManager->Update();
}
}
示例3: PlotPowerRMS
void RFIGuiController::PlotPowerRMS()
{
if(IsImageLoaded())
{
Plot2D &plot = _plotManager->NewPlot2D("Spectrum RMS");
plot.SetLogarithmicYAxis(true);
TimeFrequencyData activeData = ActiveData();
Image2DCPtr image = activeData.GetSingleImage();
Mask2DPtr mask =
Mask2D::CreateSetMaskPtr<false>(image->Width(), image->Height());
Plot2DPointSet &beforeSet = plot.StartLine("Before");
RFIPlots::MakeRMSSpectrumPlot(beforeSet, image, mask);
mask = Mask2D::CreateCopy(activeData.GetSingleMask());
if(!mask->AllFalse())
{
Plot2DPointSet &afterSet = plot.StartLine("After");
RFIPlots::MakeRMSSpectrumPlot(afterSet, image, mask);
//mask->Invert();
//Plot2DPointSet &rfiSet = plot.StartLine("RFI");
//RFIPlots::MakeRMSSpectrumPlot(rfiSet, _timeFrequencyWidget.Image(), mask);
}
_plotManager->Update();
}
}
示例4: PlotPowerSpectrumComparison
void RFIGuiController::PlotPowerSpectrumComparison()
{
if(IsImageLoaded())
{
Plot2D &plot = _plotManager->NewPlot2D("Power spectrum comparison");
TimeFrequencyData data = OriginalData();
Image2DCPtr image = data.GetSingleImage();
Mask2DCPtr mask = data.GetSingleMask();
Plot2DPointSet &originalSet = plot.StartLine("Original");
RFIPlots::MakePowerSpectrumPlot(originalSet, image, mask, MetaData());
data = ContaminatedData();
image = data.GetSingleImage();
mask = data.GetSingleMask();
Plot2DPointSet &alternativeSet = plot.StartLine("Alternative");
RFIPlots::MakePowerSpectrumPlot(alternativeSet, image, mask, MetaData());
_plotManager->Update();
}
}
示例5: PlotLogLogDist
void RFIGuiController::PlotLogLogDist()
{
if(IsImageLoaded())
{
TimeFrequencyData activeData = ActiveData();
HistogramCollection histograms(activeData.PolarisationCount());
for(unsigned p=0;p!=activeData.PolarisationCount();++p)
{
TimeFrequencyData *polData = activeData.CreateTFDataFromPolarisationIndex(p);
Image2DCPtr image = polData->GetSingleImage();
Mask2DCPtr mask = Mask2D::CreateCopy(polData->GetSingleMask());
histograms.Add(0, 1, p, image, mask);
}
_rfiGuiWindow.ShowHistogram(histograms);
}
}
示例6: PlotDist
void RFIGuiController::PlotDist()
{
if(IsImageLoaded())
{
Plot2D &plot = _plotManager->NewPlot2D("Distribution");
TimeFrequencyData activeData = ActiveData();
Image2DCPtr image = activeData.GetSingleImage();
Mask2DPtr mask =
Mask2D::CreateSetMaskPtr<false>(image->Width(), image->Height());
Plot2DPointSet &totalSet = plot.StartLine("Total");
RFIPlots::MakeDistPlot(totalSet, image, mask);
Plot2DPointSet &uncontaminatedSet = plot.StartLine("Uncontaminated");
mask = Mask2D::CreateCopy(activeData.GetSingleMask());
RFIPlots::MakeDistPlot(uncontaminatedSet, image, mask);
mask->Invert();
Plot2DPointSet &rfiSet = plot.StartLine("RFI");
RFIPlots::MakeDistPlot(rfiSet, image, mask);
_plotManager->Update();
}
}
示例7: PlotPowerSpectrum
void RFIGuiController::PlotPowerSpectrum()
{
if(IsImageLoaded())
{
Plot2D &plot = _plotManager->NewPlot2D("Power spectrum");
plot.SetLogarithmicYAxis(true);
TimeFrequencyData data = ActiveData();
Image2DCPtr image = data.GetSingleImage();
Mask2DPtr mask =
Mask2D::CreateSetMaskPtr<false>(image->Width(), image->Height());
Plot2DPointSet &beforeSet = plot.StartLine("Before");
RFIPlots::MakePowerSpectrumPlot(beforeSet, image, mask, MetaData());
mask = Mask2D::CreateCopy(data.GetSingleMask());
if(!mask->AllFalse())
{
Plot2DPointSet &afterSet = plot.StartLine("After");
RFIPlots::MakePowerSpectrumPlot(afterSet, image, mask, MetaData());
}
_plotManager->Update();
}
}