Changes in this commit seem to be the result of some "auto reformat" tool execution. The Java - GeoAPI - GeoTools import ordering is altered, imports used only in Javadoc are lost and the encoding of non-ASCII characters is broken. This commit has been reverted, except for the removal of really unused imports which are kept removed.
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r10795:10796 https://svn.osgeo.org/geotools/trunk/modules/library/coverage/src/main/java/org/geotools/coverage/ScaledColorSpace.java
Revision 10795 | Revision 10796 |
---|---|
/*
* Geotools 2 - OpenSource mapping toolkit
* (C) 2003, Geotools Project Management Committee (PMC)
* (C) 2001, Institut de Recherche pour le Développement
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public |
/*
* Geotools 2 - OpenSource mapping toolkit
* (C) 2003, Geotools Project Management Committee (PMC)
* (C) 2001, Institut de Recherche pour le D�veloppement
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public |
// J2SE dependencies import java.awt.color.ColorSpace; // Geotools dependencies import org.geotools.resources.Utilities; /** * Espace de couleurs pour les images dont les valeurs * de pixels se situent entre deux nombre réels. * * NOTE: Actual implementation is a copy of org.geotools.io.image.ScaledColorSpace. * Future implementation will be differents (interpolate in a color table |
// J2SE dependencies
import java.awt.color.ColorSpace;
import org.geotools.resources.Utilities;
/**
* Espace de couleurs pour les images dont les valeurs
* de pixels se situent entre deux nombre r�els.
*
* NOTE: Actual implementation is a copy of org.geotools.io.image.ScaledColorSpace.
* Future implementation will be differents (interpolate in a color table |
private final float scale; /** * Nombre à aditionner aux pixels après * les avoir multiplier par {@link #scale}. */ private final float offset; /** * Construit un modèle de couleurs. * * @param band La bande à rendre visible (habituellement 0). * @param numComponents Nombre de composante (seule la première sera prise en compte). * @param minimum La valeur géophysique minimale. * @param maximum La valeur géophysique maximale. */ public ScaledColorSpace(final int band, final int numComponents, final double minimum, final double maximum) |
private final float scale; /** * Nombre � aditionner aux pixels apr�s * les avoir multiplier par {@link #scale}. */ private final float offset; /** * Construit un mod�le de couleurs. * * @param band La bande � rendre visible (habituellement 0). * @param numComponents Nombre de composante (seule la premi�re sera prise en compte). * @param minimum La valeur g�ophysique minimale. * @param maximum La valeur g�ophysique maximale. */ public ScaledColorSpace(final int band, final int numComponents, final double minimum, final double maximum) |
/**
* Retourne une couleur RGB en tons de
* gris pour le nombre réel spécifié.
*/
public float[] toRGB(final float[] values) {
float value = (values[band]-offset)/scale; |
/**
* Retourne une couleur RGB en tons de
* gris pour le nombre r�el sp�cifi�.
*/
public float[] toRGB(final float[] values) {
float value = (values[band]-offset)/scale; |
} /** * Retourne une valeur réelle pour * le ton de gris spécifié. */ public float[] fromRGB(final float[] RGB) { final float[] values = new float[getNumComponents()]; |
} /** * Retourne une valeur r�elle pour * le ton de gris sp�cifi�. */ public float[] fromRGB(final float[] RGB) { final float[] values = new float[getNumComponents()]; |
}
/**
* Retourne la valeur minimale autorisée.
*/
public float getMinValue(final int component) {
return MIN_VALUE*scale + offset; |
}
/**
* Retourne la valeur minimale autoris�e.
*/
public float getMinValue(final int component) {
return MIN_VALUE*scale + offset; |
}
/**
* Retourne la valeur maximale autorisée.
*/
public float getMaxValue(final int component) {
return MAX_VALUE*scale + offset; |
}
/**
* Retourne la valeur maximale autoris�e.
*/
public float getMaxValue(final int component) {
return MAX_VALUE*scale + offset; |