File failed to load: https://isis.astrogeology.usgs.gov/7.1.0/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
QStretch.h
Go to the documentation of this file.
1#ifndef QStretch_h
2#define QStretch_h
3
4#include <QGroupBox>
5#include <QTableWidget>
6
7#include "Stretch.h"
8
9namespace Isis {
10 class StretchTool;
11
26 class QStretch : public QObject {
27 Q_OBJECT
28
29 public:
39 QStretch(const StretchTool *stretchTool, QString name)
40 : p_stretchTool(stretchTool),
41 p_name(name),
42 p_min(0.0),
43 p_max(255.0),
44 p_parametersBox(NULL) {
45 p_stretch.SetNull(0.0);
46 p_stretch.SetLis(0.0);
47 p_stretch.SetLrs(0.0);
48 p_stretch.SetHis(255.0);
49 p_stretch.SetHrs(255.0);
51 p_stretch.SetMaximum(255.0);
52 };
53
54
62 virtual QStretch *clone() = 0;
63
71 virtual void connectTable(QTableWidget *widget) {};
72
79 virtual void disconnectTable(QTableWidget *widget) {};
80
88 virtual QGroupBox *getParameters() = 0;
89
96 QString name() {
97 return p_name;
98 }
99
107 return p_stretch;
108 }
109
117 virtual void setMinMax(double min, double max) {
118 p_min = min;
119 p_max = max;
120 }
121
122 signals:
126 void update();
127
128 protected:
130 QString p_name;
131 double p_min;
132 double p_max;
133 QGroupBox *p_parametersBox;
135 };
136};
137
138#endif
Abstract class for complex stretch objects.
Definition: QStretch.h:26
Stretch stretch()
This method returns the stretch.
Definition: QStretch.h:106
QString name()
This method returns the name of this QStretch.
Definition: QStretch.h:96
virtual QStretch * clone()=0
Abstract method to clone a QStretch in order to retain its parameters and stretch pairs.
QGroupBox * p_parametersBox
The QGroupBox that holds this QStretch's parameters.
Definition: QStretch.h:133
void update()
Signal to emit when this QStretch has been updated.
virtual void setMinMax(double min, double max)
Abstract method to set the minimum and maximum values that stretch input pairs can be set to.
Definition: QStretch.h:117
QString p_name
The name of this QStretch.
Definition: QStretch.h:130
Stretch p_stretch
The stretch that this QStretch modifies.
Definition: QStretch.h:134
virtual void connectTable(QTableWidget *widget)
Abstract method to connect the AdvancedStretchTool's table of stretch pairs in order to modify it if ...
Definition: QStretch.h:71
double p_min
The minimum value a stretch input pair can be set to.
Definition: QStretch.h:131
virtual void disconnectTable(QTableWidget *widget)
Abstract method to disconnect the AdvancedStretchTool's table of stretch pairs.
Definition: QStretch.h:79
virtual QGroupBox * getParameters()=0
Abstract method to return a QGroupBox of this QStretch's parameters.
double p_max
The maximum value a stretch input pair can be set to.
Definition: QStretch.h:132
const StretchTool * p_stretchTool
The StretchTool that created this QStretch.
Definition: QStretch.h:129
QStretch(const StretchTool *stretchTool, QString name)
QStretch Constructor.
Definition: QStretch.h:39
Pixel value mapper.
Definition: Stretch.h:58
void SetNull(const double value)
Sets the mapping for NULL pixels.
Definition: Stretch.h:94
void SetMaximum(const double value)
Definition: Stretch.h:145
void SetHrs(const double value)
Sets the mapping for HRS pixels.
Definition: Stretch.h:138
void SetMinimum(const double value)
Definition: Stretch.h:142
void SetHis(const double value)
Sets the mapping for HIS pixels.
Definition: Stretch.h:127
void SetLis(const double value)
Sets the mapping for LIS pixels.
Definition: Stretch.h:105
void SetLrs(const double value)
Sets the mapping for LRS pixels.
Definition: Stretch.h:116
Stretch image edit tool.
Definition: StretchTool.h:85
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 02/21/2025 21:56:47