7 #include "ProcessBySample.h"
11 #include "IException.h"
13 #include "ProcessByBrick.h"
37 Isis::Cube *ProcessBySample::SetInputCube(
const QString ¶meter,
39 int allRequirements = Isis::SpatialMatch | Isis::BandMatchOrOne;
40 allRequirements |= requirements;
41 return Process::SetInputCube(parameter, allRequirements);
57 Isis::Cube *ProcessBySample::SetInputCube(
const QString &file,
60 int allRequirements = Isis::SpatialMatch | Isis::BandMatchOrOne;
61 allRequirements |= requirements;
62 return Process::SetInputCube(file, att, allRequirements);
77 void ProcessBySample::StartProcess(
void funct(
Isis::Buffer &inout)) {
80 ProcessByBrick::StartProcess(funct);
96 VerifyCubes(InputOutput);
97 SetBricks(InputOutput);
98 ProcessByBrick::StartProcess(funct);
111 void ProcessBySample::StartProcess(
void funct(std::vector<Isis::Buffer *> &in,
112 std::vector<Isis::Buffer *> &out)) {
113 VerifyCubes(InputOutputList) ;
114 SetBricks(InputOutputList);
115 ProcessByBrick::StartProcess(funct);
119 void ProcessBySample::SetBricks(IOCubes cn){
122 if (InputCubes.size() == 1) {
123 SetBrickSize(1, InputCubes[0]->lineCount(), 1);
126 SetBrickSize(1, OutputCubes[0]->lineCount(), 1);
131 SetInputBrickSize(1, InputCubes[0]->lineCount(), 1);
132 SetOutputBrickSize(1, OutputCubes[0]->lineCount(), 1);
135 case InputOutputList:
136 for(
unsigned int i = 0; i < InputCubes.size(); i++) {
137 SetInputBrickSize(1, InputCubes[i]->lineCount(), 1, i + 1);
139 for(
unsigned int i = 0; i < OutputCubes.size(); i++) {
140 SetOutputBrickSize(1, OutputCubes[i]->lineCount(), 1, i + 1);