本文整理汇总了C++中IString::Equal方法的典型用法代码示例。如果您正苦于以下问题:C++ IString::Equal方法的具体用法?C++ IString::Equal怎么用?C++ IString::Equal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IString
的用法示例。
在下文中一共展示了IString::Equal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsisMain
void IsisMain() {
QString projName;
Process pHist;
Cube *icube = pHist.SetInputCube("FROM");
// Check to see if the input cube looks like a HiRISE RDR
if (icube->bandCount() > 3) {
QString msg = "Input file [" +
Application::GetUserInterface().GetFileName("FROM") +
"] does not appear to be a HiRISE RDR product. Number of " +
"bands is greater than 3";
throw IException(IException::Programmer, msg, _FILEINFO_);
}
// Setup to get a histogram for each band
g_min = new double[icube->bandCount()];
g_max = new double[icube->bandCount()];
UserInterface &ui = Application::GetUserInterface();
// Determine if the data is to be converted to JPEG2000
IString enctype = ui.GetString("ENCODING_TYPE");
enctype.DownCase();
for (int band = 1; band <= icube->bandCount(); ++band) {
if (ui.GetString("TYPE").compare("AUTOMATIC") == 0) {
// Set up a histogram for this band. This call sets the input range
// by making an initial stats pass to find the data min and max
Histogram hist(*icube, band, pHist.Progress());
// Loop and accumulate histogram
pHist.Progress()->SetText("Gathering Histogram");
pHist.Progress()->SetMaximumSteps(icube->lineCount());
pHist.Progress()->CheckStatus();
LineManager line(*icube);
for (int i = 1; i <= icube->lineCount(); i++) {
line.SetLine(i, band);
icube->read(line);
hist.AddData(line.DoubleBuffer(), line.size());
pHist.Progress()->CheckStatus();
}
// get the requested cumulative percentages
g_min[band-1] = ui.GetDouble("MINPER") == 0.0 ? hist.Minimum() : hist.Percent(ui.GetDouble("MINPER"));
g_max[band-1] = ui.GetDouble("MAXPER") == 100.0 ? hist.Maximum() : hist.Percent(ui.GetDouble("MAXPER"));
}
else {
g_min[band-1] = ui.GetDouble("MIN");
g_max[band-1] = ui.GetDouble("MAX");
}
}
// Find the minimum min and maximum max for all bands
double minmin = g_min[0];
double maxmax = g_max[0];
for (int band = 1; band < icube->bandCount(); ++band) {
if (g_min[band] < minmin) minmin = g_min[band];
if (g_max[band] > maxmax) maxmax = g_max[band];
}
pHist.EndProcess();
// Set up for writing the data to a PDS formatted file
ProcessExportPds p;
Cube *icube2 = p.SetInputCube("FROM");
if (enctype.Equal("jp2")) {
g_jp2buf = new char* [icube2->bandCount()];
FileName lblFile(ui.GetFileName("TO"));
QString lblFileName = lblFile.path() + "/" + lblFile.baseName() + ".lbl";
p.SetDetached(lblFileName);
p.setFormat(ProcessExport::JP2);
}
// Set the output pixel type and the special pixel values
int nbits = ui.GetInteger("BITS");
if (nbits == 8) {
if (enctype.Equal("jp2")) {
for (int i = 0; i < icube2->bandCount(); i++) {
g_jp2buf[i] = new char[icube2->sampleCount()];
}
}
g_oType = Isis::UnsignedByte;
p.SetOutputType(g_oType);
p.SetOutputRange(VALID_MIN1, VALID_MAX1);
p.SetOutputNull(NULL1);
p.SetOutputLis(LOW_INSTR_SAT1);
p.SetOutputLrs(LOW_REPR_SAT1);
p.SetOutputHis(HIGH_INSTR_SAT1);
p.SetOutputHrs(HIGH_REPR_SAT1);
}
else if (nbits == 16) {
if (enctype.Equal("jp2")) {
for (int i = 0; i < icube2->bandCount(); i++) {
g_jp2buf[i] = new char[icube2->sampleCount()*2];
}
}
//.........这里部分代码省略.........