VLab Issue #15759 - Revert VLab Issue 15201 - Gamma control for true color imagery
This reverts commit 61b0595f9e
[formerly d4a79b75934be787419fd1bad20f84ae838c8a10].
Change-Id: I2184a0edec64761587c1d2312d4015397f047acd
Former-commit-id: 7f770bafdff57c074c76decc44d58d0ec224fde0
This commit is contained in:
parent
61b0595f9e
commit
e891239a89
5 changed files with 9 additions and 61 deletions
|
@ -22,8 +22,6 @@ uniform float width;
|
|||
uniform int band;
|
||||
uniform int expectedMask;
|
||||
|
||||
uniform float gamma;
|
||||
|
||||
int toBitMask(float alpha) {
|
||||
return int((alpha * maskMultiplier) + 0.5);
|
||||
}
|
||||
|
@ -58,9 +56,9 @@ vec4 applyColorBand(int colorband) {
|
|||
// Lookup raw data value
|
||||
float dataValue = textureToDataValue(rawDataTex, rawData, gl_TexCoord[0].st);
|
||||
|
||||
float r = pow(curVal.r, gamma);
|
||||
float g = pow(curVal.g, gamma);
|
||||
float b = pow(curVal.b, gamma);
|
||||
float r = curVal.r;
|
||||
float g = curVal.g;
|
||||
float b = curVal.b;
|
||||
float a = curVal.a;
|
||||
|
||||
if (dataValue != rawData.noDataValue && dataValue == dataValue) {
|
||||
|
|
|
@ -54,7 +54,6 @@ import com.raytheon.viz.core.gl.images.AbstractGLImage;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 6, 2012 mschenke Initial creation
|
||||
* Nov 4, 2013 2492 mschenke Reworked to use GLSL Data mapping
|
||||
* Jan 27, 2016 DR 17997 jgerth Support for gamma control
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -246,8 +245,6 @@ public class GLTrueColorImagingExtension extends AbstractGLSLImagingExtension
|
|||
GLSLStructFactory.createColorMapping(program, "colorMapping", -1,
|
||||
-1, colorMapParameters);
|
||||
|
||||
program.setUniform("gamma", colorMapParameters.getGamma());
|
||||
|
||||
// Set the composite image data
|
||||
program.setUniform("trueColorTexture", 1);
|
||||
program.setUniform("width", (float) writeToImage.getWidth());
|
||||
|
|
|
@ -43,7 +43,6 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe
|
|||
* Aug 20, 2012 mschenke Initial creation
|
||||
* Apr 18, 2014 2947 bsteffen Support unitless data.
|
||||
* Sep 9, 2014 DR 17313 jgerth Support for ColorMapParameters
|
||||
* Jan 27, 2016 DR 17997 jgerth Support for gamma control
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -62,9 +61,6 @@ public class ChannelInfo {
|
|||
@XmlElement
|
||||
private double rangeMax = 1.0;
|
||||
|
||||
@XmlElement
|
||||
private double gamma = 1.0;
|
||||
|
||||
private Unit<?> unit;
|
||||
|
||||
private ColorMapParameters parameters;
|
||||
|
@ -114,21 +110,6 @@ public class ChannelInfo {
|
|||
this.rangeMax = rangeMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the gamma
|
||||
*/
|
||||
public double getGamma() {
|
||||
return gamma;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gamma
|
||||
* the gamma to set
|
||||
*/
|
||||
public void setGamma(double gamma) {
|
||||
this.gamma = gamma;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unit
|
||||
*/
|
||||
|
@ -166,14 +147,13 @@ public class ChannelInfo {
|
|||
: null;
|
||||
}
|
||||
|
||||
public ColorMapParameters getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
public ColorMapParameters getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setParameters(ColorMapParameters parameters) {
|
||||
this.parameters = parameters;
|
||||
this.gamma = parameters.getGamma();
|
||||
}
|
||||
public void setParameters(ColorMapParameters parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -190,8 +170,6 @@ public class ChannelInfo {
|
|||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(rangeMin);
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
temp = Double.doubleToLongBits(gamma);
|
||||
result = prime * result + (int) (temp ^ (temp >>> 32));
|
||||
result = prime * result + ((unit == null) ? 0 : unit.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
@ -218,9 +196,6 @@ public class ChannelInfo {
|
|||
if (Double.doubleToLongBits(rangeMin) != Double
|
||||
.doubleToLongBits(other.rangeMin))
|
||||
return false;
|
||||
if (Double.doubleToLongBits(gamma) != Double
|
||||
.doubleToLongBits(other.gamma))
|
||||
return false;
|
||||
if (unit == null) {
|
||||
if (other.unit != null)
|
||||
return false;
|
||||
|
|
|
@ -72,7 +72,6 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Aug 06, 2012 mschenke Initial creation
|
||||
* Apr 18, 2014 2947 bsteffen Support unitless data.
|
||||
* Sep 10, 2014 DR 17313 jgerth Add inspect method
|
||||
* Jan 27, 2016 DR 17997 jgerth Support for gamma control
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -434,7 +433,6 @@ public class TrueColorResourceGroup extends
|
|||
.getColorMapMin()));
|
||||
ci.setRangeMax(toDisplay.convert(params
|
||||
.getColorMapMax()));
|
||||
ci.setGamma(params.getGamma());
|
||||
ci.setUnit(params.getDisplayUnit());
|
||||
}
|
||||
}
|
||||
|
@ -487,7 +485,6 @@ public class TrueColorResourceGroup extends
|
|||
private static void initializeParameters(ChannelInfo ci,
|
||||
ColorMapParameters params) {
|
||||
if (params != null) {
|
||||
params.setGamma(ci.getGamma());
|
||||
ci.setParameters(params);
|
||||
if (ci.getUnit() != null && params.getColorMapUnit() != null
|
||||
&& ci.getUnit().isCompatible(params.getColorMapUnit())) {
|
||||
|
@ -505,7 +502,6 @@ public class TrueColorResourceGroup extends
|
|||
.getColorMapToDisplayConverter();
|
||||
ci.setRangeMin(cmapToDisplay.convert(params.getColorMapMin()));
|
||||
ci.setRangeMax(cmapToDisplay.convert(params.getColorMapMax()));
|
||||
ci.setGamma(params.getGamma());
|
||||
ci.setUnit(params.getDisplayUnit());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,9 +32,7 @@ import org.eclipse.swt.layout.GridLayout;
|
|||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Spinner;
|
||||
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
|
@ -58,7 +56,6 @@ import com.raytheon.viz.ui.dialogs.ColorMapSliderComp;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 16, 2012 mschenke Initial creation
|
||||
* Jan 27, 2016 DR 17997 jgerth Support for gamma control
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -168,21 +165,6 @@ public class TrueColorDialog extends CaveSWTDialog implements IDisposeListener {
|
|||
params);
|
||||
cmapSlider.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
|
||||
((GridData) cmapSlider.getLayoutData()).widthHint = 450;
|
||||
|
||||
Composite gammaComp = new Composite(group, SWT.NONE);
|
||||
gammaComp.setLayout(new GridLayout(2, false));
|
||||
final Label gammaLabel = new Label(gammaComp, SWT.LEFT);
|
||||
gammaLabel.setText("Gamma:");
|
||||
final Spinner gammaSpinner = new Spinner(gammaComp, SWT.BORDER);
|
||||
gammaSpinner.setValues(100, 0, 500, 2, 10, 10);
|
||||
gammaSpinner.setSelection((int) (params.getGamma() * 100));
|
||||
gammaSpinner.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
cmapSlider.setGamma(gammaSpinner.getSelection() / 100.);
|
||||
}
|
||||
});
|
||||
|
||||
sliderComps.add(cmapSlider);
|
||||
|
||||
if (displayedResource == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue