File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
Process.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 #include <sstream>
8 #include <fstream>
9 
10 #include <QSet>
11 
12 #include "SessionLog.h"
13 #include "Process.h"
14 #include "FileName.h"
15 #include "Message.h"
16 #include "IException.h"
17 #include "IString.h"
18 #include "Preference.h"
19 #include "Application.h"
20 #include "History.h"
21 #include "OriginalLabel.h"
22 #include "LineManager.h"
23 
24 using namespace std;
25 namespace Isis {
26 
28  Process::Process() {
29  m_ownedCubes = NULL;
30 
31  p_progress = new Isis::Progress();
32  p_progress->SetText("Working");
33  p_propagateLabels = true;
34  p_propagateTables = true;
35  p_propagatePolygons = true;
36  p_propagateHistory = true;
37  p_propagateOriginalLabel = true;
38 
39  m_ownedCubes = new QSet<Cube *>;
40  }
41 
43  Process::~Process() {
44  EndProcess();
45  delete p_progress;
46 
47  delete m_ownedCubes;
48  m_ownedCubes = NULL;
49  }
50 
66  Isis::Cube *Process::SetInputCube(const QString &fname,
67  const Isis::CubeAttributeInput &att,
68  int requirements) {
69  Isis::Cube *cube = new Isis::Cube;
70  if(att.bands().size() != 0) {
71  vector<QString> lame = att.bands();
72  cube->setVirtualBands(lame);
73  }
74 
75  try {
76  if(requirements & Isis::ReadWrite) {
77  cube->open(fname, "rw");
78  }
79  else {
80  cube->open(fname);
81  }
82  }
83  catch(IException &e) {
84  delete cube;
85  throw;
86  }
87 
88  CheckRequirements(cube, requirements);
89 
90  // Everything is good so save the cube on the stack
91  AddInputCube(cube);
92  return cube;
93  }
94 
95 
107  void Process::SetInputCube(Isis::Cube *inCube, const int requirements)
108  {
109  if(inCube != NULL && inCube->isOpen()) {
110  CheckRequirements(inCube, requirements);
111  AddInputCube(inCube, false);
112  }
113  else {
114  QString message = "Input cube does not exist";
115  throw IException(IException::User, message, _FILEINFO_);
116  }
117  }
118 
119 
136  Isis::Cube *Process::SetInputCube(const QString &parameter,
137  const int requirements) {
138  QString fname = Application::GetUserInterface().GetFileName(parameter);
139  Isis::CubeAttributeInput &att = Application::GetUserInterface().GetInputAttribute(parameter);
140  return SetInputCube(fname, att, requirements);
141  }
142 
143 
160  Isis::Cube *Process::SetOutputCube(const QString &parameter) {
161  // Make sure we have an input cube to get a default size from
162  if(InputCubes.size() == 0) {
163  QString message = "No input images have been selected ... therefore";
164  message += "the output image size can not be determined";
165  throw IException(IException::Programmer, message, _FILEINFO_);
166  }
167 
168  int nl = InputCubes[0]->lineCount();
169  int ns = InputCubes[0]->sampleCount();
170  int nb = InputCubes[0]->bandCount();
171  return SetOutputCube(parameter, ns, nl, nb);
172  }
173 
174 
193  Isis::Cube *Process::SetOutputCubeStretch(const QString &parameter, UserInterface *ui) {
194  // Make sure we have an input cube to get a default size from
195  if(InputCubes.size() == 0) {
196  QString message = "No input images have been selected ... therefore";
197  message += "the output image size can not be determined";
198  throw IException(IException::Programmer, message, _FILEINFO_);
199  }
200 
201  int nl = InputCubes[0]->lineCount();
202  int ns = InputCubes[0]->sampleCount();
203  int nb = InputCubes[0]->bandCount();
204  return SetOutputCubeStretch(parameter, ns, nl, nb, ui);
205  }
206 
229  Isis::Cube *Process::SetOutputCube(const QString &parameter, const int ns,
230  const int nl, const int nb) {
231  // Make sure we have good dimensions
232  if((ns <= 0) || (nl <= 0) || (nb <= 0)) {
233  ostringstream message;
234  message << "Invalid cube size specifications [ns=" << ns << ",nl=" << nl
235  << ",nb=" << nb << "]";
236  throw IException(IException::Programmer, message.str().c_str(), _FILEINFO_);
237  }
238  QString fname;
240  fname = Application::GetUserInterface().GetFileName(parameter);
241  atts = Application::GetUserInterface().GetOutputAttribute(parameter);
242  return SetOutputCube(fname, atts, ns, nl, nb);
243 }
244 
270 Isis::Cube *Process::SetOutputCubeStretch(const QString &parameter, const int ns,
271  const int nl, const int nb, UserInterface *ui) {
272  // Make sure we have good dimensions
273  if((ns <= 0) || (nl <= 0) || (nb <= 0)) {
274  ostringstream message;
275  message << "Invalid cube size specifications [ns=" << ns << ",nl=" << nl
276  << ",nb=" << nb << "]";
277  throw IException(IException::Programmer, message.str().c_str(), _FILEINFO_);
278  }
279  QString fname;
281  if(ui==nullptr){
282  fname = Application::GetUserInterface().GetFileName(parameter);
283  atts = Application::GetUserInterface().GetOutputAttribute(parameter);
284  }
285  else{
286  fname = ui->GetFileName(parameter);
287  atts = ui->GetOutputAttribute(parameter);
288  }
289  return SetOutputCube(fname, atts, ns, nl, nb);
290 }
291 
309  Isis::Cube *Process::SetOutputCube(const QString &fname,
310  const Isis::CubeAttributeOutput &att,
311  const int ns, const int nl,
312  const int nb) {
313  // Make sure we have good dimensions
314  if ((ns <= 0) || (nl <= 0) || (nb <= 0)) {
315  ostringstream message;
316  message << "Invalid cube size specifications [ns=" << ns << ",nl=" << nl
317  << ",nb=" << nb << "]";
318  throw IException(IException::Programmer, message.str().c_str(), _FILEINFO_);
319  }
320 
321  // Setup the cube
322  Isis::Cube *cube = new Isis::Cube;
323  try {
324  cube->setDimensions(ns, nl, nb);
325  cube->setByteOrder(att.byteOrder());
326  cube->setFormat(att.fileFormat());
327  cube->setLabelsAttached(att.labelAttachment() == AttachedLabel);
328  if(att.propagatePixelType()) {
329  if(InputCubes.size() > 0) {
330  cube->setPixelType(InputCubes[0]->pixelType());
331  }
332  else {
333  QString msg = "You told me to propagate PixelType from input to output";
334  msg += " cube but there are no input cubes loaded";
335  throw IException(IException::Programmer, msg, _FILEINFO_);
336  }
337  }
338  else {
339  cube->setPixelType(att.pixelType());
340  }
341 
342  if(att.propagateMinimumMaximum()) {
343  if(cube->pixelType() == Isis::Real) {
344  cube->setBaseMultiplier(0.0, 1.0);
345  }
346  else if(InputCubes.size() == 0) {
347  QString msg = "You told me to propagate base/multiplier from input to output";
348  msg += " cube but there are no input cubes loaded";
349  throw IException(IException::Programmer, msg, _FILEINFO_);
350  }
351  else if(cube->pixelType() >= InputCubes[0]->pixelType()) {
352  double base = InputCubes[0]->base();
353  double mult = InputCubes[0]->multiplier();
354  cube->setBaseMultiplier(base, mult);
355  }
356  else if((cube->pixelType() != Isis::Real) &&
357  (cube->pixelType() != Isis::UnsignedByte) &&
358  (cube->pixelType() != Isis::UnsignedWord) &&
359  (cube->pixelType() != Isis::SignedWord) &&
360  (cube->pixelType() != Isis::UnsignedInteger) &&
361  (cube->pixelType() != Isis::SignedInteger)) {
362  QString msg = "Looks like your refactoring to add different pixel types";
363  msg += " you'll need to make changes here";
364  throw IException(IException::Programmer, msg, _FILEINFO_);
365  }
366  else {
367  QString msg = "You've chosen to reduce your output PixelType for [" +
368  fname + "] you must specify the output pixel range too";
369  throw IException(IException::User, msg, _FILEINFO_);
370  }
371  }
372  else {
373  // Not propagating so either the user entered or the programmer did
374  cube->setMinMax(att.minimum(), att.maximum());
375  }
376 
377  if(InputCubes.size() > 0) {
378  int needLabBytes = InputCubes[0]->labelSize(true) + (1024 * 6);
379  if(needLabBytes > cube->labelSize()) {
380  cube->setLabelSize(needLabBytes);
381  }
382  }
383 
384  // Allocate the cube
385  cube->create(fname);
386 
387  // Transfer labels from the first input cube
388  if((p_propagateLabels) && (InputCubes.size() > 0)) {
389  Isis::PvlObject &incube =
390  InputCubes[0]->label()->findObject("IsisCube");
391  Isis::PvlObject &outcube = cube->label()->findObject("IsisCube");
392  for(int i = 0; i < incube.groups(); i++) {
393  outcube.addGroup(incube.group(i));
394  }
395 
396  if (InputCubes[0]->label()->hasObject("NaifKeywords")) {
397  cube->label()->addObject(
398  InputCubes[0]->label()->findObject("NaifKeywords"));
399  }
400  }
401 
402  // Transfer tables from the first input cube
403  if((p_propagateTables) && (InputCubes.size() > 0)) {
404  Isis::Pvl &inlab = *InputCubes[0]->label();
405  for(int i = 0; i < inlab.objects(); i++) {
406  if(inlab.object(i).isNamed("Table")) {
407  Isis::Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name());
408  InputCubes[0]->read(t);
409  cube->write(t);
410  }
411  }
412  }
413 
414  // Transfer blobs from the first input cube
415  if((p_propagatePolygons) && (InputCubes.size() > 0)) {
416  Isis::Pvl &inlab = *InputCubes[0]->label();
417  for(int i = 0; i < inlab.objects(); i++) {
418  if(inlab.object(i).isNamed("Polygon")) {
419  Isis::Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name());
420  InputCubes[0]->read(t);
421  cube->write(t);
422  }
423  }
424  }
425 
426  // Transfer tables from the first input cube
427  if((p_propagateOriginalLabel) && (InputCubes.size() > 0)) {
428  Isis::Pvl &inlab = *InputCubes[0]->label();
429  for(int i = 0; i < inlab.objects(); i++) {
430  if(inlab.object(i).isNamed("OriginalLabel")) {
431  Isis::OriginalLabel ol = InputCubes[0]->readOriginalLabel(inlab.object(i)["Name"]);
432  cube->write(ol);
433  }
434  }
435  }
436 
437  // Transfer history from the first input cube
438  WriteHistory(*cube);
439  }
440  catch (IException &e) {
441  delete cube;
442  throw;
443  }
444  // Everything is fine so save the cube on the stack
445  AddOutputCube(cube);
446  return cube;
447  }
448 
455  void Process::EndProcess() {
456  Process::Finalize();
457  }
458 
463  void Process::Finalize() {
464  ClearCubes();
465  }
466 
467  void Process::AddInputCube(Cube *cube, bool owned) {
468  InputCubes.push_back(cube);
469  if (owned) m_ownedCubes->insert(cube);
470  }
471 
472  void Process::AddOutputCube(Cube *cube, bool owned) {
473  OutputCubes.push_back(cube);
474  if (owned) m_ownedCubes->insert(cube);
475  }
476 
477 
503  void Process::CheckRequirements(const Cube *cube, int requirements) {
504  // Test for same size or one in all dimensions
505  if(requirements & Isis::AllMatchOrOne) {
506  if(InputCubes.size() > 0) {
507  if(cube->lineCount() != 1) {
508  if(cube->lineCount() != InputCubes[0]->lineCount()) {
509  QString message = "The number of lines in the secondary input cubes must match";
510  message += " the primary input cube or be exactly one";
511  throw IException(IException::User, message, _FILEINFO_);
512  }
513  }
514 
515  if(cube->sampleCount() != 1) {
516  if(cube->sampleCount() != InputCubes[0]->sampleCount()) {
517  QString message = "The number of samples in the secondary input cubes must match";
518  message += " the primary input cube or be exactly one";
519  throw IException(IException::User, message, _FILEINFO_);
520  }
521  }
522  if(cube->bandCount() != 1) {
523  if(cube->bandCount() != InputCubes[0]->bandCount()) {
524  QString message = "The number of bands in the secondary input cubes must match";
525  message += " the primary input cube or be exactly one";
526  throw IException(IException::User, message, _FILEINFO_);
527  }
528  }
529 
530  // Do not do a spatial match if this flag was set
531  requirements = requirements & !Isis::SpatialMatch;
532  }
533  }
534 
535  // Test for size match if requested
536  if(requirements & Isis::SizeMatch) {
537  if(InputCubes.size() > 0) {
538  if(cube->lineCount() != InputCubes[0]->lineCount()) {
539  QString message = "The number of lines in the input cubes must match";
540  throw IException(IException::User, message, _FILEINFO_);
541  }
542  if(cube->sampleCount() != InputCubes[0]->sampleCount()) {
543  QString message = "The number of samples in the input cubes must match";
544  throw IException(IException::User, message, _FILEINFO_);
545  }
546  if(cube->bandCount() != InputCubes[0]->bandCount()) {
547  QString message = "The number of bands in the input cubes must match";
548  throw IException(IException::User, message, _FILEINFO_);
549  }
550  }
551  }
552 
553  // Test for spatial match if requested
554  if(requirements & Isis::SpatialMatch) {
555  if(InputCubes.size() > 0) {
556  if(cube->lineCount() != InputCubes[0]->lineCount()) {
557  QString message = "The number of lines in the input cubes must match";
558  throw IException(IException::User, message, _FILEINFO_);
559  }
560  if(cube->sampleCount() != InputCubes[0]->sampleCount()) {
561  QString message = "The number of samples in the input cubes must match";
562  throw IException(IException::User, message, _FILEINFO_);
563  }
564  }
565  }
566 
567  // Test for one band
568  if(requirements & Isis::OneBand) {
569  if(cube->bandCount() != 1) {
570  QString message = "Input cube [" + cube->fileName() + "] must have one band";
571  throw IException(IException::User, message, _FILEINFO_);
572  }
573  }
574 
575  // Test for same bands or one band
576  if(requirements & Isis::BandMatchOrOne) {
577  if(cube->bandCount() != 1) {
578  if(InputCubes.size() > 0) {
579  if(cube->bandCount() != InputCubes[0]->bandCount()) {
580  QString message = "The number of bands in the secondary input cubes must match";
581  message += " the primary input cube or be exactly one";
582  throw IException(IException::User, message, _FILEINFO_);
583  }
584  }
585  }
586  }
587  }
588 
589 
593  void Process::ClearCubes() {
594  // Close the cubes
595  ClearInputCubes();
596  ClearOutputCubes();
597  m_ownedCubes->clear();
598  }
599 
603  void Process::ClearInputCubes() {
604  // Close the cubes
605  for (unsigned int i = 0; i < InputCubes.size(); i++) {
606  if (m_ownedCubes->contains(InputCubes[i])) {
607  InputCubes[i]->close();
608  delete InputCubes[i];
609  }
610  }
611  InputCubes.clear();
612  }
613 
617  void Process::ClearOutputCubes() {
618  // Close the cubes
619  for (unsigned int i = 0; i < OutputCubes.size(); i++) {
620  if (m_ownedCubes->contains(OutputCubes[i])) {
621  OutputCubes[i]->close();
622  delete OutputCubes[i];
623  }
624  }
625  OutputCubes.clear();
626  }
627 
639  void Process::PropagateLabels(const bool prop) {
640  p_propagateLabels = prop;
641  }
642 
650  void Process::PropagateLabels(const QString &cube) {
651  // Open the Pvl file
652  Isis::Pvl inLabels(cube);
653 
654  // Loop for each output cube
655  for(int i = 0; i < (int)OutputCubes.size(); i++) {
656  Isis::PvlObject &inCubeLabels = inLabels.findObject("IsisCube");
657 
658  Isis::Pvl &outLabels(*OutputCubes[i]->label());
659  Isis::PvlObject &outCubeLabels = outLabels.findObject("IsisCube");
660 
661  for(int g = 0; g < inCubeLabels.groups(); g++) {
662  outCubeLabels.addGroup(inCubeLabels.group(g));
663  }
664 
665  if (inLabels.hasObject("NaifKeywords")) {
666  outLabels.addObject(inLabels.findObject("NaifKeywords"));
667  }
668  }
669  }
670 
678  void Process::PropagateTables(const bool prop) {
679  p_propagateTables = prop;
680  }
681 
698  void Process::PropagateTables(const QString &fromName, const QList<QString> &tableNames) {
699  Cube *fromCube = new Isis::Cube;
700  fromCube->open(fromName);
701  const Pvl *fromLabels = fromCube->label();
702 
703  for (unsigned int i = 0; i < OutputCubes.size(); i++) {
704  for (int j = 0; j < fromLabels->objects(); j++) {
705  const PvlObject &object = fromLabels->object(j);
706 
707  if (object.isNamed("Table")) {
708  if (tableNames.isEmpty() || tableNames.contains(object["Name"])) {
709  Blob table((QString) object["Name"], object.name());
710  fromCube->read(table);
711  OutputCubes[i]->write(table);
712  }
713  }
714  }
715  }
716  fromCube->close();
717  delete fromCube;
718  }
719 
727  void Process::PropagatePolygons(const bool prop) {
728  p_propagatePolygons = prop;
729  }
730 
737  void Process::PropagateHistory(const bool prop) {
738  p_propagateHistory = prop;
739  }
740 
748  void Process::PropagateOriginalLabel(const bool prop) {
749  p_propagateOriginalLabel = prop;
750  }
751 
768  QString Process::MissionData(const QString &mission, const QString &file,
769  bool highestVersion) {
770  Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory");
771  QString dir = dataDir[mission];
772 
773  // See if the data directory is installed
774  Isis::FileName installed(dir);
775  if(!installed.fileExists()) {
776  QString message = "Data directory for mission [" + mission + "] " +
777  "is not installed at your site";
778  throw IException(IException::Io, message, _FILEINFO_);
779  }
780 
781  Isis::FileName expanded(dir + "/" + file);
782  if(highestVersion) expanded = expanded.highestVersion();
783  return expanded.expanded();
784  }
785 
789  void Process::WriteHistory(Cube &cube) {
790  if(p_propagateHistory) {
791  bool addedHist = false;
792  if(InputCubes.size() > 0) {
793  Isis::Pvl & inlab = *InputCubes[0]->label();
794  for(int i = 0; i < inlab.objects(); i++) {
795  if(inlab.object(i).isNamed("History") && Isis::iApp != NULL) {
796  QString histBlobName = (QString)inlab.object(i)["Name"];
797  History h = InputCubes[0]->readHistory(histBlobName);
798  h.AddEntry();
799  cube.write(h, histBlobName);
800  addedHist = true;
801  }
802  }
803  }
804 
805  if(!addedHist && Isis::iApp != NULL) {
806  Isis::History h = cube.readHistory();
807  h.AddEntry();
808 
809  cube.write(h);
810  }
811  }
812  }
813 
824  void Process::CalculateStatistics() {
825  for(unsigned cubeNum = 0; cubeNum < InputCubes.size(); cubeNum++) {
826  Cube *cube = InputCubes[cubeNum];
827 
828  // Construct a line buffer manager and a statistics object
829  Isis::LineManager line(*cube);
830  Isis::Statistics *cubeStats = new Isis::Statistics();
831 
832  int bandStart = 1;
833  int bandStop = cube->bandCount();
834  int maxSteps = cube->lineCount() * cube->bandCount();
835 
836  QString cubeNumStr = toString(cubeNum + 1);
837  QString totalCubes = toString((int)InputCubes.size());
838  QString msg = "Calculating statistics for cube " + cubeNumStr + " of " + totalCubes;
839 
840  Isis::Progress progress;
841  progress.SetText(msg);
842  progress.SetMaximumSteps(maxSteps);
843  progress.CheckStatus();
844 
845  // Loop and get the statistics for a good minimum/maximum
846  vector<Statistics *> allBandStats;
847  for(int useBand = bandStart; useBand <= bandStop; useBand++) {
848  Isis::Statistics *bandStats = new Isis::Statistics();
849 
850  for(int i = 1; i <= cube->lineCount(); i++) {
851  line.SetLine(i, useBand);
852  cube->read(line);
853  bandStats->AddData(line.DoubleBuffer(), line.size());
854  cubeStats->AddData(line.DoubleBuffer(), line.size());
855  progress.CheckStatus();
856  }
857 
858  allBandStats.push_back(bandStats);
859  }
860 
861  p_bandStats.push_back(allBandStats);
862  p_cubeStats.push_back(cubeStats);
863  }
864  }
865 
866 } // end namespace isis
IsisAml::GetOutputAttribute
Isis::CubeAttributeOutput & GetOutputAttribute(const QString &paramName)
Gets the attributes for an output cube.
Definition: IsisAml.cpp:1919
Isis::Statistics
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::Cube::fileName
virtual QString fileName() const
Returns the opened cube's filename.
Definition: Cube.cpp:1563
Isis::PvlObject::group
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:452
Isis::Cube::readHistory
History readHistory(const QString &name="IsisCube") const
Read the History from the Cube.
Definition: Cube.cpp:847
Isis::Statistics::AddData
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition: Statistics.cpp:141
Isis::LineManager
Buffer manager, for moving through a cube in lines.
Definition: LineManager.h:39
Isis::Cube::setVirtualBands
void setVirtualBands(const QList< QString > &vbands)
This allows the programmer to specify a subset of bands to work with.
Definition: Cube.cpp:1321
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::Progress::CheckStatus
void CheckStatus()
Checks and updates the status.
Definition: Progress.cpp:105
QList< QString >
Isis::Cube::read
void read(Blob &blob, const std::vector< PvlKeyword > keywords=std::vector< PvlKeyword >()) const
This method will read data from the specified Blob object.
Definition: Cube.cpp:807
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
QSet
This is free and unencumbered software released into the public domain.
Definition: Process.h:16
Isis::Progress::SetMaximumSteps
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition: Progress.cpp:85
Isis::Buffer::DoubleBuffer
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:138
Isis::PvlObject::groups
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
Isis::FileName::fileExists
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
IsisAml::GetFileName
QString GetFileName(const QString &paramName, QString extension="") const
Allows the retrieval of a value for a parameter of type "filename".
Definition: IsisAml.cpp:607
Isis::Cube::setLabelSize
void setLabelSize(int labelBytes)
Used prior to the Create method, this will allocate a specific number of bytes in the label area for ...
Definition: Cube.cpp:1291
Isis::Cube::labelSize
int labelSize(bool actual=false) const
Returns the number of bytes used by the label.
Definition: Cube.cpp:1713
Isis::Cube::close
void close(bool remove=false)
Closes the cube and updates the labels.
Definition: Cube.cpp:260
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::PvlObject::objects
int objects() const
Returns the number of objects.
Definition: PvlObject.h:219
Isis::CubeAttributeOutput
Manipulate and parse attributes of output cube filenames.
Definition: CubeAttribute.h:473
Isis::PvlObject::addObject
void addObject(const PvlObject &object)
Add a PvlObject.
Definition: PvlObject.h:307
Isis::PvlObject::object
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:489
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::AttachedLabel
@ AttachedLabel
The input label is embedded in the image file.
Definition: CubeAttribute.h:32
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::Cube::lineCount
int lineCount() const
Definition: Cube.cpp:1734
Isis::Cube::setDimensions
void setDimensions(int ns, int nl, int nb)
Used prior to the Create method to specify the size of the cube.
Definition: Cube.cpp:1217
Isis::Cube::create
void create(const QString &cfile)
This method will create an isis cube for writing.
Definition: Cube.cpp:414
Isis::PvlContainer::isNamed
bool isNamed(const QString &match) const
Returns whether the given string is equal to the container name or not.
Definition: PvlContainer.h:72
Isis::Progress::SetText
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition: Progress.cpp:61
Isis::CubeAttributeOutput::pixelType
PixelType pixelType() const
Return the pixel type as an Isis::PixelType.
Definition: CubeAttribute.cpp:360
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::CubeAttributeOutput::propagateMinimumMaximum
bool propagateMinimumMaximum() const
Return true if the min/max are to be propagated from an input cube.
Definition: CubeAttribute.cpp:177
Isis::Cube::sampleCount
int sampleCount() const
Definition: Cube.cpp:1807
Isis::History::AddEntry
void AddEntry()
Adds History PvlObject.
Definition: History.cpp:52
Isis::Cube::isOpen
bool isOpen() const
Test if a cube file has been opened/created.
Definition: Cube.cpp:183
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::Cube::bandCount
virtual int bandCount() const
Returns the number of virtual bands for the cube.
Definition: Cube.cpp:1410
Isis::Progress
Program progress reporter.
Definition: Progress.h:42
Isis::PvlObject::hasObject
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
Definition: PvlObject.h:323
Isis::PvlObject::addGroup
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
Isis::Cube::setByteOrder
void setByteOrder(ByteOrder byteOrder)
Used prior to the Create method, this will specify the byte order of pixels, either least or most sig...
Definition: Cube.cpp:1202
Isis::LineManager::SetLine
bool SetLine(const int line, const int band=1)
Positions the buffer at the requested line and returns a status indicator if the set was succesful or...
Definition: LineManager.cpp:44
Isis::CubeAttributeInput::bands
std::vector< QString > bands() const
Return a vector of the input bands specified.
Definition: CubeAttribute.cpp:82
std
Namespace for the standard library.
Isis::OriginalLabel
Read and store original labels.
Definition: OriginalLabel.h:35
Isis::Cube::pixelType
PixelType pixelType() const
Definition: Cube.cpp:1758
Isis::CubeAttributeOutput::byteOrder
ByteOrder byteOrder() const
Return the byte order as an Isis::ByteOrder.
Definition: CubeAttribute.cpp:455
Isis::UserInterface
Command Line and Xml loader, validation, and access.
Definition: UserInterface.h:140
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::Cube::write
void write(Blob &blob, bool overwrite=true)
This method will write a blob of data (e.g.
Definition: Cube.cpp:971
Isis::CubeAttributeInput
Manipulate and parse attributes of input cube filenames.
Definition: CubeAttribute.h:381
Isis::CubeAttributeOutput::maximum
double maximum() const
Return the output cube attribute maximum.
Definition: CubeAttribute.cpp:309
Isis::Buffer::size
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:97
Isis::CubeAttributeOutput::minimum
double minimum() const
Return the output cube attribute minimum.
Definition: CubeAttribute.cpp:294
Isis::Cube::setFormat
void setFormat(Format format)
Used prior to the Create method, this will specify the format of the cube, either band,...
Definition: Cube.cpp:1266
Isis::Cube::setPixelType
void setPixelType(PixelType pixelType)
Used prior to the Create method, this will specify the output pixel type.
Definition: Cube.cpp:1304
Isis::FileName::highestVersion
FileName highestVersion() const
Searches the directory specified in the file name for the highest version of the file name.
Definition: FileName.cpp:313
Isis::History
Definition: History.h:38
Isis::Cube::setBaseMultiplier
void setBaseMultiplier(double base, double mult)
Used prior to the Create method, this will specify the base and multiplier for converting 8-bit/16-bi...
Definition: Cube.cpp:1151
Isis::Cube::open
void open(const QString &cfile, QString access="r")
This method will open an isis cube for reading or reading/writing.
Definition: Cube.cpp:627
Isis::Blob
Definition: Blob.h:51
Isis::CubeAttributeOutput::fileFormat
Cube::Format fileFormat() const
Return the file format an Cube::Format.
Definition: CubeAttribute.cpp:267
Isis::Cube::setMinMax
void setMinMax(double min, double max)
Used prior to the Create method, this will compute a good base and multiplier value given the minimum...
Definition: Cube.cpp:1168
Isis::CubeAttributeOutput::propagatePixelType
bool propagatePixelType() const
Return true if the pixel type is to be propagated from an input cube.
Definition: CubeAttribute.cpp:165
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Cube::setLabelsAttached
void setLabelsAttached(bool attached)
Use prior to calling create, this sets whether or not to use separate label and data files.
Definition: Cube.cpp:1278

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:17:03