svn-gvsig-desktop / tags / v1_0_2_Build_908 / libraries / libCq CMS for java.old / src / org / cresques / filter / IRaster.java @ 11054
History | View | Annotate | Download (2.97 KB)
1 | 5978 | nacho | /*
|
---|---|---|---|
2 | * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
|
||
3 | *
|
||
4 | * Copyright (C) 2004-5.
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
19 | *
|
||
20 | * For more information, contact:
|
||
21 | *
|
||
22 | * cresques@gmail.com
|
||
23 | */
|
||
24 | package org.cresques.filter; |
||
25 | |||
26 | import java.awt.image.DataBuffer; |
||
27 | |||
28 | |||
29 | /**
|
||
30 | * Raster con acceso a los elementos individuales (pixeles o datos de celda).
|
||
31 | * @author Luis W. Sevilla (sevilla_lui@gva.es)
|
||
32 | */
|
||
33 | public interface IRaster { |
||
34 | public final static int TYPE_UNDEFINED = DataBuffer.TYPE_UNDEFINED; |
||
35 | public final static int TYPE_BYTE = DataBuffer.TYPE_BYTE; |
||
36 | public final static int TYPE_SHORT = DataBuffer.TYPE_SHORT; |
||
37 | public final static int TYPE_USHORT = DataBuffer.TYPE_USHORT; |
||
38 | public final static int TYPE_INT = DataBuffer.TYPE_INT; |
||
39 | public final static int TYPE_FLOAT = DataBuffer.TYPE_FLOAT; |
||
40 | public final static int TYPE_DOUBLE = DataBuffer.TYPE_DOUBLE; |
||
41 | public final static int TYPE_IMAGE = -1; |
||
42 | |||
43 | /**
|
||
44 | * Ancho del raster
|
||
45 | * @return Entero con el ancho del raster
|
||
46 | */
|
||
47 | public int getWidth(); |
||
48 | |||
49 | /**
|
||
50 | * Alto del raster
|
||
51 | * @return Entero con el alto del raster
|
||
52 | */
|
||
53 | public int getHeight(); |
||
54 | |||
55 | /**
|
||
56 | * N?mero de bandas
|
||
57 | * @return Entero con el n?mero de bandas
|
||
58 | */
|
||
59 | public int getBandNr(); |
||
60 | |||
61 | /**
|
||
62 | * Devuelve el tipo de datos del raster
|
||
63 | * @see java.awt.image.DataBuffer
|
||
64 | */
|
||
65 | public int getDataType(); |
||
66 | |||
67 | /**
|
||
68 | * Obtiene sobre un array de bandas el valor del raster en la
|
||
69 | * coordenada que se le pasa. Los elementos son de 16 bits.
|
||
70 | * @param x coordenada X
|
||
71 | * @param y coordenada Y
|
||
72 | * @param px Array de 4 elementos para las bandas de la imagen ARGB
|
||
73 | */
|
||
74 | public void getElemShort(int x, int y, int[] px); |
||
75 | |||
76 | /**
|
||
77 | * Obtiene sobre un array de bandas el valor del raster en la
|
||
78 | * coordenada que se le pasa. Los elementos son de 32 bits.
|
||
79 | * @param x coordenada X
|
||
80 | * @param y coordenada Y
|
||
81 | * @param px Array de 4 elementos para las bandas de la imagen ARGB
|
||
82 | */
|
||
83 | public void getElemInt(int x, int y, int[] px); |
||
84 | |||
85 | /**
|
||
86 | * Obtiene el valor del raster en la coordenada que se le pasa.
|
||
87 | * Devuelve un int.
|
||
88 | * @param x coordenada X
|
||
89 | * @param y coordenada Y
|
||
90 | * @param band banda
|
||
91 | * @return Entero
|
||
92 | */
|
||
93 | public int getElemInt(int x, int y, int band); |
||
94 | } |