[Kst] branches/work/kst/portto4/kst

Nicolas Brisset nicolas.brisset at eurocopter.com
Mon Mar 5 01:27:31 UTC 2012


SVN commit 1283503 by brisset:

Add support to Kst for Matlab's .mat format (v4 and v5), thanks to the excellent matio library (http://sourceforge.net/projects/matio/) by Christopher C. Hulbert.

This provides pretty complete support, with even the cmake module to check for matio and a small sample file to test. It still needs to be reviewed and tested in more depth, but it can read all the test files I've thrown at it 
and all the types of primitives:
- scalars
- vectors
- matrices
- strings (limited to char, due to missing support for UTF in matio for now)

Performance is pretty impressive, since Matlab stores the (binary) data on contiguous disk areas and can even compress them. I have generated vectors of 1 million points with octave and they load very fast (in the order of 1 s). 
It is all supported semalessly thanks to matio.

It looks like 2.0.5 will be a pretty nice release :-)

P.S.: I have added a HOWTO in the src/datasources dir to help people who would want to add support for other formats to get started.


 M  +5 -0      cmake/CMakeLists.txt  
 A             cmake/modules/FindMatio.cmake  
 M  +6 -0      cmake/src/datasources/CMakeLists.txt  
 AM            sample_data/matlab_basic_types.mat  
 A             src/datasources/HOWTO_add_a_datasource.txt  
 A             src/datasources/matlab (directory)  
 A             src/datasources/matlab/kstdata_matlab.desktop  
 AM            src/datasources/matlab/matfile_format.pdf  
 A             src/datasources/matlab/matlab.cpp   [License: GPL (v2+)]
 A             src/datasources/matlab/matlab.h   [License: GPL (v2+)]
 A             src/datasources/matlab/matlab.pro  
 A             tests/matlab.kst  


--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1283502:1283503
@@ -89,8 +89,13 @@
 if(kst_3rdparty)
   message(STATUS "3rd party libs for plugins--------------------")
   find_package(Getdata)
+  message(STATUS "")
   find_package(Gsl)
+  message(STATUS "")
   find_package(Netcdf)
+  message(STATUS "")
+  find_package(Matio)
+  message(STATUS "")
   find_package(CFITSIO)
   #find_package(Dmc)
   message(STATUS "----------------------------------------------")
--- branches/work/kst/portto4/kst/cmake/src/datasources/CMakeLists.txt #1283502:1283503
@@ -51,5 +51,11 @@
   #kst_link(${DMC_LIBRARIES})
 endif()
 
+if(matio)
+	include_directories(${MATIO_INCLUDE_DIR})
+	kst_add_plugin(. matlab) # Directory named after the file format, not the lib
+	kst_link(${MATIO_LIBRARIES})
+endif()
 
 
+


More information about the Kst mailing list