svn-gvsig-desktop / trunk / libraries / libjni-mrsid / src / ltipixel.cpp @ 837
History | View | Annotate | Download (2.14 KB)
1 |
/**********************************************************************
|
---|---|
2 |
* $Id: ltipixel.cpp 720 2004-12-28 16:18:01Z igbrotru $
|
3 |
*
|
4 |
* Name: ltipixel.c
|
5 |
* Project: JMRSID. Interfaz java to MrSID (Lizardtech).
|
6 |
* Purpose:
|
7 |
* Author: Nacho Brodin, brodin_ign@gva.es
|
8 |
*
|
9 |
**********************************************************************/
|
10 |
/*Copyright (C) 2004 Nacho Brodin <brodin_ign@gva.es>
|
11 |
|
12 |
This program is free software; you can redistribute it and/or
|
13 |
modify it under the terms of the GNU General Public License
|
14 |
as published by the Free Software Foundation; either version 2
|
15 |
of the License, or (at your option) any later version.
|
16 |
|
17 |
This program is distributed in the hope that it will be useful,
|
18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
GNU General Public License for more details.
|
21 |
|
22 |
You should have received a copy of the GNU General Public License
|
23 |
along with this program; if not, write to the Free Software
|
24 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
25 |
*/
|
26 |
|
27 |
|
28 |
#include <jni.h> |
29 |
#include "es_gva_cit_jmrsid_LTIPixel.h" |
30 |
#include "es_gva_cit_jmrsid_JNIBase.h" |
31 |
|
32 |
#include "lt_types.h" |
33 |
#include "lt_base.h" |
34 |
#include "lt_fileSpec.h" |
35 |
#include "lti_geoCoord.h" |
36 |
#include "lti_pixel.h" |
37 |
#include "lti_navigator.h" |
38 |
#include "lti_sceneBuffer.h" |
39 |
#include "lti_metadataDatabase.h" |
40 |
#include "lti_metadataRecord.h" |
41 |
#include "lti_utils.h" |
42 |
#include "MrSIDImageReader.h" |
43 |
#include "J2KImageReader.h" |
44 |
#include "lti_imageReader.h" |
45 |
#include "lti_sceneBuffer.h" |
46 |
#include "lti_scene.h" |
47 |
//#include "cpl_conv.h"
|
48 |
#include "TIFFImageWriter.h" |
49 |
|
50 |
LT_USE_NAMESPACE(LizardTech); |
51 |
|
52 |
/******************************************************************************/
|
53 |
// Constructor LTIPixel
|
54 |
/******************************************************************************/
|
55 |
|
56 |
|
57 |
JNIEXPORT jlong JNICALL Java_es_gva_cit_jmrsid_LTIPixel_LTIPixelNat |
58 |
(JNIEnv *env, jobject obj, jint eColorSpace, jint nBands, jint eSampleType){ |
59 |
|
60 |
LTIPixel *poPixel; |
61 |
jlong jresult = 0 ;
|
62 |
|
63 |
poPixel = new LTIPixel((LTIColorSpace)eColorSpace, (lt_uint16)nBands, (LTIDataType)eSampleType );
|
64 |
|
65 |
*(LTIPixel **)&jresult = poPixel; |
66 |
|
67 |
return jresult;
|
68 |
} |
69 |
|