From: Martin D. <mar...@te...> - 2003-04-13 17:24:50
|
Martin Desruisseaux a =E9crit: >> A convenience method may be more convenient to use than an operator ;-= ) The convenience method was not convenient. I changed its semantic. The=20 new one is simplier and I hope definitive (unless I get comments for=20 change). Now it is: SampleDimension sd =3D new SampleDimension("Elevation", null, null, null, null, null, 0, 255, scale, offset, null); Where [0..255] (the 255 is inclusive) is the range of integer sample values to use for the indexed image (the one which is going to be rendered later); 'scale' and 'offset' are some coefficients for mapping the range [0..255] to floating point values: float =3D integer*scale + offset If you don't know 'scale' and 'offset' in advance, try to put some reasonable numbers. Those coefficients can be changed later. For changing the 'scale' and 'offset' values: sd =3D sd.rescale(scale, offset); Note that the 'geophysics(true)' step has been skiped (this is where the=20 change in 'rescale' method semantic lies). Martin. |