HDFJava Products Peter Cao The HDF Group HDF
- Slides: 24
HDF-Java Products Peter Cao The HDF Group HDF and HDF-EOS Workshop XII October 15, 2008 October 15 -17, 2008 HDF and HDF-EOS Workshop XII 1
What are the HDF-Java products? HDF-Java HDF Java Wrapper October 15 -17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 2
Java Wrapper HDF October 15 -17, 2008 HDF and HDF-EOS Workshop XII 3
Java Wrapper Pure Java Library HDF Java Native Interface a programming framework that allows Java code to call and be called by applications and libraries written in other languages HDF October 15 -17, 2008 HDF and HDF-EOS Workshop XII 4
Pure Java Library • Pros: - True platform independence - Direct access to file (no data conversion between C and Java) Pure Java Library • Cons: HDF October 15 -17, 2008 - Substantial amount of work to implement - Hard to maintain (new features or format changes) HDF and HDF-EOS Workshop XII 5
HDF JNI • Pros: HDF Java Native Interface HDF October 15 -17, 2008 - Easy to implement - Easy to maintain • Cons: - Requires data conversion between C and Java - HDF JNI is platform dependent HDF and HDF-EOS Workshop XII 6
Java Wrapper Java Native Interface HDFLibrary. java H 5. java libjhdf. so (or dll) HDF 4 library October 15 -17, 2008 HDF and HDF-EOS Workshop XII libjhdf 5. so (or dll) HDF 5 library 7
Java Wrapper: C versus Java hid_t H 5 Fcreate ( const char *name, unsigned flags, hid_t create_id, hid_t access_id ); public static native int H 5 Fcreate ( String name, int flags, int create_id, int access_id); hid_t H 5 Fopen ( const char *name, unsigned flags, hid_t access_id ); public static native int H 5 Fopen ( String name, int flags, int access_id); herr_t H 5 Fclose ( hid_t file_id ); public static native int H 5 Fclose ( int file_id); C October 15 -17, 2008 Java HDF and HDF-EOS Workshop XII 8
Object Package HDF-Java HDF Java Wrapper October 15 -17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 9
Java Wrapper: simple dataset read int fid, did, sid, tid, rank; long dims[], max. Dims[]; Object the. Data; fid = H 5 Fopen( fname, HDF 5 Constants. H 5 F_ACC_RDWR, did = H 5 Dopen(fid, dname); sid = H 5 Dget_space(did); tid = H 5 Dget_type(did); rank = H 5 Sget_simple_extent_ndims(sid); HDF 5 Constants. H 5 P_DEFAULT); dims = new long[rank]; max. Dims = new long[rank]; H 5 Sget_simple_extent_dims(sid, dims, max. Dims); the. Data = allocate. Array(tid, dims); H 5 Dread( did, tid, HDF 5 Constants. H 5 S_ALL, HDF 5 Constants. H 5 P_DEFAULT, the. Data); H 5 Sclose(sid); H 5 Tclose(tid); H 5 Dclose(did); H 5 Fclose(fid); October 15 -17, 2008 HDF and HDF-EOS Workshop XII 10
Object Package: the easy way the. Data = Dataset. read(); October 15 -17, 2008 HDF and HDF-EOS Workshop XII 11
Object Package: main purposes • Simplifies access to HDF files • Separates applications from libraries - Modular design - Client server model • Makes testing and maintenance easy October 15 -17, 2008 HDF and HDF-EOS Workshop XII 12
Object Package: levels of objects Abstract classes�� Common Objects ncsa. hdf. object jhdfobj. jar HDF 4 Implementation�� ncsa. hdf. object. h 4 jhdf 4 obj. jar October 15 -17, 2008 HDF and HDF-EOS Workshop XII HDF 5 ncsa. hdf. object. h 5 jhdf 5 obj. jar 13
Object Package: abstract classes File. Format HObject Dataset Group Scalar. DS October 15 -17, 2008 HDF and HDF-EOS Workshop XII Compound. DS 14
Object Package: HDF 4 implementation Group H 4 Group Scalar. DS H 4 SDS H 4 GRImage Compoun. DS H 4 Vdata H 4 File. Format October 15 -17, 2008 HDF and HDF-EOS Workshop XII 15
Object Package: HDF 5 implementation Group Scalar. DS H 5 Group H 5 Scalar. DS Compoun. DS H 5 Compound. DS H 5 File. Format October 15 -17, 2008 HDF and HDF-EOS Workshop XII 16
Object Package: file create import ncsa. hdf. object. *; public class H 5 File. Create { private static String fname = "H 5 File. Create. h 5"; public static void main( String args[] ) throws Exception { File. Format file. Format = File. Format. get. File. Format(File. Format. FILE_TYPE_HDF 5); file. Format. create. File(fname, File. Format. FILE_CREATE); } } October 15 -17, 2008 HDF and HDF-EOS Workshop XII 17
HDFView HDF-Java HDF Java Wrapper October 15 -17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 18
HDFView: basic components October 15 -17, 2008 HDF and HDF-EOS Workshop XII 19
HDFView: GUI components Tree. View HDFView (GUI) Meta. Data. View User. Imp Table. View Image. View Text. View User. Imp October 15 -17, 2008 HDF and HDF-EOS Workshop XII 20
HDFView: all together October 15 -17, 2008 HDF and HDF-EOS Workshop XII 21
What are the HDF-Java products? HDF-Java HDF Java Wrapper October 15 -17, 2008 Object Package HDF and HDF-EOS Workshop XII Viewer Editor 22
Thank You! This report is based upon work supported in part by a Cooperative Agreement with the National Aeronautics and Space Administration (NASA) under NASA Awards NNX 06 AC 83 A and NNX 08 AO 77 A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Aeronautics and Space Administration. October 15 -17, 2008 HDF and HDF-EOS Workshop XII 23
Questions/comments? October 15 -17, 2008 HDF and HDF-EOS Workshop XII 24
- Thế nào là hệ số cao nhất
- It symbolizes roughness and fierceness
- Functional vs innovative products examples
- Pepsi vs coke brands
- Eandomi
- Hdf dataset
- Hdf explorer
- Hdf explorer
- Hdf server
- Hdf filter
- Snuipp hdf
- Hdf cloud
- Hdf cloud
- Modis
- Hdf matlab
- Ter hdf
- Hdf clogin
- Hình ảnh bộ gõ cơ thể búng tay
- Frameset trong html5
- Bổ thể
- Tỉ lệ cơ thể trẻ em
- Chó sói
- Tư thế worm breton
- Hát lên người ơi
- Các môn thể thao bắt đầu bằng tiếng đua