Isis 3 Programmer Reference
ProcessByTile.h
Go to the documentation of this file.
1 #ifndef ProcessByTile_h
2 #define ProcessByTile_h
3 
25 #include "ProcessByBrick.h"
26 #include "Buffer.h"
27 
28 namespace Isis {
56  class ProcessByTile : public ProcessByBrick {
57 
58  private:
62 
63  public:
64 
67  p_tileSizeSet = false;
68  };
69 
72 
73  void SetTileSize(const int ns, const int nl);
74 
75  void StartProcess(void funct(Buffer &in));
76  void StartProcess(void funct(Buffer &in, Buffer &out));
77 
78  void StartProcess(void funct(std::vector<Buffer *> &in,
79  std::vector<Buffer *> &out));
80  void EndProcess();
81  void Finalize();
82 
88  template <typename Functor>
89  void ProcessCubeInPlace(const Functor & funct, bool threaded = true) {
90  VerifyCubes(InPlace);
91  SetBricks(InPlace);
92  //SetBrickSizesForProcessCubeInPlace();
93  ProcessByBrick::ProcessCubeInPlace(funct, threaded);
94  }
95 
101  template <typename Functor>
102  void ProcessCube(const Functor & funct, bool threaded = true) {
103 
104  VerifyCubes(InputOutput) ;
105  SetBricks(InputOutput);
106 
107  //SetBrickSizesForProcessCube();
108  ProcessByBrick::ProcessCube(funct, threaded);
109  }
110 
116  template <typename Functor>
117  void ProcessCubes(const Functor & funct, bool threaded = true) {
118 
119  VerifyCubes(InputOutputList);
120  SetBricks(InputOutputList);
121  //SetBrickSizesForProcessCubes();
122  ProcessByBrick::ProcessCubes(funct, threaded);
123  }
124 
125  private:
126  void SetBricks(IOCubes cn);
127  void SetBrickSizesForProcessCubeInPlace();
128  void SetBrickSizesForProcessCube();
129  void SetBrickSizesForProcessCubes();
130  };
131 };
132 
133 #endif
Buffer for reading and writing cube data.
Definition: Buffer.h:69
bool p_tileSizeSet
Indicates whether the tile size has been set.
Definition: ProcessByTile.h:59
void VerifyCubes(IOCubes cn)
Verifies the dimensions of the input/output cubes.
void EndProcess()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
int p_tileSamples
Number of samples in the tile.
Definition: ProcessByTile.h:60
Process cubes by tile.
Definition: ProcessByTile.h:56
void ProcessCubes(const Functor &functor, bool threaded=true)
Operate over an arbitrary number of input cubes given an arbitrary number of output cubes...
Process cubes by brick.
void ProcessCubeInPlace(const Functor &funct, bool threaded=true)
Definition: ProcessByTile.h:89
void ProcessCubeInPlace(const Functor &functor, bool threaded=true)
Operate over a single cube (either input or output).
void SetTileSize(const int ns, const int nl)
Sets the tile size.
int p_tileLines
Number of lines in the tile.
Definition: ProcessByTile.h:61
ProcessByTile()
Constructs a ProcessByTile object.
Definition: ProcessByTile.h:66
void ProcessCube(const Functor &functor, bool threaded=true)
Operate over a single input cube creating a separate output cube.
void StartProcess(void funct(Buffer &in))
Starts the systematic processing of the input cube by moving an arbitrary shaped tile through the cub...
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
~ProcessByTile()
Destroys the ProcessByTile object.
Definition: ProcessByTile.h:71
void ProcessCubes(const Functor &funct, bool threaded=true)
void ProcessCube(const Functor &funct, bool threaded=true)
void Finalize()
Cleans up by closing cubes and freeing memory.