本文整理汇总了C++中PvlGroup::SetName方法的典型用法代码示例。如果您正苦于以下问题:C++ PvlGroup::SetName方法的具体用法?C++ PvlGroup::SetName怎么用?C++ PvlGroup::SetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PvlGroup
的用法示例。
在下文中一共展示了PvlGroup::SetName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PvlCalStats
/**
* @brief Writes data specific to calibration statistics in Pvl Format
*
* This method is a compartmentalization of the writing of the contents of
* a HiImageClean object.
*
* This method dumps the calibration statistics computed from the HiRISE
* cube specifed on construction or through the load methods.
*/
void HiImageClean::PvlCalStats(PvlGroup &grp) const {
grp.SetName("CalibrationStatistics");
grp += PvlKeyword("Binning",_binning);
grp += PvlKeyword("TDI",_tdi);
grp += PvlKeyword("CPMM",_cpmm);
grp += PvlKeyword("Channel",_channelNo);
grp += PvlKeyword("FirstImageSample",_firstImageSample);
grp += PvlKeyword("FirstImageLine",_firstImageLine);
grp += PvlKeyword("FirstBufferSample",_firstBufferSample);
grp += PvlKeyword("FirstDarkSample",_firstDarkSample);
grp += PvlKeyword("MaskInducedNulls", _totalMaskNulled);
grp += PvlKeyword("DarkInducedNulls", _totalDarkNulled);
grp += PvlKeyword("LastGoodLine",_lastGoodLine+1);
}
示例2: PvlImageStats
/**
* @brief Writes data specific to image statistics out in Pvl format
*
* This method creates a PvlGroup containing the image statistics
* acculated during line-by-line processing of raw image data.
*/
void HiImageClean::PvlImageStats(PvlGroup &grp) const {
grp.SetName("ImageStatistics");
grp += PvlKeyword("File",_filename.Name());
grp += PvlKeyword("Lines",_lines);
grp += PvlKeyword("Samples",_samples);
BigInt nBad = _maskStats.TotalPixels() - _maskStats.ValidPixels();
grp += PvlKeyword("MaskAverage", _maskStats.Average());
grp += PvlKeyword("MaskStdDev", _maskStats.StandardDeviation());
grp += PvlKeyword("BadMaskPixels", nBad);
grp += PvlKeyword("MaskInducedNulls", _totalMaskNulled);
nBad = _darkStats.TotalPixels() - _darkStats.ValidPixels();
grp += PvlKeyword("DarkAverage", _darkStats.Average());
grp += PvlKeyword("DarkStdDev", _darkStats.StandardDeviation());
grp += PvlKeyword("BadDarkPixels", nBad);
grp += PvlKeyword("DarkInducedNulls", _totalDarkNulled);
}
示例3: IsisMain
void IsisMain() {
// We will be processing by brick
ProcessByBrick p;
Isis::Cube *amatrixCube=NULL;
Isis::Cube *bmatrixCube=NULL;
// Setup the user input for the input/output files and the option
UserInterface &ui = Application::GetUserInterface();
// Setup the input HiRise cube
Isis::Cube *icube = p.SetInputCube("FROM");
if (icube->Bands() != 1) {
std::string msg = "Only single-band HiRise cubes can be calibrated";
throw Isis::iException::Message(Isis::iException::Io,msg,_FILEINFO_);
}
//Get pertinent label information to determine which band of matrix cube to use
HiLab hilab(icube);
int ccd = hilab.getCcd();
int channel = hilab.getChannel();
if (channel != 0 && channel != 1) {
std::string msg = "Only unstitched cubes can be calibrated";
throw Isis::iException::Message(Isis::iException::Io,msg,_FILEINFO_);
}
int band = 1 + ccd*2 + channel;
string option = ui.GetString("OPTION");
// Set attributes (input band number) for the matrix cube(s);
CubeAttributeInput att("+" + iString(band));
// Determine the file specification to the matrix file(s) if defaulted
// and open
if (ui.WasEntered ("MATRIX") ) {
if (option == "GAIN") {
string matrixFile = ui.GetFilename("MATRIX");
amatrixCube = p.SetInputCube(matrixFile, att);
}
else if (option == "OFFSET") {
string matrixFile = ui.GetFilename("MATRIX");
bmatrixCube = p.SetInputCube(matrixFile, att);
}
else { //(option == "BOTH")
std::string
msg = "The BOTH option cannot be used if a MATRIX is entered";
throw Isis::iException::Message(Isis::iException::Io,msg,_FILEINFO_);
}
}
else {
int tdi = hilab.getTdi();
int bin = hilab.getBin();
if (option == "OFFSET" || option == "BOTH") {
std::string bmatrixFile = "$mro/calibration";
bmatrixFile += "/B_matrix_tdi";
bmatrixFile += iString(tdi) + "_bin" + iString(bin);
bmatrixCube = p.SetInputCube(bmatrixFile, att);
}
if (option == "GAIN" || option == "BOTH") {
std::string amatrixFile = "$mro/calibration";
amatrixFile += "/A_matrix_tdi";
amatrixFile += iString(tdi) + "_bin" + iString(bin);
amatrixCube = p.SetInputCube(amatrixFile, att);
}
}
// Open the output file and set processing parameters
Cube *ocube = p.SetOutputCube ("TO");
p.SetWrap (true);
p.SetBrickSize ( icube->Samples(), 1, 1);
// Add the radiometry group if it is not there yet. Otherwise
// read the current value of the keyword CalibrationParameters.
// Then delete the keyword and rewrite it after appending the
// new value to it. Do it this way to avoid multiple Calibration
// Parameter keywords.
PvlGroup calgrp;
PvlKeyword calKey;
if (ocube->HasGroup("Radiometry")) {
calgrp = ocube->GetGroup ("Radiometry");
if (calgrp.HasKeyword("CalibrationParameters")) {
calKey = calgrp.FindKeyword("CalibrationParameters");
calgrp.DeleteKeyword( "CalibrationParameters" );
}
else {
calKey.SetName ("CalibrationParameters");
}
}
else {
calgrp.SetName("Radiometry");
calKey.SetName ("CalibrationParameters");
}
//.........这里部分代码省略.........