root / branches / CqCMSDvp / libraries / libCq CMS for java.old / src / org / cresques / io / raster / PercentTailTrimShortFilter.java @ 2249
History | View | Annotate | Download (2.6 KB)
1 |
/*
|
---|---|
2 |
* Created on 21-jun-2005
|
3 |
*
|
4 |
* To change the template for this generated file go to
|
5 |
* Window>Preferences>Java>Code Generation>Code and Comments
|
6 |
*/
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
8 |
*
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or (at your option) any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
24 |
*
|
25 |
* For more information, contact:
|
26 |
*
|
27 |
* Generalitat Valenciana
|
28 |
* Conselleria d'Infraestructures i Transport
|
29 |
* Av. Blasco Ib??ez, 50
|
30 |
* 46010 VALENCIA
|
31 |
* SPAIN
|
32 |
*
|
33 |
* +34 963862235
|
34 |
* gvsig@gva.es
|
35 |
* www.gvsig.gva.es
|
36 |
*
|
37 |
* or
|
38 |
*
|
39 |
* IVER T.I. S.A
|
40 |
* Salamanca 50
|
41 |
* 46005 Valencia
|
42 |
* Spain
|
43 |
*
|
44 |
* +34 963163400
|
45 |
* dac@iver.es
|
46 |
*/
|
47 |
package org.cresques.io.raster; |
48 |
|
49 |
|
50 |
/**
|
51 |
* @author Nacho Brodin <brodin_ign@gva.es>
|
52 |
*
|
53 |
* Proceso del filtro de recorte de colas aplicado a im?genes 16 bits
|
54 |
*/
|
55 |
public class PercentTailTrimShortFilter extends PercentTailTrimFilter { |
56 |
|
57 |
public PercentTailTrimShortFilter(){}
|
58 |
|
59 |
/* (non-Javadoc)
|
60 |
* @see org.cresques.io.raster.IRasterFilter#pre()
|
61 |
*/
|
62 |
public void pre(){ |
63 |
//Obtenci?n de par?metros
|
64 |
|
65 |
this.raster = (RasterBuf)params.get("raster"); |
66 |
height = raster.getHeight(); |
67 |
width = raster.getWidth(); |
68 |
super.pre();
|
69 |
} |
70 |
|
71 |
/* (non-Javadoc)
|
72 |
* @see org.cresques.io.raster.IRasterFilter#process(int, int)
|
73 |
*/
|
74 |
public void process(int x, int y) { |
75 |
raster.getElemInt(x, y, px); |
76 |
sample[0][count] = px[0]; |
77 |
sample[1][count] = px[1]; |
78 |
sample[2][count] = px[2]; |
79 |
count++; |
80 |
} |
81 |
|
82 |
/* (non-Javadoc)
|
83 |
* @see org.cresques.io.raster.IRasterFilter#getInRasterDataType()
|
84 |
*/
|
85 |
public int getInRasterDataType(){ |
86 |
return RasterBuf.TYPE_SHORT;
|
87 |
} |
88 |
|
89 |
/* (non-Javadoc)
|
90 |
* @see org.cresques.io.raster.IRasterFilter#getOutRasterDataType()
|
91 |
*/
|
92 |
public int getOutRasterDataType(){ |
93 |
return RasterBuf.TYPE_SHORT;
|
94 |
} |
95 |
|
96 |
/* (non-Javadoc)
|
97 |
* @see org.cresques.io.raster.RasterFilter#processLine(int)
|
98 |
*/
|
99 |
public void processLine(int y){}; |
100 |
|
101 |
public void post(){ |
102 |
super.post();
|
103 |
} |
104 |
|
105 |
} |