本文整理汇总了C++中Statistics::HrsPixels方法的典型用法代码示例。如果您正苦于以下问题:C++ Statistics::HrsPixels方法的具体用法?C++ Statistics::HrsPixels怎么用?C++ Statistics::HrsPixels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statistics
的用法示例。
在下文中一共展示了Statistics::HrsPixels方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PvlStats
// Return a PVL group containing the statistical information
PvlGroup PvlStats(Statistics &stats, const QString &name) {
// Construct a label with the results
PvlGroup results(name);
if(stats.ValidPixels() != 0) {
results += PvlKeyword("Average", toString(stats.Average()));
results += PvlKeyword("StandardDeviation", toString(stats.StandardDeviation()));
results += PvlKeyword("Variance", toString(stats.Variance()));
results += PvlKeyword("Minimum", toString(stats.Minimum()));
results += PvlKeyword("Maximum", toString(stats.Maximum()));
}
results += PvlKeyword("TotalPixels", toString(stats.TotalPixels()));
results += PvlKeyword("ValidPixels", toString(stats.ValidPixels()));
results += PvlKeyword("NullPixels", toString(stats.NullPixels()));
results += PvlKeyword("LisPixels", toString(stats.LisPixels()));
results += PvlKeyword("LrsPixels", toString(stats.LrsPixels()));
results += PvlKeyword("HisPixels", toString(stats.HisPixels()));
results += PvlKeyword("HrsPixels", toString(stats.HrsPixels()));
return results;
}
示例2: IsisMain
void IsisMain() {
const QString caminfo_program = "caminfo";
UserInterface &ui = Application::GetUserInterface();
QList< QPair<QString, QString> > *general = NULL, *camstats = NULL, *statistics = NULL;
BandGeometry *bandGeom = NULL;
// Get input filename
FileName in = ui.GetFileName("FROM");
// Get the format
QString sFormat = ui.GetAsString("FORMAT");
// if true then run spiceinit, xml default is FALSE
// spiceinit will use system kernels
if(ui.GetBoolean("SPICE")) {
QString parameters = "FROM=" + in.expanded();
ProgramLauncher::RunIsisProgram("spiceinit", parameters);
}
Process p;
Cube *incube = p.SetInputCube("FROM");
// General data gathering
general = new QList< QPair<QString, QString> >;
general->append(MakePair("Program", caminfo_program));
general->append(MakePair("IsisVersion", Application::Version()));
general->append(MakePair("RunDate", iTime::CurrentGMT()));
general->append(MakePair("IsisId", SerialNumber::Compose(*incube)));
general->append(MakePair("From", in.baseName() + ".cub"));
general->append(MakePair("Lines", toString(incube->lineCount())));
general->append(MakePair("Samples", toString(incube->sampleCount())));
general->append(MakePair("Bands", toString(incube->bandCount())));
// Run camstats on the entire image (all bands)
// another camstats will be run for each band and output
// for each band.
if(ui.GetBoolean("CAMSTATS")) {
camstats = new QList< QPair<QString, QString> >;
QString filename = ui.GetAsString("FROM");
int sinc = ui.GetInteger("SINC");
int linc = ui.GetInteger("LINC");
CameraStatistics stats(filename, sinc, linc);
Pvl camPvl = stats.toPvl();
PvlGroup cg = camPvl.findGroup("Latitude", Pvl::Traverse);
camstats->append(MakePair("MinimumLatitude", cg["latitudeminimum"][0]));
camstats->append(MakePair("MaximumLatitude", cg["latitudemaximum"][0]));
cg = camPvl.findGroup("Longitude", Pvl::Traverse);
camstats->append(MakePair("MinimumLongitude", cg["longitudeminimum"][0]));
camstats->append(MakePair("MaximumLongitude", cg["longitudemaximum"][0]));
cg = camPvl.findGroup("Resolution", Pvl::Traverse);
camstats->append(MakePair("MinimumResolution", cg["resolutionminimum"][0]));
camstats->append(MakePair("MaximumResolution", cg["resolutionmaximum"][0]));
cg = camPvl.findGroup("PhaseAngle", Pvl::Traverse);
camstats->append(MakePair("MinimumPhase", cg["phaseminimum"][0]));
camstats->append(MakePair("MaximumPhase", cg["phasemaximum"][0]));
cg = camPvl.findGroup("EmissionAngle", Pvl::Traverse);
camstats->append(MakePair("MinimumEmission", cg["emissionminimum"][0]));
camstats->append(MakePair("MaximumEmission", cg["emissionmaximum"][0]));
cg = camPvl.findGroup("IncidenceAngle", Pvl::Traverse);
camstats->append(MakePair("MinimumIncidence", cg["incidenceminimum"][0]));
camstats->append(MakePair("MaximumIncidence", cg["incidencemaximum"][0]));
cg = camPvl.findGroup("LocalSolarTime", Pvl::Traverse);
camstats->append(MakePair("LocalTimeMinimum", cg["localsolartimeMinimum"][0]));
camstats->append(MakePair("LocalTimeMaximum", cg["localsolartimeMaximum"][0]));
}
// Compute statistics for entire cube
if(ui.GetBoolean("STATISTICS")) {
statistics = new QList< QPair<QString, QString> >;
LineManager iline(*incube);
Statistics stats;
Progress progress;
progress.SetText("Statistics...");
progress.SetMaximumSteps(incube->lineCount()*incube->bandCount());
progress.CheckStatus();
iline.SetLine(1);
for(; !iline.end() ; iline.next()) {
incube->read(iline);
stats.AddData(iline.DoubleBuffer(), iline.size());
progress.CheckStatus();
}
// Compute stats of entire cube
double nPixels = stats.TotalPixels();
double nullpercent = (stats.NullPixels() / (nPixels)) * 100;
double hispercent = (stats.HisPixels() / (nPixels)) * 100;
double hrspercent = (stats.HrsPixels() / (nPixels)) * 100;
double lispercent = (stats.LisPixels() / (nPixels)) * 100;
double lrspercent = (stats.LrsPixels() / (nPixels)) * 100;
//.........这里部分代码省略.........