Statistics
| Revision:

svn-gvsig-desktop / tags / Root_CqCMSGisPlanet / libraries / libCq CMS for java.old / src / org / cresques / io / raster / ComputeMinMaxShortFilter.java @ 1933

History | View | Annotate | Download (907 Bytes)

1
/*
2
 * Created on 22-feb-2005
3
 */
4
package org.cresques.io.raster;
5

    
6
import java.awt.Image;
7

    
8
/**
9
 * Calcula el m?ximo y el m?nimo de un raster.
10
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
11
 */
12
public class ComputeMinMaxShortFilter extends ComputeMinMaxFilter {
13
        
14
        public ComputeMinMaxShortFilter(){
15
                super();
16
        }
17
                        
18
        public void pre(){
19
                //Obtenci?n de par?metros
20
                
21
                this.raster = (RasterBuf)params.get("raster");
22
                                
23
                height = raster.getHeight();
24
                width = raster.getWidth();
25
                super.pre();
26
        }
27
        
28
        public void process(int x, int y) {
29
                raster.getElemInt(x, y, px);
30
                for (int i=0; i<3; i++) {
31
                        min[i] = Math.min(min[i], px[i]);
32
                        max[i] = Math.max(max[i], px[i]);
33
                }
34
        }
35
        
36
        public int getInRasterDataType(){
37
                return RasterBuf.TYPE_SHORT;
38
        }
39
        
40
        public int getOutRasterDataType(){
41
                return RasterBuf.TYPE_SHORT;
42
        }
43
        
44
        public void post(){
45
                super.post();
46
        };
47
        
48
        public void processLine(int y){};
49

    
50

    
51
}
52