File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
Process.h
1 #ifndef Process_h
2 #define Process_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "Preference.h"
10 
11 #include "Cube.h"
12 #include "Progress.h"
13 #include "CubeAttribute.h"
14 #include "Statistics.h"
15 
16 template <typename T> class QSet;
17 template <typename T> class QList;
18 
19 namespace Isis {
20  const int SizeMatch = 1;
21  const int SpatialMatch = 2;
22  const int OneBand = 16;
23  const int BandMatchOrOne = 32;
24  const int ReadWrite = 64;
25  const int AllMatchOrOne = 128;
26 };
27 
28 namespace Isis {
29  class UserInterface;
30 
143  class Process {
144  protected:
146 
166 
172  std::vector< std::vector< Isis::Statistics * > > p_bandStats;
173 
179  std::vector< Isis::Statistics * > p_cubeStats;
180 
185  std::vector<Isis::Cube *> InputCubes;
186 
191  std::vector<Isis::Cube *> OutputCubes;
192 
200 
201  public:
202  Process();
203  virtual ~Process();
204 
213  virtual void StartProcess(void funct()) {
214  funct();
215  };
216  virtual void EndProcess();
217  virtual void Finalize();
218 
219  virtual Isis::Cube *SetInputCube(const QString &parameter,
220  const int requirements = 0);
221  virtual Isis::Cube *SetInputCube(const QString &fname,
222  const Isis::CubeAttributeInput &att,
223  int requirements = 0);
224  virtual void SetInputCube(Isis::Cube *inCube, int requirements = 0);
225 
226  virtual Isis::Cube *SetOutputCube(const QString &parameter);
227  virtual Isis::Cube *SetOutputCubeStretch(const QString &parameter, UserInterface *ui=nullptr);
228  virtual Isis::Cube *SetOutputCube(const QString &parameter, const int nsamps,
229  const int nlines, const int nbands = 1);
230  virtual Isis::Cube *SetOutputCubeStretch(const QString &parameter, const int nsamps,
231  const int nlines, const int nbands = 1, UserInterface *ui=nullptr);
232  virtual Isis::Cube *SetOutputCube(const QString &fname,
233  const Isis::CubeAttributeOutput &att,
234  const int nsamps, const int nlines,
235  const int nbands = 1);
236 
237  void AddInputCube(Cube *cube, bool owned = true);
238  void AddOutputCube(Cube *cube, bool owned = true);
239 
240  void CheckRequirements(const Cube *cube, const int requirements);
241 
242  void ClearCubes();
243  void ClearInputCubes();
244  void ClearOutputCubes();
245 
246  void PropagateLabels(const bool prop);
247  void PropagateLabels(const QString &cube);
248  void PropagateTables(const bool prop);
249  void PropagateTables(const QString &fromName, const QList<QString>& tableNames = QList<QString>());
250  void PropagatePolygons(const bool prop);
251  void PropagateHistory(const bool prop);
252  void PropagateOriginalLabel(const bool prop);
253 
260  return p_progress;
261  };
262 
263  QString MissionData(const QString &mission, const QString &file,
264  bool highestVersion = false);
265 
266  void WriteHistory(Cube &cube);
267 
268  void CalculateStatistics();
269 
279  inline std::vector<Isis::Statistics *> BandStatistics(
280  const unsigned index) {
281  return p_bandStats[index];
282  }
283 
294  const unsigned index) {
295  return p_cubeStats[index];
296  }
297  };
298 }
299 
300 #endif
Isis::Process::CalculateStatistics
void CalculateStatistics()
Calculates and stores off statistics on every band of every cube added to this process via the SetInp...
Definition: Process.cpp:824
Isis::Process::p_cubeStats
std::vector< Isis::Statistics * > p_cubeStats
Holds the calculated statistics for every band together of every input cubei after the CalculateStati...
Definition: Process.h:179
Isis::Process::PropagateTables
void PropagateTables(const bool prop)
This method allows the programmer to propagate input tables to the output cube (default is true)
Definition: Process.cpp:678
Isis::Process::InputCubes
std::vector< Isis::Cube * > InputCubes
A vector of pointers to opened Cube objects.
Definition: Process.h:185
Isis::Statistics
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::Process::Process
Process()
Constructs a Process Object.
Definition: Process.cpp:28
Isis::Process::WriteHistory
void WriteHistory(Cube &cube)
Writes out the History blob to the cube.
Definition: Process.cpp:789
QSet
This is free and unencumbered software released into the public domain.
Definition: Process.h:16
Isis::Process::p_propagateTables
bool p_propagateTables
Flag indicating if tables are be propagated to output cubes.
Definition: Process.h:153
Isis::Process::SetOutputCubeStretch
virtual Isis::Cube * SetOutputCubeStretch(const QString &parameter, UserInterface *ui=nullptr)
Allocates a user-specified output cube whose size matches the first input cube.
Definition: Process.cpp:193
Isis::Process::PropagatePolygons
void PropagatePolygons(const bool prop)
This method allows the programmer to propagate input blobs to the output cube (default is true)
Definition: Process.cpp:727
Isis::Process::OutputCubes
std::vector< Isis::Cube * > OutputCubes
A vector of pointers to allocated Cube objects.
Definition: Process.h:191
Isis::Process
Base class for all cube processing derivatives.
Definition: Process.h:143
Isis::Process::MissionData
QString MissionData(const QString &mission, const QString &file, bool highestVersion=false)
This method reads the mission specific data directory from the user preference file,...
Definition: Process.cpp:768
Isis::CubeAttributeOutput
Manipulate and parse attributes of output cube filenames.
Definition: CubeAttribute.h:473
Isis::Process::p_propagatePolygons
bool p_propagatePolygons
Flag indicating if blobs are be propagated to output cubes.
Definition: Process.h:157
Isis::Process::CheckRequirements
void CheckRequirements(const Cube *cube, const int requirements)
Checks to make sure the input cube meets the inputted requirements.
Definition: Process.cpp:503
Isis::Process::StartProcess
virtual void StartProcess(void funct())
In the base class, this method will invoked a user-specified function exactly one time.
Definition: Process.h:213
Isis::Process::EndProcess
virtual void EndProcess()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
Definition: Process.cpp:455
Isis::Process::PropagateOriginalLabel
void PropagateOriginalLabel(const bool prop)
This method allows the programmer to propagate original labels to the output cube (default is true)
Definition: Process.cpp:748
Isis::Process::p_bandStats
std::vector< std::vector< Isis::Statistics * > > p_bandStats
Holds the calculated statistics for each band separately of every input cubei after the CalculateStat...
Definition: Process.h:172
Isis::Process::~Process
virtual ~Process()
Destroys the Process Object. It will close all opened cubes.
Definition: Process.cpp:43
Isis::Process::ClearInputCubes
void ClearInputCubes()
Close owned input cubes from the list and clear the list.
Definition: Process.cpp:603
Isis::Process::PropagateHistory
void PropagateHistory(const bool prop)
This method allows the programmer to propagate history to the output cube (default is true)
Definition: Process.cpp:737
Isis::Process::ClearOutputCubes
void ClearOutputCubes()
Close owned output cubes from the list and clear the list.
Definition: Process.cpp:617
Isis::Process::SetInputCube
virtual Isis::Cube * SetInputCube(const QString &parameter, const int requirements=0)
Opens an input cube specified by the user and verifies requirements are met.
Definition: Process.cpp:136
Isis::Process::PropagateLabels
void PropagateLabels(const bool prop)
This method allows the programmer to turn on/off the propagation of labels from the 1st input cube to...
Definition: Process.cpp:639
Isis::Process::Progress
Isis::Progress * Progress()
This method returns a pointer to a Progress object.
Definition: Process.h:259
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Progress
Program progress reporter.
Definition: Progress.h:42
Isis::Process::p_propagateHistory
bool p_propagateHistory
Flag indicating if history is to be propagated to output cubes.
Definition: Process.h:161
Isis::Process::SetOutputCube
virtual Isis::Cube * SetOutputCube(const QString &parameter)
Allocates a user-specified output cube whose size matches the first input cube.
Definition: Process.cpp:160
Isis::UserInterface
Command Line and Xml loader, validation, and access.
Definition: UserInterface.h:140
Isis::CubeAttributeInput
Manipulate and parse attributes of input cube filenames.
Definition: CubeAttribute.h:381
Isis::Process::p_progress
Isis::Progress * p_progress
Pointer to a Progress object.
Definition: Process.h:145
Isis::Process::m_ownedCubes
QSet< Isis::Cube * > * m_ownedCubes
A list of cubes owned by this instant.
Definition: Process.h:199
Isis::Process::CubeStatistics
Isis::Statistics * CubeStatistics(const unsigned index)
Get the Statistics object for all bands of a specified input cube.
Definition: Process.h:293
Isis::Process::ClearCubes
void ClearCubes()
Close owned cubes from the list and clear the list.
Definition: Process.cpp:593
Isis::Process::Finalize
virtual void Finalize()
Cleans up by closing cubes and freeing memory for owned cubes.
Definition: Process.cpp:463
Isis::Process::BandStatistics
std::vector< Isis::Statistics * > BandStatistics(const unsigned index)
Get the vector of Statistics objects for each band separately of a specified input cube.
Definition: Process.h:279
Isis::Process::p_propagateLabels
bool p_propagateLabels
Flag indicating if labels are be propagated to output cubes.
Definition: Process.h:149
Isis::Process::p_propagateOriginalLabel
bool p_propagateOriginalLabel
Flag indicating if original lable is to be propagated to output cubes.
Definition: Process.h:165
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

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