Isis Developer Reference
ProcessByTile.h
Go to the documentation of this file.
1 #ifndef ProcessByTile_h
2 #define ProcessByTile_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "ProcessByBrick.h"
10 #include "Buffer.h"
11 
12 namespace Isis {
40  class ProcessByTile : public ProcessByBrick {
41 
42  private:
43  bool p_tileSizeSet;
44  int p_tileSamples;
45  int p_tileLines;
46 
47  public:
48 
51  p_tileSizeSet = false;
52  };
53 
56 
57  void SetTileSize(const int ns, const int nl);
58 
59  void StartProcess(void funct(Buffer &in));
60  void StartProcess(void funct(Buffer &in, Buffer &out));
61 
62  void StartProcess(void funct(std::vector<Buffer *> &in,
63  std::vector<Buffer *> &out));
64  void EndProcess();
65  void Finalize();
66 
72  template <typename Functor>
73  void ProcessCubeInPlace(const Functor & funct, bool threaded = true) {
75  SetBricks(InPlace);
76  //SetBrickSizesForProcessCubeInPlace();
77  ProcessByBrick::ProcessCubeInPlace(funct, threaded);
78  }
79 
85  template <typename Functor>
86  void ProcessCube(const Functor & funct, bool threaded = true) {
87 
89  SetBricks(InputOutput);
90 
91  //SetBrickSizesForProcessCube();
92  ProcessByBrick::ProcessCube(funct, threaded);
93  }
94 
100  template <typename Functor>
101  void ProcessCubes(const Functor & funct, bool threaded = true) {
102 
104  SetBricks(InputOutputList);
105  //SetBrickSizesForProcessCubes();
106  ProcessByBrick::ProcessCubes(funct, threaded);
107  }
108 
109  private:
110  void SetBricks(IOCubes cn);
111  void SetBrickSizesForProcessCubeInPlace();
112  void SetBrickSizesForProcessCube();
113  void SetBrickSizesForProcessCubes();
114  };
115 };
116 
117 #endif
Isis::ProcessByTile::EndProcess
void EndProcess()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
Definition: ProcessByTile.cpp:101
Isis::ProcessByBrick::VerifyCubes
void VerifyCubes(IOCubes cn)
Verifies the dimensions of the input/output cubes.
Definition: ProcessByBrick.cpp:120
Isis::ProcessByTile::Finalize
void Finalize()
Cleans up by closing cubes and freeing memory.
Definition: ProcessByTile.cpp:110
Isis::ProcessByTile::ProcessCubes
void ProcessCubes(const Functor &funct, bool threaded=true)
Definition: ProcessByTile.h:101
Isis::ProcessByTile::ProcessCube
void ProcessCube(const Functor &funct, bool threaded=true)
Definition: ProcessByTile.h:86
Isis::ProcessByTile::ProcessByTile
ProcessByTile()
Constructs a ProcessByTile object.
Definition: ProcessByTile.h:50
Isis::ProcessByTile::~ProcessByTile
~ProcessByTile()
Destroys the ProcessByTile object.
Definition: ProcessByTile.h:55
Isis::ProcessByBrick::ProcessCubeInPlace
void ProcessCubeInPlace(const Functor &functor, bool threaded=true)
Operate over a single cube (either input or output).
Definition: ProcessByBrick.h:163
Isis::Buffer
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Isis::ProcessByTile::StartProcess
void StartProcess(void funct(Buffer &in))
Starts the systematic processing of the input cube by moving an arbitrary shaped tile through the cub...
Definition: ProcessByTile.cpp:63
Isis::ProcessByBrick::IOCubes
IOCubes
Definition: ProcessByBrick.h:89
ProcessByBrick.h
Buffer.h
Isis::ProcessByBrick::ProcessCube
void ProcessCube(const Functor &functor, bool threaded=true)
Operate over a single input cube creating a separate output cube.
Definition: ProcessByBrick.h:200
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::ProcessByBrick
Process cubes by brick.
Definition: ProcessByBrick.h:81
TileManager.h
Isis::ProcessByBrick::ProcessCubes
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:239
Isis::ProcessByBrick::InPlace
@ InPlace
Definition: ProcessByBrick.h:89
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ProcessByBrick::InputOutputList
@ InputOutputList
Definition: ProcessByBrick.h:91
Isis::ProcessByTile
Process cubes by tile.
Definition: ProcessByTile.h:40
Isis::ProcessByTile::SetTileSize
void SetTileSize(const int ns, const int nl)
Sets the tile size.
Definition: ProcessByTile.cpp:20
std
Namespace for the standard library.
ProcessByTile.h
Isis::ProcessByTile::ProcessCubeInPlace
void ProcessCubeInPlace(const Functor &funct, bool threaded=true)
Definition: ProcessByTile.h:73
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ProcessByBrick::InputOutput
@ InputOutput
Definition: ProcessByBrick.h:90