Revision 34594

View differences:

tags/v2_0_0_Build_2024/libraries/libjni-mrsid/.cproject
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<?fileVersion 4.0.0?>
3

  
4
<cproject>
5
<storageModule moduleId="org.eclipse.cdt.core.settings">
6
<cconfiguration id="converted.config.931178486">
7
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
8
<pathentry kind="src" path=""/>
9
<pathentry kind="out" path=""/>
10
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
11
</storageModule>
12
<storageModule moduleId="cdt_indexer">
13
<indexEnabled indexValue="true"/>
14
<indexerProblemsEnabled indexProblemsValue="0"/>
15
</storageModule>
16
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
17
<buildTargets>
18
<target name="all" path="" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
19
<buildCommand>make</buildCommand>
20
<buildTarget>all</buildTarget>
21
<stopOnError>false</stopOnError>
22
<useDefaultCommand>true</useDefaultCommand>
23
</target>
24
<target name="clean" path="" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
25
<buildCommand>make</buildCommand>
26
<buildTarget>clean</buildTarget>
27
<stopOnError>false</stopOnError>
28
<useDefaultCommand>true</useDefaultCommand>
29
</target>
30
</buildTargets>
31
</storageModule>
32
<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.931178486" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig">
33
<externalSettings/>
34
<extensions>
35
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
36
</extensions>
37
</storageModule>
38
</cconfiguration>
39
</storageModule>
40
</cproject>
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIUtils.java
1
/**********************************************************************
2
 * $Id: LTIUtils.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIUtils.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53
import java.io.*;
54

  
55
/**
56
 * Utilidades 
57
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
58
 * @version 0.0
59
 * @link http://www.gvsig.gva.es
60
 */
