-
Notifications
You must be signed in to change notification settings - Fork 171
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
Adds the ability to save and restore a greyscale stretch to/from a Cube #3717
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6dafcfa
Update meta.yaml to rename conda package to isis from isis3
krlberry 5ea5b89
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev
krlberry 4dd4d55
gMerge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev
krlberry 03fdf3e
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev
krlberry ce7cf0a
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev
krlberry 66deadf
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev
krlberry fc80fdd
Initial stretch attempt
krlberry 298596b
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into stretch
krlberry 0d284c8
Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into stretch
krlberry d7a14f5
Now will write a single stretch with a name and type to the cube
krlberry b09c930
Stretch updated to inherit from Blob, re-loading a saved stretch work…
krlberry 91314eb
Clean up Stretch class
krlberry 143dc95
Completely move stretchTypes into stretch class, and some minor cleanup
krlberry b739397
Fixed combo-box not updating bug and more cleanup
krlberry ad7dc7b
Further cleanup of propagated earlier changes with types and names be…
krlberry e5c8a7d
Removed added unneeded member variables from StretchType
krlberry 1f00cfa
Cleanup StretchTool class
krlberry 1a92f55
Update enter-text dialogs to drop down selection options
krlberry 58ab204
Wrapped some long strings
scsides 1cfcf38
Initial commit to address most of review comments
krlberry 8c3e931
resolve conflicts
krlberry 199753c
Removed buttons in case of RGB stretch and add a 'Color' PvlKeyword t…
krlberry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
#include <string> | ||
#include "Pvl.h" | ||
#include "Histogram.h" | ||
#include "Blob.h" | ||
|
||
namespace Isis { | ||
/** | ||
|
@@ -67,9 +68,10 @@ namespace Isis { | |
* Created second Parse method for handling pairs where the | ||
* input side is a perentage. Fixed Input and Output getters | ||
* to check both sides of boundry condition for valid data | ||
* | ||
* @history 2020-02-27 Kristin Berry - Updated to inherit from Blob so Stretches can be | ||
* saved and restored from cubes. | ||
*/ | ||
class Stretch { | ||
class Stretch : public Isis::Blob { | ||
private: | ||
std::vector<double> p_input; //!< Array for input side of stretch pairs | ||
std::vector<double> p_output; //!< Array for output side of stretch pairs | ||
|
@@ -88,10 +90,13 @@ namespace Isis { | |
double p_minimum; //!<By default this value is set to p_lrs | ||
double p_maximum; //!<By default this value is set to p_hrs | ||
|
||
QString p_type; //! Type of stretch. This is only currently used in the AdvancedStretchTool. | ||
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 passed in on as a signal slot variable? |
||
|
||
std::pair<double, double> NextPair(QString &pairs); | ||
|
||
public: | ||
Stretch(); | ||
Stretch(QString name); | ||
|
||
//! Destroys the Stretch object | ||
~Stretch() {}; | ||
|
@@ -177,6 +182,9 @@ namespace Isis { | |
return p_pairs; | ||
}; | ||
|
||
QString getType(); | ||
void setType(QString type); | ||
|
||
double Input(const int index) const; | ||
double Output(const int index) const; | ||
|
||
|
@@ -188,6 +196,11 @@ namespace Isis { | |
}; | ||
|
||
void CopyPairs(const Stretch &other); | ||
|
||
protected: | ||
void WriteInit(); | ||
void ReadData(std::istream &is); | ||
void WriteData(std::fstream &os); | ||
}; | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a reason why these aren't VALID_MIN8 and VALID_MAX8?
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.
This is a copy of the default constructor so this is just more of a curious question for me.
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.
I'm not sure, @scsides do you know?