Isis Developer Reference
ProcessByLine.h
Go to the documentation of this file.
1#ifndef ProcessByLine_h
2#define ProcessByLine_h
8/* SPDX-License-Identifier: CC0-1.0 */
9#include "ProcessByBrick.h"
10#include "Buffer.h"
11namespace Isis {
12 class Cube;
13 class CubeAttributeInput;
14
98
99 public:
101 SetWrap(true);
102 };
103
104 using Isis::ProcessByBrick::SetInputCube; // make parents SetInputCube visable
105 Isis::Cube *SetInputCube(const QString &parameter,
106 const int requirements = 0);
107 Isis::Cube *SetInputCube(const QString &file,
109 const int requirements = 0);
110
111 void StartProcess(void funct(Isis::Buffer &inout));
112 virtual void StartProcess(std::function<void(Isis::Buffer &in)> funct );
113 void StartProcess(std::function<void(Buffer &in, Buffer &out)> funct);
114
115 void StartProcess(void funct(Isis::Buffer &in, Isis::Buffer &out));
116 void StartProcess(void
117 funct(std::vector<Isis::Buffer *> &in,
118 std::vector<Isis::Buffer *> &out));
119
120 void SetBricks(IOCubes cn);
121
132 template <typename Functor>
133 void ProcessCubeInPlace(const Functor & funct, bool threaded = true) {
136 ProcessByBrick::ProcessCubeInPlace(funct, threaded);
137 }
138
139
152 template <typename Functor>
153 void ProcessCube(const Functor & funct, bool threaded = true) {
156 ProcessByBrick::ProcessCube(funct, threaded);
157 }
158
159
173 template <typename Functor>
174 void ProcessCubes(const Functor & funct, bool threaded = true) {
177 ProcessByBrick::ProcessCubes(funct, threaded);
178 }
179 };
180};
181
182#endif
Buffer for reading and writing cube data.
Definition Buffer.h:53
Manipulate and parse attributes of input cube filenames.
Definition CubeAttribute.h:381
IO Handler for Isis Cubes.
Definition Cube.h:168
Process cubes by brick.
Definition ProcessByBrick.h:83
void ProcessCubeInPlace(const Functor &functor, bool threaded=true)
Operate over a single cube (either input or output).
Definition ProcessByBrick.h:167
void ProcessCubes(const Functor &functor, bool threaded=true)
Operate over an arbitrary number of input cubes given an arbitrary number of output cubes.
Definition ProcessByBrick.h:243
void VerifyCubes(IOCubes cn)
Verifies the dimensions of the input/output cubes.
Definition ProcessByBrick.cpp:120
Cube * SetInputCube(const QString &parameter, int requirements=0)
Opens an input cube specified by the user and verifies requirements are met.
Definition ProcessByBrick.cpp:58
void ProcessCube(const Functor &functor, bool threaded=true)
Operate over a single input cube creating a separate output cube.
Definition ProcessByBrick.h:204
void SetWrap(bool wrap)
This wrapping option only applys when there are two or more input cubes.
Definition ProcessByBrick.cpp:409
IOCubes
Definition ProcessByBrick.h:91
@ InputOutput
Definition ProcessByBrick.h:92
@ InputOutputList
Definition ProcessByBrick.h:93
@ InPlace
Definition ProcessByBrick.h:91
Process cubes by line.
Definition ProcessByLine.h:97
void ProcessCubes(const Functor &funct, bool threaded=true)
Same functionality as StartProcess(std::vector<Isis::Buffer *> &in, std::vector<Isis::Buffer *> &out)...
Definition ProcessByLine.h:174
Isis::Cube * SetInputCube(const QString &parameter, const int requirements=0)
Opens an input cube specified by the user and verifies requirements are met.
Definition ProcessByLine.cpp:41
ProcessByLine()
Definition ProcessByLine.h:100
void SetBricks(IOCubes cn)
Definition ProcessByLine.cpp:73
void StartProcess(void funct(Isis::Buffer &inout))
This method invokes the process by line operation over a single input or output cube.
Definition ProcessByLine.cpp:130
void ProcessCube(const Functor &funct, bool threaded=true)
Same functionality as StartProcess(void funct(Isis::Buffer &in, Isis::Buffer &out)) using Functors.
Definition ProcessByLine.h:153
void ProcessCubeInPlace(const Functor &funct, bool threaded=true)
Same functionality as StartProcess(void funct(Isis::Buffer &inout)) using Functors.
Definition ProcessByLine.h:133
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16