61
public class LTIUtils extends JNIBase{
62
	
63
	private native static double levelToMagNat(int level);
64
	private native void FreeLTIUtilsNat(long cPtr);
65
	
66
	public LTIUtils(){}
67
	
68
	/**
69
	 * Constructor
70
	 * @param cPtr	direcci?n de memoria al objeto OGRCurve de C. 
71
	 */
72
	
73
	public LTIUtils(long cPtr){
74
		this.cPtr=cPtr;
75
	}
76
	
77
	/**
78
	 * Destructor 
79
	 */
80
	
81
	protected void finalize(){
82
		if(cPtr != 0)
83
			FreeLTIUtilsNat(cPtr);
84
	}
85
	
86
	/**
87
	 * Convierte un valor de nivel en valor de ampliaci?n
88
	 * @throws MrSIDException
89
	 * @param level	el valor de nivel a convertir
90
	 * @return valor de ampliaci?n
91
	 */
92
	public static double levelToMag(int level)throws MrSIDException{
93
		
94
		 double mag = levelToMagNat(level);
95
		 
96
		 if(mag < 0)
97
		 	throw new MrSIDException("Error LTIUtils::levelToMag. Se obtuvo un valor erroneoen la llamada nativa levelToMag.");
98
		 else 
99
		 	return mag;
100
	}
101
	  
102
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIGeoCoord.java
1
/**********************************************************************
2
 * $Id: LTIGeoCoord.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIGeoCoord.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53
import java.io.*;
54

  
55
/**
56
 * Clase que representa a la informaci?n de georeferenciaci?n. Los datos que contiene son:
57
 * <UL>
58
 * <LI>esquina superior izquierda (X)</LI>
59
 * <LI>esquina superior izquierda (y)</LI>
60
 * <LI>resoluci?n en X</LI>
61
 * <LI>resoluci?n en Y</LI>
62
 * <LI>rotaci?n en X</LI>
63
 * <LI>rotaci?n en Y</LI>
64
 * </UL>
65
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
66
 * @version 0.0
67
 * @link http://www.gvsig.gva.es
68
 */
69
public class LTIGeoCoord {
70
	
71
	private double xUL;		//esquina superior izquierda (X)
72
	private double yUL;		//esquina superior izquierda (y)
73
	private double xRes;	//resoluci?n en X
74
	private double yRes;	//resoluci?n en Y
75
	private double xRot;	//rotaci?n en X
76
	private double yRot;	//rotaci?n en Y
77
	
78
	
79
	/**
80
	 * Devuelve la esquina superior izquierda (X)
81
	 */
82
	public double getX(){
83
		return xUL;
84
	}
85
	
86
	/**
87
	 * Devuelve la esquina superior izquierda (Y)
88
	 */
89
	public double getY(){
90
		return yUL;
91
	}
92
	
93
	/**
94
	 * Devuelve la resolucion en X
95
	 */
96
	public double getXRes(){
97
		return xRes;
98
	}
99
	
100
	/**
101
	 * Devuelve la resoluci?n en Y
102
	 */
103
	public double getYRes(){
104
		return yRes;
105
	}
106
	
107
	/**
108
	 * Devuelve la rotaci?n en X
109
	 */
110
	public double getXRot(){
111
		return xRot;
112
	}
113
	
114
	/**
115
	 * Devuelve la rotaci?n en Y
116
	 */
117
	public double getYRot(){
118
		return yRot;
119
	}
120
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/JNIBase.java
1
/**********************************************************************
2
 * $Id: JNIBase.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     JNIBase.java
5
 * Project:  JMRSID. Interfaz java to MrSID (Lizardtech).
6
 * Purpose:  Base class for classes that use JNI.
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib��ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53

  
54
/**
55
 * Clase base para todas las clases que contienen funcionalidades JNI.
56
 * 
57
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
58
 * @version 0.0
59
 * @link http://www.gvsig.gva.es
60
 */
61
public class JNIBase{
62
	
63
	protected long cPtr;
64
	
65
	private native int getIndexCountNat(long cPtr);
66
	private native int initializeNat(long cPtr);
67
	private native int getNumLevelsNat(long cPtr);
68
	private native int getWidthNat(long cPtr);
69
	private native int getHeightNat(long cPtr);
70
	private native int getStripHeightNat(long cPtr);
71
	private native int getNumBandsNat(long cPtr);
72
	private native int getColorSpaceNat(long cPtr);
73
	private native int getDataTypeNat(long cPtr);
74
	
75
	/**
76
	 * Funci�n que sirve como base para funcionalidades de mrsid que admiten como par�metro un entero y devuelven un entero.
77
	 * 
78
	 * @throws MrSIDException.
79
	 * @param msg1	Mensaje de error que se muestra cuando el puntero a objeto pasado es vacio.
80
	 * @param msg2	Mensaje de error que se muestra cuando el resultado de la llamada a la funci�n de gdal es menor o igual que 0.
81
	 */
82
	
83
	protected int baseSimpleFunction(int n,String msg1,String msg2)throws MrSIDException{
84
		
85
		int res = 0;
86
		
87
		if(cPtr <= 0)
88
		 	throw new MrSIDException(msg1);
89
		
90
		switch(n){
91
			case 0: res = getIndexCountNat(cPtr);break;
92
			case 1: res = initializeNat(cPtr);break;
93
			case 2: res = getNumLevelsNat(cPtr);break;
94
			case 3: res = getWidthNat(cPtr);break;
95
			case 4: res = getHeightNat(cPtr);break;
96
			case 5: res = getStripHeightNat(cPtr);break;
97
			case 6: res = getNumBandsNat(cPtr);break;
98
			case 7: res = getColorSpaceNat(cPtr);break;
99
			case 8: res = getDataTypeNat(cPtr);break;
100
		}
101
		
102
		if(res<0)
103
		 	throw new MrSIDException(msg2);
104
		 else return res;
105
	}
106
	
107
	/**
108
	 * Devuelve el puntero a memoria del objeto en C.
109
	 */
110

  
111
	public long getPtr(){
112
		return cPtr;
113
	}
114

  
115
		
116
	/**
117
	 * Carga de la libreria jmrsid  
118
	 */ 
119
	
120
	static{
121
		
122
		System.loadLibrary("jmrsid2.0.0");
123
		
124
	}
125
		
126
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIImageReader.java
1
/**********************************************************************
2
 * $Id: LTIImageReader.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIImageReader.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:  Dataset's Basic Funcions. 
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53
/**
54
 * Clase base que contiene los elementos para lectura de una im?gen.
55
 * 
56
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
57
 * @version 0.0
58
 * @link http://www.gvsig.gva.es
59
 */
60
public class LTIImageReader extends LTIImageStage{
61
	
62
	private native void FreeLTIImageReaderNat(long cPtr);
63
	
64
	
65
	public LTIImageReader(){}
66
		
67
	
68
	/**
69
	 * Constructor
70
	 * @param cPtr	direcci?n de memoria al objeto LTIImageReader de C. 
71
	 */
72
	
73
	public LTIImageReader(long cPtr){
74
		this.cPtr=cPtr;
75
	}
76
	
77
	/**
78
	 * Destructor 
79
	 */
80
	
81
	protected void finalize(){
82
		if (cPtr != 0)
83
			this.close();
84
	}
85
	
86
	/**
87
	 * Cierra el MrSIDImageReader
88
	 *
89
	 */
90
	public void close(){
91
		if(cPtr != 0){
92
			FreeLTIImageReaderNat(cPtr);
93
			cPtr = 0;
94
		}
95
	}
96
	
97
	/**
98
	 * Obtiene la altura del strip usado en la llamada read.
99
	 * 
100
	 * @throws MrSIDException
101
	 * @return altura del strip
102
	 */
103
	
104
	public int getStripHeight()throws MrSIDException{
105
		
106
		String msg1="Error en getStripHeight. No se ha obtenido un puntero valido a LTIImage";
107
		String msg2="La llamada nativa a getStripHeight ha devuelto un c?digo de error";
108
		return baseSimpleFunction(5,msg1,msg2);
109
		
110
	}
111
	
112
	
113
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIMetadataDatabase.java
1
/**********************************************************************
2
 * $Id: LTIMetadataDatabase.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIMetadataDatabase.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53

  
54

  
55
/**
56
 * Almacena los metadatos asociados a la im?gen.
57
 * 
58
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
59
 * @version 0.0
60
 * @link http://www.gvsig.gva.es
61
 */
62

  
63
public class LTIMetadataDatabase extends JNIBase{
64
	
65
	private native long getDataByIndexNat(long cPtr, int i);
66
	private native void FreeLTIMetadataDatabaseNat(long cPtr);
67
	
68
	public LTIMetadataDatabase(){}
69
	
70
	/**
71
	 * Constructor
72
	 * @param cPtr	direcci?n de memoria al objeto LTIMetadataDatabase de C. 
73
	 */
74
	public LTIMetadataDatabase(long cPtr){
75
		
76
		super.cPtr=cPtr;
77
	}
78
	
79
	/**
80
	 * Destructor 
81
	 */
82
	protected void finalize(){
83
		
84
		if(cPtr != 0)
85
			FreeLTIMetadataDatabaseNat(cPtr);
86
	}
87
		
88
		
89
	/**
90
	 * Devuelve el n?mero de entradas.
91
	 * @throws MrSIDException
92
	 * @return n?mero de metadatos
93
	 */
94
	public int getIndexCount()throws MrSIDException{
95
		
96
		String msg1="Error en getIndexCount. No se ha obtenido un puntero valido a LTIMetadataDatabase";
97
		String msg2="La llamada nativa a getIndexCount ha devuelto un c?digo de error";
98
		return baseSimpleFunction(0,msg1,msg2);
99
		
100
	}
101
	
102
	/**
103
	 * Obtiene una entrada de metadatos a partir de su ?ndice.
104
	 * @throws MrSIDException
105
	 * @param i	?ndice del metadato obtenido
106
	 * @return objeto que contiene la entrada seleccionada
107
	 */
108
	public LTIMetadataRecord getDataByIndex(int i)throws MrSIDException{
109
		
110
		if(cPtr == 0)
111
		 	throw new MrSIDException("Error en getDataByIndex. La referencia al objeto no es valida.");
112

  
113
		LTIMetadataRecord metadata=new LTIMetadataRecord(getDataByIndexNat(cPtr,i));
114
				
115
		if(metadata==null)
116
		 	throw new MrSIDException("Objeto LTIMetadataRecord nulo");
117
		
118
		return metadata;
119
		
120
	}
121
	
122
	
123
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIImageStage.java
1
/**********************************************************************
2
 * $Id: LTIImageStage.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIImageStage.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib��ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53

  
54
/**
55
 * Clase que a�ade funcionalidad para la decodificaci�n desde una imagen.
56
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
57
 * @version 0.0
58
 * @link http://www.gvsig.gva.es
59
 */
60
public class LTIImageStage extends LTIImage{
61
	
62
	
63
	private native int readNat(long cPtr, long cPtrscene, long cPtrobj_scenebuffer, long cPtrbuffer, LTISceneBuffer buffer);
64
	private native void readSceneNat(long cPtr, double x, double y, double w, double h, double mag, long reader, int wImg, int hImg, boolean flag, LTISceneBuffer buffer);
65
	private native void FreeLTIImageStageNat(long cPtr);
66
	
67
	public LTIImageStage(){}
68
	
69
	/**
70
	 * Constructor
71
	 * @param cPtr	direcci�n de memoria al objeto LTIImageStage de C. 
72
	 */
73
	public LTIImageStage(long cPtr){
74
		this.cPtr=cPtr;
75
	}
76
	
77
	/**
78
	 * Destructor 
79
	 */
80
	protected void finalize(){
81
		if(cPtr != 0)
82
			FreeLTIImageStageNat(cPtr);
83
	}
84
	
85
	/**
86
	 * Lee una escena desde una imagen.
87
	 * @throws MrSIDException
88
	 * @param scene	Objeto escena a leer
89
	 * @param buffer	buffer sobre el cual se almacenan los datos leidos
90
	 */
91
	public void read(LTIScene scene,LTISceneBuffer buffer)throws MrSIDException{
92

  
93
		if(scene==null || buffer==null)
94
			throw new MrSIDException("Los argumentos no pueden ser nulos");
95
		
96
		if (cPtr == 0)
97
			throw new MrSIDException("No se puede acceder al dato");
98
		
99
		int res = readNat(cPtr,scene.cPtr,buffer.cPtr,buffer.cPtrbuffer, buffer);
100
		
101
		if(res!=0)
102
			throw new MrSIDException("En el m�todo read se ha devuelto un c�digo "+res);
103
		
104
	}
105
	
106
	/**
107
	 * Lee una escena desde una imagen.
108
	 * @throws MrSIDException
109
	 */
110
	public LTISceneBuffer readScene(double x, double y, double w, double h, double mag, MrSIDImageReader reader, int wImg, int hImg, boolean flag)throws MrSIDException{
111
		LTISceneBuffer sbuf = new LTISceneBuffer(wImg, hImg, true);
112
		readSceneNat(cPtr, x, y, w, h, mag, reader.getPtr(), wImg, hImg, flag, sbuf);
113
		return sbuf;
114
	}
115
	
116
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIDataType.java
1
/**********************************************************************
2
 * $Id: LTIDataType.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIDataType.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53
/**
54
 * Clase que contiene las constantes asociadas a cada tipo de dato.
55
 * 
56
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
57
 * @version 0.0
58
 * @link http://www.gvsig.gva.es
59
 */
60
public class LTIDataType{
61
	
62
	  public static final int LTI_DATATYPE_INVALID  = 0;
63
	  public static final int LTI_DATATYPE_UINT8    = 1;
64
	  public static final int LTI_DATATYPE_SINT8    = 2;
65
	  public static final int LTI_DATATYPE_UINT16   = 3;
66
	  public static final int LTI_DATATYPE_SINT16   = 4;
67
	  public static final int LTI_DATATYPE_UINT32   = 5;
68
	  public static final int LTI_DATATYPE_SINT32   = 6;
69
	  public static final int LTI_DATATYPE_FLOAT32  = 7;
70
	  public static final int LTI_DATATYPE_FLOAT64  = 8;
71
	  
72
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIMetadataRecord.java
1
/**********************************************************************
2
 * $Id: LTIMetadataRecord.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIMetadataRecord.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53

  
54

  
55
/**
56
 * Representa una entrada de LTIMetadataDatabase correspondiente a un metadato
57
 * 
58
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
59
 * @version 0.0
60
 * @link http://www.gvsig.gva.es
61
 */
62
public class LTIMetadataRecord extends JNIBase{
63
	
64
	public static final int LTI_METADATA_DATATYPE_INT = 0;
65
	public static final int LTI_METADATA_DATATYPE_FLOAT = 1;
66
	public static final int LTI_METADATA_DATATYPE_STRING = 2;
67
		
68
	private native String getTagNameNat(long cPtr);
69
	private native int isScalarNat(long cPtr);
70
	private native int isVectorNat(long cPtr);
71
	private native int isArrayNat(long cPtr);
72
	private native int getDataTypeNat(long cPtr);
73
	private native String getScalarDataNat(long cPtr);
74
	private native StringArray getVectorDataNat(long cPtr);
75
	private native StringArray getArrayDataNat(long cPtr);
76
	private native int getNumDimsNat(long cPtr);
77
	private native int[] getDimsNat(long cPtr);
78
	private native void FreeLTIMetadataRecordNat(long cPtr);
79
	
80
	
81
	/**
82
	 * Destructor 
83
	 */
84
	protected void finalize(){
85
		if(cPtr != 0)
86
			FreeLTIMetadataRecordNat(cPtr);
87
	}
88
	
89
	public LTIMetadataRecord(){}
90
	
91
	/**
92
	 * Constructor
93
	 */
94
	public LTIMetadataRecord(long cPtr){
95
		
96
		super.cPtr=cPtr;
97
	}
98

  
99
	/**
100
	 * Obtiene el nombre de la entrada
101
	 * @throws MrSIDException
102
	 * @return nombre de la entrada
103
	 */
104
	public String getTagName()throws MrSIDException{
105
		
106
		if(cPtr == 0)
107
		 	throw new MrSIDException("Error en getTagName. La referencia al objeto no es valida.");
108

  
109
		String tagname = getTagNameNat(cPtr);
110
				
111
		if(tagname == null)
112
		 	throw new MrSIDException("No se ha devuelto un nombre de tag valido");
113
		
114
		return tagname;
115
	}
116
	
117
	/**
118
	 * Dice si el metadato es escalar o no.
119
	 * @throws MrSIDException
120
	 * @return true si es escalar y false si no lo es
121
	 */
122
	public boolean isScalar()throws MrSIDException{
123
		
124
		if (cPtr == 0)
125
		 	throw new MrSIDException("Error en getTagName. La referencia al objeto no es valida.");
126
		
127
		int res = isScalarNat(cPtr);
128
		
129
		if (res == 1)return true;
130
		else return false;
131
	
132
	}
133
	
134
	/**
135
	 * Dice si el metadato es vector o no.
136
	 * @throws MrSIDException
137
	 * @return true si es vector y false si no lo es
138
	 */
139
	public boolean isVector()throws MrSIDException{
140
		if(cPtr == 0)
141
		 	throw new MrSIDException("Error en isVector. La referencia al objeto no es valida.");
142

  
143
		int res = isVectorNat(cPtr);
144
		
145
		if(res==1)return true;
146
		else return false;
147
		
148
	}
149
	
150
	/**
151
	 * Dice si el metadato es array o no.
152
	 * @throws MrSIDException
153
	 * @return true si es array y false si no lo es
154
	 */
155
	public boolean isArray()throws MrSIDException{
156
		if(cPtr == 0)
157
		 	throw new MrSIDException("Error en getTagName. La referencia al objeto no es valida.");
158

  
159
		int res = isArrayNat(cPtr);
160
		
161
		if(res==1)return true;
162
		else return false;
163
		
164
	}
165
	
166
	/**
167
	 * Obtiene el tipo de datos
168
	 * @throws MrSIDException
169
	 * @return tipo de datos 
170
	 *<UL>    
171
	 *<LI>LTI_METADATA_DATATYPE_INVALID 0</LI> 
172
	 *<LI>LTI_METADATA_DATATYPE_UINT8 1</LI>
173
	 *<LI>LTI_METADATA_DATATYPE_SINT8 2</LI>
174
	 *<LI>LTI_METADATA_DATATYPE_UINT16 3</LI>
175
	 *<LI>LTI_METADATA_DATATYPE_SINT16 4</LI>
176
	 *<LI>LTI_METADATA_DATATYPE_UINT32 5</LI>
177
	 *<LI>LTI_METADATA_DATATYPE_SINT32 6</LI>
178
	 *<LI>LTI_METADATA_DATATYPE_UINT64 7</LI>
179
	 *<LI>LTI_METADATA_DATATYPE_SINT64 8</LI>
180
	 *<LI>LTI_METADATA_DATATYPE_FLOAT32 9</LI>
181
	 *<LI>LTI_METADATA_DATATYPE_FLOAT64 10</LI>
182
	 *<LI>LTI_METADATA_DATATYPE_ASCII 11</LI>
183
	 *</UL>
184
	 * 
185
	 */
186
	public int getDataType()throws MrSIDException{
187
		if(cPtr == 0)
188
		 	throw new MrSIDException("Error en getDataType. La referencia al objeto no es valida.");
189
		
190
		int res = getDataTypeNat(cPtr);
191
		
192
		if(res < 0)
193
			throw new MrSIDException("Error en getDataType. No se ha obtenido un tipo de datos valido");
194
		
195
		return res;
196
	}
197
	
198
	/**
199
	 * Obtiene el valor de un datos escalar en forma de String. La conversi?n a float, entero, ... 
200
	 * si fuera necesario es a cargo del cliente  
201
	 * @throws MrSIDException
202
	 * @return dato escalar
203
	 */
204
	public String getScalarData()throws MrSIDException{
205
		
206
		String datos=null;
207
		
208
		if(cPtr == 0)
209
		 	throw new MrSIDException("Error en getScalarData. La referencia al objeto no es valida.");
210
		
211
		datos = getScalarDataNat(cPtr);
212
		
213
		return datos;
214
	
215
	}
216
	
217
	/**
218
	 * Obtiene el valor del metadato de tipo vector en forma de vector de strings
219
	 * @throws MrSIDException
220
	 * @return vector de strings con los valores del metadato
221
	 */
222
	public String[] getVectorData()throws MrSIDException{
223
		if(cPtr == 0)
224
		 	throw new MrSIDException("Error en getVectorData. La referencia al objeto no es valida.");
225
		
226
		StringArray res = getVectorDataNat(cPtr);
227
		
228
		if(res != null)return res.array;
229
		else return null;
230
	}
231
	
232
	/**
233
	 * Obtiene el valor del metadato de tipo array en forma de vector de strings. Esta funci?n 
234
	 * colocar? todas las dimensiones del array en forma de vector
235
	 * @throws MrSIDException
236
	 * @return vector de strings con los valores del metadato
237
	 */
238
	public String[] getArrayData()throws MrSIDException{
239
		if(cPtr == 0)
240
		 	throw new MrSIDException("Error en getArrayData. La referencia al objeto no es valida.");
241

  
242
		StringArray res = getArrayDataNat(cPtr);
243
		
244
		if(res != null)return res.array;
245
		else return null;
246
	}
247
	
248
	/**
249
	 * Devuelve el n?mero de dimensiones del dataset
250
	 * @throws MrSIDException
251
	 * @return n?mero de dimensiones del dataset
252
	 */
253
	
254
	public int getNumDims()throws MrSIDException{
255
		
256
		if(cPtr == 0)
257
		 	throw new MrSIDException("Error en getNumDims. La referencia al objeto no es valida.");
258
		
259
		int res = getNumDimsNat(cPtr);
260
		
261
		if(res < 0)
262
		 	throw new MrSIDException("Error en getNumDims. El n?mero de dimensiones obtenido no es valido.");
263
		
264
		return res;
265
	}
266
	
267
	/**
268
	 * Obtiene la longitud de cada dimensi?n del dataset
269
	 * @throws MrSIDException
270
	 * @return array de enteros con la dimension de cada longitud
271
	 */
272
	 public int[] getDims()throws MrSIDException{
273
	 	
274
	 	if(cPtr == 0)
275
		 	throw new MrSIDException("Error en getDims. La referencia al objeto no es valida.");
276
	 	
277
	 	int[] res =  getDimsNat(cPtr);
278
	 	
279
	 	if(res==null || res.length==0)
280
	 		throw new MrSIDException("Error en getDims. No se ha podido obtener la longitud de las dimensiones.");
281
	 	
282
	 	return res;
283
	 }
284

  
285
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIPixel.java
1
/**********************************************************************
2
 * $Id: LTIPixel.java 3539 2006-01-09 12:23:20Z nacho $
3
 *
4
 * Name:     LTIPixel.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib??ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53

  
54
/**
55
 * Propiedades b?sicas de un pixel.
56
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
57
 * @version 0.0
58
 * @link http://www.gvsig.gva.es
59
 */
60
public class LTIPixel extends JNIBase{
61
	
62
   private native long LTIPixelNat(int eColorSpace, int nBands, int SampleType);	
63
   private native void FreeLTIPixelNat(long cPtr);
64
	
65
	/**
66
	 * Destructor 
67
	 */
68
	
69
	protected void finalize(){
70
		if(cPtr != 0)
71
			FreeLTIPixelNat(cPtr);
72
	}
73
	
74
	public LTIPixel(){}
75
	
76
   /**
77
    * Constructor a partir de su identificador de C.
78
    * @param cPtr	puntero al objeto creado en C.
79
    */
80
   
81
   public LTIPixel(long cPtr){
82
		
83
		super.cPtr=cPtr;
84
   }
85
	
86
   /**
87
    * Constructor
88
    * @param eColorSpace	Espacio de color
89
    * @param nBands	N?mero de bandas
90
    * @param eSampleType	
91
    */
92
   public LTIPixel(int eColorSpace, int nBands, int eSampleType)throws MrSIDException{
93
   	
94
   	 cPtr = LTIPixelNat(eColorSpace, nBands, eSampleType);
95
   	 
96
	 if(cPtr == 0)
97
			throw new MrSIDException("Error in native constructor LTIPixel");
98
   	 
99
   }
100
}
tags/v2_0_0_Build_2024/libraries/libjni-mrsid/src/main/java/es/gva/cit/jmrsid/LTIImage.java
1
/**********************************************************************
2
 * $Id: LTIImage.java 8460 2006-10-31 16:26:34Z nacho $
3
 *
4
 * Name:     LTIImage.java
5
 * Project:  JMRSID. Interface java to mrsid (Lizardtech).
6
 * Purpose:   
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
11
*
12
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
13
*
14
* This program is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU General Public License
16
* as published by the Free Software Foundation; either version 2
17
* of the License, or (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with this program; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
27
*
28
* For more information, contact:
29
*
30
*  Generalitat Valenciana
31
*   Conselleria d'Infraestructures i Transport
32
*   Av. Blasco Ib��ez, 50
33
*   46010 VALENCIA
34
*   SPAIN
35
*
36
*      +34 963862235
37
*   gvsig@gva.es
38
*      www.gvsig.gva.es
39
*
40
*    or
41
*
42
*   IVER T.I. S.A
43
*   Salamanca 50
44
*   46005 Valencia
45
*   Spain
46
*
47
*   +34 963163400
48
*   dac@iver.es
49
*/
50

  
51
package es.gva.cit.jmrsid;
52

  
53

  
54
/**
55
 * Clase base que representa a una im�gen.
56
 * 
57
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
58
 * @version 0.0
59
 * @link http://www.gvsig.gva.es
60
 */
61
public class LTIImage extends JNIBase{
62
	
63
	private int[] magsize=new int[2];
64
	private native long getMetadataNat(long cPtr);
65
	private native int getDimsAtMagWidthNat(long cPtr, double mag);
66
	private native int getDimsAtMagHeightNat(long cPtr, double mag);
67
	private native long getPixelPropsNat(long cPtr);
68
	private native long getBackgroundPixelNat(long cPtr);
69
	private native long getNoDataPixelNat(long cPtr);
70
	private native int getGeoCoordNat(long cPtr, LTIGeoCoord geocoord);
71
	private native void FreeLTIImageNat(long cPtr);
72
	private native double getMinMagnificationNat(long cPtr);
73
	private native double getMaxMagnificationNat(long cPtr);
74
	
75
	LTIGeoCoord geocoord=null;
76
	
77
	public LTIImage(){}
78
	
79
	/**
80
	 * Constructor
81
	 * @param cPtr	direcci�n de memoria al objeto LTIImage de C. 
82
	 */
83
	public LTIImage(long cPtr){
84
		this.cPtr=cPtr;
85
	}
86
	
87
	/**
88
	 * Destructor 
89
	 */
90
	protected void finalize(){
91
		if(cPtr != 0){
92
			FreeLTIImageNat(cPtr);
93
			cPtr = -1;
94
		}
95
	}
96
	
97
	
98
	/**
99
	 * Inicializa el objeto im�gen.
100
	 * @throws MrSIDException, IOException
101
	 */
102
	public void initialize()throws MrSIDException{
103

  
104
		String msg1="Error en initialize. El Open del MrSID no tuvo �xito";
105
		String msg2="La llamada nativa a initialize ha devuelto un c�digo de error";
106
		int codigo = 0;//super.baseSimpleFunction(1,msg1,msg2);
107
		
108
		if( codigo > 0)
109
			throw new MrSIDException("La llamada nativa a initialize ha devuelto el c�digo de error "+codigo);
110
			
111
	}
112
	
113
	
114
	/**
115
	 * Obtiene los metadatos de la im�gen.
116
	 * @throws MrSIDException, IOException
117
	 * @return Objeto LTIMetadataDatabase que contiene los metadatos de la im�gen
118
	 */
119
	public LTIMetadataDatabase getMetadata()throws MrSIDException{
120

  
121
		if(cPtr == 0)
122
			throw new MrSIDException("Error en getMetadataDatabase. El Open del MrSID no tuvo �xito");
123

  
124
		LTIMetadataDatabase metadata = new LTIMetadataDatabase(getMetadataNat(cPtr));
125

  
126
		if(metadata==null)
127
			throw new MrSIDException("Objeto LTIMetadataDatabase nulo");
128

  
129
		return metadata;
130
	}
131

  
132
	/**
133
	 * Obtiene el ancho de la im�gen.
134
	 * 
135
	 * @throws MrSIDException
136
	 * @return entero con el ancho de la im�gen
137
	 */
138
	public int getWidth()throws MrSIDException{
139
		
140
		String msg1="Error en getNumLevels. No se ha obtenido un puntero valido a LTIImage";
141
		String msg2="La llamada nativa a getNumLevels ha devuelto un c�digo de error";
142
		return baseSimpleFunction(3,msg1,msg2);
143
		
144
	}
145
	
146
	/**
147
	 * Obtiene el alto de la im�gen.
148
	 * 
149
	 * @throws MrSIDException
150
	 * @return alto de la im�gen
151
	 */
152
	public int getHeight()throws MrSIDException{
153
		
154
		String msg1="Error en getNumLevels. No se ha obtenido un puntero valido a LTIImage";
155
		String msg2="La llamada nativa a getNumLevels ha devuelto un c�digo de error";
156
		return baseSimpleFunction(4,msg1,msg2);
157
		
158
	}
159
	
160
	/**
161
	 * Obtiene el n�mero de bandas.
162
	 * 
163
	 * @throws MrSIDException
164
	 * @return n�mero de bandas
165
	 */
166
	public int getNumBands()throws MrSIDException{
167
		
168
		String msg1="Error en getNumBands. No se ha obtenido un puntero valido a LTIImage";
169
		String msg2="La llamada nativa a getNumBands ha devuelto un c�digo de error";
170
		return baseSimpleFunction(6,msg1,msg2);
171
		
172
	}
173
	
174
	/**
175
	 * Obtiene el tipo de espacio de color usado en la im�gen.
176
	 * 
177
	 * @throws MrSIDException
178
	 * @return entero que representa una constante de la clase LTIColorSpace. 
179
	 */
180
	public int getColorSpace()throws MrSIDException{
181
		
182
		String msg1="Error en getColorSpace. No se ha obtenido un puntero valido a LTIImage";
183
		String msg2="La llamada nativa a getColorSpace ha devuelto un c�digo de error";
184
		return baseSimpleFunction(7,msg1,msg2);
185
		
186
	}
187
	
188
	/**
189
	 * Obtiene el tipo de datos usado en la im�gen.
190
	 * 
191
	 * @throws MrSIDException
192
	 * @return entero que representa una constante de la clase LTIDataType. 
193
	 */
194
	public int getDataType()throws MrSIDException{
195
		
196
		String msg1="Error en getDataType. No se ha obtenido un puntero valido a LTIImage";
197
		String msg2="La llamada nativa a getDataType ha devuelto un c�digo de error";
198
		return baseSimpleFunction(8,msg1,msg2);
199
		
200
	}
201

  
202
	
203
	/**
204
	 * Obtiene el ancho y alto de la im�gen a partir de una valor de ampliaci�n dado.
205
	 * 
206
	 * @throws MrSIDException
207
	 * @return el ancho y alto de la im�gen
208
	 */
209
	public int[] getDimsAtMag(double mag)throws MrSIDException{
210
		
211
		if(cPtr == 0)
212
		 	throw new MrSIDException("Error en getDimsAtMag. El Open del MrSID no tuvo �xito");
213

  
214
		magsize[0]=getDimsAtMagWidthNat(cPtr,mag);
215
		magsize[1]=getDimsAtMagHeightNat(cPtr,mag);
216
		
217
		if(magsize[0] < 0 || magsize[1] < 0)
218
			throw new MrSIDException("Error en getDimsAtMag. El Open del MrSID no tuvo �xito");
219
				
220
		return magsize;
221
	}
222
	
223
	/**
224
	 * Obtiene las propiedades del pixel de la im�gen.
225
	 * @throws MrSIDException 
226
	 * @return un objeto de tipo LTIPixel conteniendo las propiedades
227
	 */
228
	 public LTIPixel getPixelProps()throws MrSIDException{
229
	 	
230
	 	if(cPtr == 0)
231
		 	throw new MrSIDException("Error en getPixelProps. El Open del MrSID no tuvo �xito");
232

  
233
	 	LTIPixel props=new LTIPixel(getPixelPropsNat(cPtr));
234
	 	
235
	 	if(props == null)
236
	 		throw new MrSIDException("Error en getPixelProps. No se ha podido obtener LTIPixel");
237
	 	
238
	 	return props;
239
	 	
240
	 }
241
	 
242
	 /**
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff