Revision 1561 branches/v02_desarrollo/libraries/libCq CMS for java.old/src/org/cresques/px/PxRaster.java
PxRaster.java | ||
---|---|---|
9 | 9 |
import java.awt.Image; |
10 | 10 |
import java.awt.geom.GeneralPath; |
11 | 11 |
import java.awt.geom.Point2D; |
12 |
import java.awt.image.BufferedImage; |
|
13 | 12 |
import java.awt.image.ImageObserver; |
14 | 13 |
import java.util.Date; |
15 | 14 |
import java.util.Vector; |
... | ... | |
20 | 19 |
import org.cresques.geo.ViewPortData; |
21 | 20 |
//import org.cresques.io.GdalFile; |
22 | 21 |
import org.cresques.io.GeoRasterFile; |
23 |
import org.cresques.io.raster.ComputeMinMaxFilter; |
|
24 |
import org.cresques.io.raster.ComputeMinMaxImageFilter; |
|
25 |
import org.cresques.io.raster.LinearEnhancementFilter; |
|
26 |
import org.cresques.io.raster.LinearEnhancementImageFilter; |
|
27 |
import org.cresques.io.raster.RasterBuf; |
|
28 |
import org.cresques.io.raster.RasterFilter; |
|
29 |
import org.cresques.io.raster.RasterStats; |
|
22 |
//import org.cresques.io.raster.ComputeMinMaxFilter;
|
|
23 |
//import org.cresques.io.raster.ComputeMinMaxImageFilter;
|
|
24 |
//import org.cresques.io.raster.LinearEnhancementFilter;
|
|
25 |
//import org.cresques.io.raster.LinearEnhancementImageFilter;
|
|
26 |
//import org.cresques.io.raster.RasterBuf;
|
|
27 |
//import org.cresques.io.raster.RasterFilter;
|
|
28 |
//import org.cresques.io.raster.RasterStats;
|
|
30 | 29 |
|
31 | 30 |
public class PxRaster extends PxObj implements Projected { |
32 | 31 |
protected GeoRasterFile geoFile = null; |
... | ... | |
36 | 35 |
protected GeoRasterFile [] colorBand = null; |
37 | 36 |
protected int rBand = 1, gBand = 2, bBand = 3; |
38 | 37 |
|
39 |
RasterStats stats = new RasterStats(); |
|
38 |
//RasterStats stats = new RasterStats();
|
|
40 | 39 |
int transparente = 0x10ffff80; |
41 | 40 |
|
42 | 41 |
String vName = null; |
... | ... | |
335 | 334 |
|
336 | 335 |
|
337 | 336 |
|
338 |
|
|
337 |
/* |
|
339 | 338 |
/** |
340 | 339 |
* Renderiza el raster. |
341 | 340 |
* @author Luis W. Sevilla (sevilla_lui@gva.es) |
342 |
*/ |
|
341 |
* /
|
|
343 | 342 |
|
344 | 343 |
class RasterToImageFilter extends RasterFilter { |
345 | 344 |
private BufferedImage image; |
... | ... | |
354 | 353 |
|
355 | 354 |
/* (non-Javadoc) |
356 | 355 |
* @see org.cresques.px.PxRaster.RasterFilter#process(int, int) |
357 |
*/ |
|
356 |
* /
|
|
358 | 357 |
public void process(int x, int y) { |
359 | 358 |
raster.getPixelInt(x, y, px); |
360 | 359 |
rgb = alpha | ((px[0] & 0xff) << 16) | |
... | ... | |
367 | 366 |
|
368 | 367 |
/* (non-Javadoc) |
369 | 368 |
* @see org.cresques.px.PxRaster.RasterFilter#processLines(int) |
370 |
*/ |
|
369 |
* /
|
|
371 | 370 |
public void processLine(int y) { |
372 | 371 |
for (int x=0; x<width; x++) { |
373 | 372 |
int [][] line = raster.getLineInt(y); |
... | ... | |
415 | 414 |
stats.pinta(); |
416 | 415 |
return image; |
417 | 416 |
} |
417 |
*/ |
|
418 | 418 |
public void drawMarco(Graphics2D g, ViewPortData vp) { |
419 | 419 |
// Color color = new Color(255,222,165,128), fillColor = new Color(255,214,132,128); |
420 | 420 |
Color color = new Color(128,128,128), fillColor = new Color(255,220,220,0x20); |
Also available in: Unified diff