-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gllssi2isis Original Label Fix #3226
Changes from 6 commits
d415371
d90e56a
3a6975f
da361fc
aabdb80
fd7ab53
cc1ba4d
a265340
415e661
3be6073
d648113
7c7a93f
a6ea2c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,9 +163,11 @@ namespace Isis { | |
* was made to accomodate Rosetta VIRTIS-m calibrated data files and | ||
* has no impact on other supported BIP files. | ||
* Fixes #5398. | ||
* @history 208-07-19 Tyler Wilson - Added support for 4-byte UnsignedInteger special pixel | ||
* @history 2018-07-19 Tyler Wilson - Added support for 4-byte UnsignedInteger special pixel | ||
* values. | ||
* | ||
* @history 2019-04-15 Adam Paquette - Exposed the ns, nl, nb (number of samples, lines, and bands) | ||
* for the setOutputCube function. Updated existing setOutputCube methods | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exposed by adding a new SetOutputCube member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer necessary as the change to ProcessImport was unnecessary |
||
* accordingly. | ||
*/ | ||
class ProcessImport : public Isis::Process { | ||
public: | ||
|
@@ -199,6 +201,7 @@ namespace Isis { | |
|
||
using Isis::Process::SetOutputCube; // make parent functions visable | ||
Isis::Cube *SetOutputCube(const QString ¶meter); | ||
Isis::Cube *SetOutputCube(const QString ¶meter, CubeAttributeOutput &att, const int ns, const int nl, const int nb); | ||
virtual Isis::Cube *SetOutputCube(const QString &fname, | ||
Isis::CubeAttributeOutput &att); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ void translateLabels(Pvl &pdsLabel, Cube *ocube); | |
void fixPvl(QString fileName); | ||
|
||
void IsisMain() { | ||
|
||
//initialize globals | ||
summed = false; | ||
summedOutput = NULL; | ||
|
@@ -110,22 +109,16 @@ void IsisMain() { | |
p.StartProcess(); | ||
} | ||
else { | ||
summedOutput = new Cube(); | ||
summedOutput->setDimensions(p.Samples() / 2, p.Lines() / 2, p.Bands()); | ||
summedOutput->setPixelType(p.PixelType()); | ||
summedOutput->create(ui.GetFileName("TO")); | ||
p.StartProcess(translateData); | ||
Isis::CubeAttributeOutput &att = Application::GetUserInterface().GetOutputAttribute("TO"); | ||
att.setPixelType(p.PixelType()); | ||
summedOutput = p.SetOutputCube("TO", att, p.Samples() / 2, p.Lines() / 2, p.Bands()); | ||
ocube = summedOutput; | ||
p.StartProcess(translateData); | ||
} | ||
|
||
translateLabels(pdsLabel, ocube); | ||
p.EndProcess(); | ||
|
||
if (summed) { | ||
summedOutput->close(); | ||
delete summedOutput; | ||
} | ||
SgStapleton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
return; | ||
} | ||
|
||
|
@@ -182,7 +175,7 @@ void fixPvl(QString fileName){ | |
|
||
|
||
|
||
void translateData(Buffer &inData) { | ||
void translateData(Isis::Buffer &inData) { | ||
summedOutput->write(inData); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be replaced with ocube to get rid of summedOutput altogether? |
||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this call is being passed the user interface parameter name, I don't see the reason to pass in the CubeAttribute. It is part of what the user typed. Also, the original SetOutputCube member parsed the value of the parameter and pulled the attributes off in order to call the parents member. Seems reasonable to continue doing this and not make the application programmer do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer necessary as the change to ProcessImport was unnecessary