Isis 3 Programmer Reference
ProcessBySample.h
Go to the documentation of this file.
1 #ifndef ProcessBySample_h
2 #define ProcessBySample_h
3 
25 #include "Buffer.h"
26 #include "ProcessByBrick.h"
27 
28 namespace Isis {
54  public:
56  SetWrap(true);
57  };
58 
60  Isis::Cube *SetInputCube(const QString &parameter,
61  int requirements = 0);
62  Isis::Cube *SetInputCube(const QString &file,
64  int requirements = 0);
65 
66  void StartProcess(void funct(Isis::Buffer &inout));
67  void StartProcess(void funct(Isis::Buffer &in, Isis::Buffer &out));
68  void StartProcess(void funct(std::vector<Isis::Buffer *> &in,
69  std::vector<Isis::Buffer *> &out));
70 
77  template <typename Functor>
78  void ProcessCubeInPlace(const Functor & funct, bool threaded = true) {
79  VerifyCubes(InPlace);
80  SetBricks(InPlace);
81  //SetBrickSizesForProcessCubeInPlace();
82  ProcessByBrick::ProcessCubeInPlace(funct, threaded);
83  }
84 
85 
92  template <typename Functor>
93  void ProcessCube(const Functor & funct, bool threaded = true) {
94  VerifyCubes(InputOutput);
95  SetBricks(InputOutput);
96  ProcessByBrick::ProcessCube(funct, threaded);
97  }
98 
99 
106  template <typename Functor>
107  void ProcessCubes(const Functor & funct, bool threaded = true) {
108  VerifyCubes(InputOutputList);
109  SetBricks(InputOutputList);
110  ProcessByBrick::ProcessCubes(funct, threaded);
111  }
112 
113  private:
114  void SetBricks(IOCubes cn);
115  };
116 };
117 
118 #endif
Buffer for reading and writing cube data.
Definition: Buffer.h:69
Manipulate and parse attributes of input cube filenames.
void ProcessCubes(const Functor &funct, bool threaded=true)
void StartProcess(void funct(Isis::Buffer &inout))
This method invokes the process by sample operation over a single input or output cube...
void VerifyCubes(IOCubes cn)
Verifies the dimensions of the input/output cubes.
void ProcessCubes(const Functor &functor, bool threaded=true)
Operate over an arbitrary number of input cubes given an arbitrary number of output cubes...
Cube * SetInputCube(const QString &parameter, int requirements=0)
Opens an input cube specified by the user and verifies requirements are met.
Process cubes by brick.
Isis::Cube * SetInputCube(const QString &parameter, int requirements=0)
Opens an input cube specified by the user and verifies requirements are met.
void ProcessCubeInPlace(const Functor &functor, bool threaded=true)
Operate over a single cube (either input or output).
void ProcessCube(const Functor &funct, bool threaded=true)
void ProcessCubeInPlace(const Functor &funct, bool threaded=true)
void ProcessCube(const Functor &functor, bool threaded=true)
Operate over a single input cube creating a separate output cube.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Process cubes by sample.
ProcessByBrick()
Constructs a ProcessByBrick object.
void SetWrap(bool wrap)
This wrapping option only applys when there are two or more input cubes.
IO Handler for Isis Cubes.
Definition: Cube.h:170