Isis 3 Programmer Reference
Process.cpp
Go to the documentation of this file.
1 
23 #include <sstream>
24 #include <fstream>
25 
26 #include <QSet>
27 
28 #include "SessionLog.h"
29 #include "Process.h"
30 #include "FileName.h"
31 #include "Message.h"
32 #include "IException.h"
33 #include "IString.h"
34 #include "Preference.h"
35 #include "Application.h"
36 #include "History.h"
37 #include "OriginalLabel.h"
38 #include "LineManager.h"
39 
40 using namespace std;
41 namespace Isis {
42 
44  Process::Process() {
45  m_ownedCubes = NULL;
46 
47  p_progress = new Isis::Progress();
48  p_progress->SetText("Working");
49  p_propagateLabels = true;
50  p_propagateTables = true;
51  p_propagatePolygons = true;
52  p_propagateHistory = true;
53  p_propagateOriginalLabel = true;
54 
55  m_ownedCubes = new QSet<Cube *>;
56  }
57 
59  Process::~Process() {
60  EndProcess();
61  delete p_progress;
62 
63  delete m_ownedCubes;
64  m_ownedCubes = NULL;
65  }
66 
82  Isis::Cube *Process::SetInputCube(const QString &fname,
83  const Isis::CubeAttributeInput &att,
84  int requirements) {
85  Isis::Cube *cube = new Isis::Cube;
86  if(att.bands().size() != 0) {
87  vector<QString> lame = att.bands();
88  cube->setVirtualBands(lame);
89  }
90 
91  try {
92  if(requirements & Isis::ReadWrite) {
93  cube->open(fname, "rw");
94  }
95  else {
96  cube->open(fname);
97  }
98  }
99  catch(IException &e) {
100  delete cube;
101  throw;
102  }
103 
104  // Test for same size or one in all dimensions
105  if(requirements & Isis::AllMatchOrOne) {
106  if(InputCubes.size() > 0) {
107  if(cube->lineCount() != 1) {
108  if(cube->lineCount() != InputCubes[0]->lineCount()) {
109  QString message = "The number of lines in the secondary input cubes must match";
110  message += " the primary input cube or be exactly one";
111  throw IException(IException::User, message, _FILEINFO_);
112  }
113  }
114 
115  if(cube->sampleCount() != 1) {
116  if(cube->sampleCount() != InputCubes[0]->sampleCount()) {
117  QString message = "The number of samples in the secondary input cubes must match";
118  message += " the primary input cube or be exactly one";
119  throw IException(IException::User, message, _FILEINFO_);
120  }
121  }
122  if(cube->bandCount() != 1) {
123  if(cube->bandCount() != InputCubes[0]->bandCount()) {
124  QString message = "The number of bands in the secondary input cubes must match";
125  message += " the primary input cube or be exactly one";
126  throw IException(IException::User, message, _FILEINFO_);
127  }
128  }
129 
130  // Do not do a spatial match if this flag was set
131  requirements = requirements & !Isis::SpatialMatch;
132  }
133  }
134 
135  // Test for size match if requested
136  if(requirements & Isis::SizeMatch) {
137  if(InputCubes.size() > 0) {
138  if(cube->lineCount() != InputCubes[0]->lineCount()) {
139  QString message = "The number of lines in the input cubes must match";
140  throw IException(IException::User, message, _FILEINFO_);
141  }
142  if(cube->sampleCount() != InputCubes[0]->sampleCount()) {
143  QString message = "The number of samples in the input cubes must match";
144  throw IException(IException::User, message, _FILEINFO_);
145  }
146  if(cube->bandCount() != InputCubes[0]->bandCount()) {
147  QString message = "The number of bands in the input cubes must match";
148  throw IException(IException::User, message, _FILEINFO_);
149  }
150  }
151  }
152 
153  // Test for spatial match if requested
154  if(requirements & Isis::SpatialMatch) {
155  if(InputCubes.size() > 0) {
156  if(cube->lineCount() != InputCubes[0]->lineCount()) {
157  QString message = "The number of lines in the input cubes must match";
158  throw IException(IException::User, message, _FILEINFO_);
159  }
160  if(cube->sampleCount() != InputCubes[0]->sampleCount()) {
161  QString message = "The number of samples in the input cubes must match";
162  throw IException(IException::User, message, _FILEINFO_);
163  }
164  }
165  }
166 
167  // Test for one band
168  if(requirements & Isis::OneBand) {
169  if(cube->bandCount() != 1) {
170  QString message = "Input cube [" + fname + "] must have one band";
171  throw IException(IException::User, message, _FILEINFO_);
172  }
173  }
174 
175  // Test for same bands or one band
176  if(requirements & Isis::BandMatchOrOne) {
177  if(cube->bandCount() != 1) {
178  if(InputCubes.size() > 0) {
179  if(cube->bandCount() != InputCubes[0]->bandCount()) {
180  QString message = "The number of bands in the secondary input cubes must match";
181  message += " the primary input cube or be exactly one";
182  throw IException(IException::User, message, _FILEINFO_);
183  }
184  }
185  }
186  }
187 
188  // Everything is good so save the cube on the stack
189  AddInputCube(cube);
190  return cube;
191  }
192 
201  void Process::SetInputCube(Isis::Cube *inCube)
202  {
203  if(inCube != NULL && inCube->isOpen()) {
204  AddInputCube(inCube, false);
205  }
206  else {
207  QString message = "Input cube does not exist";
208  throw IException(IException::User, message, _FILEINFO_);
209  }
210  }
211 
243  Isis::Cube *Process::SetInputCube(const QString &parameter,
244  const int requirements) {
245  QString fname = Application::GetUserInterface().GetFileName(parameter);
246  Isis::CubeAttributeInput &att = Application::GetUserInterface().GetInputAttribute(parameter);
247  return SetInputCube(fname, att, requirements);
248  }
249 
266  Isis::Cube *Process::SetOutputCube(const QString &parameter) {
267  // Make sure we have an input cube to get a default size from
268  if(InputCubes.size() == 0) {
269  QString message = "No input images have been selected ... therefore";
270  message += "the output image size can not be determined";
271  throw IException(IException::Programmer, message, _FILEINFO_);
272  }
273 
274  int nl = InputCubes[0]->lineCount();
275  int ns = InputCubes[0]->sampleCount();
276  int nb = InputCubes[0]->bandCount();
277  return SetOutputCube(parameter, ns, nl, nb);
278  }
279 
302  Isis::Cube *Process::SetOutputCube(const QString &parameter, const int ns,
303  const int nl, const int nb) {
304  // Make sure we have good dimensions
305  if((ns <= 0) || (nl <= 0) || (nb <= 0)) {
306  ostringstream message;
307  message << "Invalid cube size specifications [ns=" << ns << ",nl=" << nl
308  << ",nb=" << nb << "]";
309  throw IException(IException::Programmer, message.str().c_str(), _FILEINFO_);
310  }
311 
312  QString fname = Application::GetUserInterface().GetFileName(parameter);
313  Isis::CubeAttributeOutput &atts = Application::GetUserInterface().GetOutputAttribute(parameter);
314  return SetOutputCube(fname, atts, ns, nl, nb);
315  }
316 
334  Isis::Cube *Process::SetOutputCube(const QString &fname,
335  const Isis::CubeAttributeOutput &att,
336  const int ns, const int nl,
337  const int nb) {
338  // Make sure we have good dimensions
339  if ((ns <= 0) || (nl <= 0) || (nb <= 0)) {
340  ostringstream message;
341  message << "Invalid cube size specifications [ns=" << ns << ",nl=" << nl
342  << ",nb=" << nb << "]";
343  throw IException(IException::Programmer, message.str().c_str(), _FILEINFO_);
344  }
345 
346  // Setup the cube
347  Isis::Cube *cube = new Isis::Cube;
348  try {
349  cube->setDimensions(ns, nl, nb);
350  cube->setByteOrder(att.byteOrder());
351  cube->setFormat(att.fileFormat());
352  cube->setLabelsAttached(att.labelAttachment() == AttachedLabel);
353 
354  if(att.propagatePixelType()) {
355  if(InputCubes.size() > 0) {
356  cube->setPixelType(InputCubes[0]->pixelType());
357  }
358  else {
359  QString msg = "You told me to propagate PixelType from input to output";
360  msg += " cube but there are no input cubes loaded";
361  throw IException(IException::Programmer, msg, _FILEINFO_);
362  }
363  }
364  else {
365  cube->setPixelType(att.pixelType());
366  }
367 
368  if(att.propagateMinimumMaximum()) {
369  if(cube->pixelType() == Isis::Real) {
370  cube->setBaseMultiplier(0.0, 1.0);
371  }
372  else if(InputCubes.size() == 0) {
373  QString msg = "You told me to propagate base/multiplier from input to output";
374  msg += " cube but there are no input cubes loaded";
375  throw IException(IException::Programmer, msg, _FILEINFO_);
376  }
377  else if(cube->pixelType() >= InputCubes[0]->pixelType()) {
378  double base = InputCubes[0]->base();
379  double mult = InputCubes[0]->multiplier();
380  cube->setBaseMultiplier(base, mult);
381  }
382  else if((cube->pixelType() != Isis::Real) &&
383  (cube->pixelType() != Isis::UnsignedByte) &&
384  (cube->pixelType() != Isis::UnsignedWord) &&
385  (cube->pixelType() != Isis::SignedWord) &&
386  (cube->pixelType() != Isis::UnsignedInteger) &&
387  (cube->pixelType() != Isis::SignedInteger)) {
388  QString msg = "Looks like your refactoring to add different pixel types";
389  msg += " you'll need to make changes here";
390  throw IException(IException::Programmer, msg, _FILEINFO_);
391  }
392  else {
393  QString msg = "You've chosen to reduce your output PixelType for [" +
394  fname + "] you must specify the output pixel range too";
395  throw IException(IException::User, msg, _FILEINFO_);
396  }
397  }
398  else {
399  // Not propagating so either the user entered or the programmer did
400  cube->setMinMax(att.minimum(), att.maximum());
401  }
402 
403  if(InputCubes.size() > 0) {
404  int needLabBytes = InputCubes[0]->labelSize(true) + (1024 * 6);
405  if(needLabBytes > cube->labelSize()) {
406  cube->setLabelSize(needLabBytes);
407  }
408  }
409 
410  // Allocate the cube
411  cube->create(fname);
412 
413  // Transfer labels from the first input cube
414  if((p_propagateLabels) && (InputCubes.size() > 0)) {
415  Isis::PvlObject &incube =
416  InputCubes[0]->label()->findObject("IsisCube");
417  Isis::PvlObject &outcube = cube->label()->findObject("IsisCube");
418  for(int i = 0; i < incube.groups(); i++) {
419  outcube.addGroup(incube.group(i));
420  }
421 
422  if (InputCubes[0]->label()->hasObject("NaifKeywords")) {
423  cube->label()->addObject(
424  InputCubes[0]->label()->findObject("NaifKeywords"));
425  }
426  }
427 
428  // Transfer tables from the first input cube
429  if((p_propagateTables) && (InputCubes.size() > 0)) {
430  Isis::Pvl &inlab = *InputCubes[0]->label();
431  for(int i = 0; i < inlab.objects(); i++) {
432  if(inlab.object(i).isNamed("Table")) {
433  Isis::Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name());
434  InputCubes[0]->read(t);
435  cube->write(t);
436  }
437  }
438  }
439 
440  // Transfer blobs from the first input cube
441  if((p_propagatePolygons) && (InputCubes.size() > 0)) {
442  Isis::Pvl &inlab = *InputCubes[0]->label();
443  for(int i = 0; i < inlab.objects(); i++) {
444  if(inlab.object(i).isNamed("Polygon")) {
445  Isis::Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name());
446  InputCubes[0]->read(t);
447  cube->write(t);
448  }
449  }
450  }
451 
452  // Transfer tables from the first input cube
453  if((p_propagateOriginalLabel) && (InputCubes.size() > 0)) {
454  Isis::Pvl &inlab = *InputCubes[0]->label();
455  for(int i = 0; i < inlab.objects(); i++) {
456  if(inlab.object(i).isNamed("OriginalLabel")) {
458  InputCubes[0]->read(ol);
459  cube->write(ol);
460  }
461  }
462  }
463 
464  // Transfer history from the first input cube
465  WriteHistory(*cube);
466  }
467  catch (IException &e) {
468  delete cube;
469  throw;
470  }
471 
472  // Everything is fine so save the cube on the stack
473  AddOutputCube(cube);
474  return cube;
475  }
476 
483  void Process::EndProcess() {
484  Process::Finalize();
485  }
486 
491  void Process::Finalize() {
492  ClearCubes();
493  }
494 
495  void Process::AddInputCube(Cube *cube, bool owned) {
496  InputCubes.push_back(cube);
497  if (owned) m_ownedCubes->insert(cube);
498  }
499 
500  void Process::AddOutputCube(Cube *cube, bool owned) {
501  OutputCubes.push_back(cube);
502  if (owned) m_ownedCubes->insert(cube);
503  }
504 
505 
509  void Process::ClearCubes() {
510  // Close the cubes
511  ClearInputCubes();
512  ClearOutputCubes();
513  m_ownedCubes->clear();
514  }
515 
519  void Process::ClearInputCubes() {
520  // Close the cubes
521  for (unsigned int i = 0; i < InputCubes.size(); i++) {
522  if (m_ownedCubes->contains(InputCubes[i])) {
523  InputCubes[i]->close();
524  delete InputCubes[i];
525  }
526  }
527  InputCubes.clear();
528  }
529 
533  void Process::ClearOutputCubes() {
534  // Close the cubes
535  for (unsigned int i = 0; i < OutputCubes.size(); i++) {
536  if (m_ownedCubes->contains(OutputCubes[i])) {
537  OutputCubes[i]->close();
538  delete OutputCubes[i];
539  }
540  }
541  OutputCubes.clear();
542  }
543 
555  void Process::PropagateLabels(const bool prop) {
556  p_propagateLabels = prop;
557  }
558 
566  void Process::PropagateLabels(const QString &cube) {
567  // Open the Pvl file
568  Isis::Pvl inLabels(cube);
569 
570  // Loop for each output cube
571  for(int i = 0; i < (int)OutputCubes.size(); i++) {
572  Isis::PvlObject &inCubeLabels = inLabels.findObject("IsisCube");
573 
574  Isis::Pvl &outLabels(*OutputCubes[i]->label());
575  Isis::PvlObject &outCubeLabels = outLabels.findObject("IsisCube");
576 
577  for(int g = 0; g < inCubeLabels.groups(); g++) {
578  outCubeLabels.addGroup(inCubeLabels.group(g));
579  }
580 
581  if (inLabels.hasObject("NaifKeywords")) {
582  outLabels.addObject(inLabels.findObject("NaifKeywords"));
583  }
584  }
585  }
586 
594  void Process::PropagateTables(const bool prop) {
595  p_propagateTables = prop;
596  }
597 
614  void Process::PropagateTables(const QString &fromName, const QList<QString> &tableNames) {
615  Cube *fromCube = new Isis::Cube;
616  fromCube->open(fromName);
617  const Pvl *fromLabels = fromCube->label();
618 
619  for (unsigned int i = 0; i < OutputCubes.size(); i++) {
620  for (int j = 0; j < fromLabels->objects(); j++) {
621  const PvlObject &object = fromLabels->object(j);
622 
623  if (object.isNamed("Table")) {
624  if (tableNames.isEmpty() || tableNames.contains(object["Name"])) {
625  Blob table((QString) object["Name"], object.name());
626  fromCube->read(table);
627  OutputCubes[i]->write(table);
628  }
629  }
630  }
631  }
632  }
633 
641  void Process::PropagatePolygons(const bool prop) {
642  p_propagatePolygons = prop;
643  }
644 
651  void Process::PropagateHistory(const bool prop) {
652  p_propagateHistory = prop;
653  }
654 
662  void Process::PropagateOriginalLabel(const bool prop) {
663  p_propagateOriginalLabel = prop;
664  }
665 
682  QString Process::MissionData(const QString &mission, const QString &file,
683  bool highestVersion) {
684  Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory");
685  QString dir = dataDir[mission];
686 
687  // See if the data directory is installed
688  Isis::FileName installed(dir);
689  if(!installed.fileExists()) {
690  QString message = "Data directory for mission [" + mission + "] " +
691  "is not installed at your site";
692  throw IException(IException::Io, message, _FILEINFO_);
693  }
694 
695  Isis::FileName expanded(dir + "/" + file);
696  if(highestVersion) expanded = expanded.highestVersion();
697  return expanded.expanded();
698  }
699 
703  void Process::WriteHistory(Cube &cube) {
704  if(p_propagateHistory) {
705  bool addedHist = false;
706  if(InputCubes.size() > 0) {
707  Isis::Pvl & inlab = *InputCubes[0]->label();
708  for(int i = 0; i < inlab.objects(); i++) {
709  if(inlab.object(i).isNamed("History") && Isis::iApp != NULL) {
710  Isis::History h((QString)inlab.object(i)["Name"]);
711  InputCubes[0]->read(h);
712  h.AddEntry();
713  cube.write(h);
714  addedHist = true;
715  }
716  }
717  }
718 
719  if(!addedHist && Isis::iApp != NULL) {
720  Isis::History h("IsisCube");
721  h.AddEntry();
722  cube.write(h);
723  }
724  }
725  }
726 
737  void Process::CalculateStatistics() {
738  for(unsigned cubeNum = 0; cubeNum < InputCubes.size(); cubeNum++) {
739  Cube *cube = InputCubes[cubeNum];
740 
741  // Construct a line buffer manager and a statistics object
742  Isis::LineManager line(*cube);
743  Isis::Statistics *cubeStats = new Isis::Statistics();
744 
745  int bandStart = 1;
746  int bandStop = cube->bandCount();
747  int maxSteps = cube->lineCount() * cube->bandCount();
748 
749  QString cubeNumStr = toString(cubeNum + 1);
750  QString totalCubes = toString((int)InputCubes.size());
751  QString msg = "Calculating statistics for cube " + cubeNumStr + " of " + totalCubes;
752 
753  Isis::Progress progress;
754  progress.SetText(msg);
755  progress.SetMaximumSteps(maxSteps);
756  progress.CheckStatus();
757 
758  // Loop and get the statistics for a good minimum/maximum
759  vector<Statistics *> allBandStats;
760  for(int useBand = bandStart; useBand <= bandStop; useBand++) {
761  Isis::Statistics *bandStats = new Isis::Statistics();
762 
763  for(int i = 1; i <= cube->lineCount(); i++) {
764  line.SetLine(i, useBand);
765  cube->read(line);
766  bandStats->AddData(line.DoubleBuffer(), line.size());
767  cubeStats->AddData(line.DoubleBuffer(), line.size());
768  progress.CheckStatus();
769  }
770 
771  allBandStats.push_back(bandStats);
772  }
773 
774  p_bandStats.push_back(allBandStats);
775  p_cubeStats.push_back(cubeStats);
776  }
777  }
778 
779 } // end namespace isis
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:460
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:60
Manipulate and parse attributes of input cube filenames.
Definition: Process.h:32
Read and store original labels.
Definition: OriginalLabel.h:51
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:154
PixelType pixelType() const
Return the pixel type as an Isis::PixelType.
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition: Progress.cpp:101
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:141
ByteOrder byteOrder() const
Return the byte order as an Isis::ByteOrder.
File name manipulation and expansion.
Definition: FileName.h:116
int objects() const
Returns the number of objects.
Definition: PvlObject.h:231
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:286
int sampleCount() const
Definition: Cube.cpp:1452
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:198
void setFormat(Format format)
Used prior to the Create method, this will specify the format of the cube, either band...
Definition: Cube.cpp:981
Namespace for the standard library.
bool propagatePixelType() const
Return true if the pixel type is to be propagated from an input cube.
bool isOpen() const
Test if a cube file has been opened/created.
Definition: Cube.cpp:100
void setLabelsAttached(bool attached)
Use prior to calling create, this sets whether or not to use separate label and data files...
Definition: Cube.cpp:993
bool propagateMinimumMaximum() const
Return true if the min/max are to be propagated from an input cube.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
void CheckStatus()
Checks and updates the status.
Definition: Progress.cpp:121
void setDimensions(int ns, int nl, int nb)
Used prior to the Create method to specify the size of the cube.
Definition: Cube.cpp:932
int size() const
Returns the total number of pixels in the shape buffer.
Definition: Buffer.h:113
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:335
void addObject(const PvlObject &object)
Add a PvlObject.
Definition: PvlObject.h:319
Buffer manager, for moving through a cube in lines.
Definition: LineManager.h:55
QString name() const
Returns the container name.
Definition: PvlContainer.h:77
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:107
Program progress reporter.
Definition: Progress.h:58
void setPixelType(PixelType pixelType)
Used prior to the Create method, this will specify the output pixel type.
Definition: Cube.cpp:1019
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition: Progress.cpp:77
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
void setVirtualBands(const QList< QString > &vbands)
This allows the programmer to specify a subset of bands to work with.
Definition: Cube.cpp:1036
Manipulate and parse attributes of output cube filenames.
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:866
double maximum() const
Return the output cube attribute maximum.
void read(Blob &blob) const
This method will read data from the specified Blob object.
Definition: Cube.cpp:724
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:212
void open(const QString &cfile, QString access="r")
This method will open an isis cube for reading or reading/writing.
Definition: Cube.cpp:544
The input label is embedded in the image file.
Definition: CubeAttribute.h:48
Cube::Format fileFormat() const
Return the file format an Cube::Format.
Container for cube-like labels.
Definition: Pvl.h:135
PixelType pixelType() const
Definition: Cube.cpp:1403
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:917
bool isNamed(const QString &match) const
Returns whether the given string is equal to the container name or not.
Definition: PvlContainer.h:86
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:423
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:883
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1346
int lineCount() const
Definition: Cube.cpp:1379
void write(Blob &blob)
This method will write a blob of data (e.g.
Definition: Cube.cpp:763
void AddEntry()
Adds History PvlObject.
Definition: History.cpp:61
FileName highestVersion() const
Searches the directory specified in the file name for the highest version of the file name...
Definition: FileName.cpp:329
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual int bandCount() const
Returns the number of virtual bands for the cube.
Definition: Cube.cpp:1125
std::vector< QString > bands() const
Return a vector of the input bands specified.
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:87
int labelSize(bool actual=false) const
Returns the number of bytes used by the label.
Definition: Cube.cpp:1358
double minimum() const
Return the output cube attribute minimum.
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Definition: Statistics.cpp:154
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
void create(const QString &cfile)
This method will create an isis cube for writing.
Definition: Cube.cpp:331
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:465
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:1006
IO Handler for Isis Cubes.
Definition: Cube.h:170