MCPcopy Create free account
hub / github.com/DOI-USGS/ISIS3 / SetInputCube

Method SetInputCube

isis/src/base/objs/Process/Process.cpp:68–96  ·  view source on GitHub ↗

* Opens an input cube specified by the programmer and verifies requirements * are met. * * @param fname Programmer specified work file. For example, "myfile.cub". * * @param att The cube attributes to use when opening the input cube. * * @param requirements Requirements to check that the input cube meets. * See CheckRequirements(). * * @return Cub

Source from the content-addressed store, hash-verified

66 * @throws Isis::iException::Message
67 */
68 Isis::Cube *Process::SetInputCube(const QString &fname,
69 const Isis::CubeAttributeInput &att,
70 int requirements) {
71 Isis::Cube *cube = new Isis::Cube;
72 if(att.bands().size() != 0) {
73 vector<QString> lame = att.bands();
74 cube->setVirtualBands(lame);
75 }
76
77 try {
78 if(requirements & Isis::ReadWrite) {
79 cube->open(fname, "rw");
80 }
81 else {
82 // Make sure attributes don't get processed twice
83 cube->open(FileName(fname).expanded());
84 }
85 }
86 catch(IException &e) {
87 delete cube;
88 throw;
89 }
90
91 CheckRequirements(cube, requirements);
92
93 // Everything is good so save the cube on the stack
94 AddInputCube(cube);
95 return cube;
96 }
97
98
99 /**

Callers 15

eisstitchFunction · 0.45
ciss2isisFunction · 0.45
IsisMainFunction · 0.45
IsisMainFunction · 0.45
calculateSolarRemoveFunction · 0.45
chooseFlatFileFunction · 0.45
IsisMainFunction · 0.45
apollocalFunction · 0.45
IsisMainFunction · 0.45
apolloremrxFunction · 0.45
apolloPanStitcherFunction · 0.45
sumspiceFunction · 0.45

Calls 9

GetCubeNameMethod · 0.80
FileNameClass · 0.50
IExceptionClass · 0.50
sizeMethod · 0.45
bandsMethod · 0.45
setVirtualBandsMethod · 0.45
openMethod · 0.45
expandedMethod · 0.45
isOpenMethod · 0.45

Tested by 15

IsisMainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
mainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
IsisMainFunction · 0.36
mainFunction · 0.36