57 Isis::Cube *ProcessBySpectra::SetInputCube(
const QString ¶meter,
58 const int requirements) {
59 return ProcessByBrick::SetInputCube(parameter,
60 Isis::SpatialMatch | requirements);
76 Isis::Cube *ProcessBySpectra::SetInputCube(
const QString &file,
78 const int requirements) {
79 return ProcessByBrick::SetInputCube(file, att,
80 Isis::SpatialMatch | requirements);
97 void ProcessBySpectra::StartProcess(
void funct(
Isis::Buffer &in)) {
100 VerifyCubes(InPlace);
103 ProcessByBrick::StartProcess(funct);
119 void ProcessBySpectra::StartProcess(
void 123 VerifyCubes(InputOutput);
124 SetBricks(InputOutput);
126 ProcessByBrick::StartProcess(funct);
141 void ProcessBySpectra::StartProcess(
void funct(std::vector<Isis::Buffer *> &in,
142 std::vector<Isis::Buffer *> &out)) {
144 VerifyCubes(InputOutputList);
145 SetBricks(InputOutputList);
146 ProcessByBrick::StartProcess(funct);
159 void ProcessBySpectra::SetType(
const int type) {
160 if (type != PerPixel && type != ByLine && type != BySample) {
161 string m =
"The specified spectra type is invalid";
164 else p_spectraType = type;
168 void ProcessBySpectra::SetBricks(IOCubes cn){
177 if(InputCubes.size() == 1) {
179 ns = InputCubes[0]->sampleCount();
180 nl = InputCubes[0]->lineCount();
181 nb = InputCubes[0]->bandCount();
184 ns = OutputCubes[0]->sampleCount();
185 nl = OutputCubes[0]->lineCount();
186 nb = OutputCubes[0]->bandCount();
189 if(Type() == PerPixel) SetBrickSize(1, 1, nb);
191 else if(Type() == ByLine) SetBrickSize(ns, 1, nb);
193 else SetBrickSize(1, nl, nb);
199 if(Type() == PerPixel) {
200 SetInputBrickSize(1, 1, InputCubes[0]->bandCount());
201 SetOutputBrickSize(1, 1, OutputCubes[0]->bandCount());
203 else if(Type() == ByLine) {
204 SetInputBrickSize(InputCubes[0]->sampleCount(), 1,
205 InputCubes[0]->bandCount());
206 SetOutputBrickSize(OutputCubes[0]->sampleCount(), 1,
207 OutputCubes[0]->bandCount());
210 SetInputBrickSize(1, InputCubes[0]->lineCount(),
211 InputCubes[0]->bandCount());
212 SetOutputBrickSize(1, OutputCubes[0]->lineCount(),
213 OutputCubes[0]->bandCount());
219 case InputOutputList:
221 if(Type() == PerPixel) {
222 for(
unsigned int i = 0; i < InputCubes.size(); i++) {
223 SetInputBrickSize(1, 1, InputCubes[i]->bandCount(), i + 1);
225 for(
unsigned int i = 0; i < OutputCubes.size(); i++) {
226 SetOutputBrickSize(1, 1, OutputCubes[i]->bandCount(), i + 1);
229 else if(Type() == ByLine) {
230 for(
unsigned int i = 0; i < InputCubes.size(); i++) {
231 SetInputBrickSize(InputCubes[i]->sampleCount(), 1,
232 InputCubes[i]->bandCount(), i + 1);
234 for(
unsigned int i = 0; i < OutputCubes.size(); i++) {
235 SetOutputBrickSize(OutputCubes[i]->sampleCount(), 1,
236 OutputCubes[i]->bandCount(), i + 1);
240 for(
unsigned int i = 0; i < InputCubes.size(); i++) {
241 SetInputBrickSize(1, InputCubes[i]->lineCount(),
242 InputCubes[i]->bandCount(), i + 1);
244 for(
unsigned int i = 0; i < OutputCubes.size(); i++) {
245 SetOutputBrickSize(1, OutputCubes[i]->lineCount(),
246 OutputCubes[i]->bandCount(), i + 1);
Buffer for reading and writing cube data.
Namespace for the standard library.
#define _FILEINFO_
Macro for the filename and line number.
Namespace for ISIS/Bullet specific routines.
IO Handler for Isis Cubes.