1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
INSTALLATION
============
Quick start for Debian/Linux installing libbiosig:
# Compile-Time Requirements
apt-get install libb64-dev
optional:
apt-get install libsuitesparse-dev zlib1g-dev libtinyxml-dev libdcmtk-dev
# Runtime requirements
apt-get install libb64 zlib1g
optional:
apt-get install libsuitesparse libtinyxml libdcmtk8
# Installation (for users):
download source release and run
VER=2.0.2
wget https://sourceforge.net/projects/biosig/files/BioSig\ for\ C_C\+\+/src/biosig4c\+\+-$VER.src.tar.gz
tar xvf biosig4c++-$VER.src.tar.gz
cd biosig4c++-$VER
./configure && make && sudo make install
# Installation for developers:
## latest development version
git clone https://git.code.sf.net/p/biosig/code biosig-code
cd biosig-code
autoreconf -fi # only needed if autoconf files have been changed
./configure # only needed if configuration has changed
make && sudo make install
## or if
git pull
make distclean
autoreconf -fi # only needed if autoconf files have been changed
./configure # only needed if configuration has changed
make && sudo make install
# compiling of mexbiosig for Matlab and Octave
MATLABDIR=/usr/local/MATLAB/R20##x/bin make mex4m
make mex4o
# generating an octave package
make mexbiosig
start octave and run
pkg install mex/mexbiosig-X.Y.Z.src.tar.gz
If libbiosig is available on your OS, you can also start octave and run
pkg install https://pub.ist.ac.at/~schloegl/biosig/prereleases/mexbiosig-1.9.2.src.tar.gz
# Compiling for python
make python
# Compiling save2gdf and biosig_fhir
make tools
sudo make install_tools
# Monitoring of flow sensor
./flowmon2 -d `ls /dev/ttyUSB*`
### The information below might be outdated - it's not removed yet because it might still contain some useful hints ###
General remarks:
----------------
Prerequisites:
--------------
P0) gnu c compiler (gcc, g++, gnu make, gawk). It will work on unix like systems (Linux, BSD, etc)
mingw, cygwin.
and NO, MSVC is not suitable for compiling libbiosig !!!
P1) for building libbiosig, save2gdf, mma (mathematica) and mex (matlab)
sudo apt-get install subversion libz-dev libsuitesparse-dev libcurl-dev gawk g++ gcc
svn co https://biosig.svn.sourceforge.net/svnroot/biosig/trunk/biosig4c++
For ttl2trig, also the package
libasound-dev
is required.
P2) for building SigViewer
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-qt3support
svn co https://sigviewer.svn.sourceforge.net/svnroot/sigviewer/trunk sigviewer
P3) Cross-compilation on Linux for Win32/Win64-target:
aptitude install -R autoconf automake bash bison bzip2 \
cmake flex g++ intltool make sed \
libtool openssl libssl-dev \
libxml-parser-perl patch perl \
pkg-config scons unzip wget \
xz-utils yasm mercurial
git clone https://github.com/schloegl/mxe.git
cd mxe
make biosig stimfit
Platform specific information
-----------------------------
# Linux
You need GNU gcc, g++ (ver>4.0), make, zlib (if you do not have zlib, do not define WITH_ZLIB),
libsuitesparse (if you do not have libsuitesparse, do not define WITH_CHOLMOD).
Running make compiles the converter.
make # makes the file format converter
make save2gdf # makes the file format converter
make win32 # makes the file format converter for Win32
make win64 # makes the file format converter for Win64
make physicalunits # makes the en/decoder for physical units
make lib # makes library
make mex4o # makes mexSLOAD for Octave (requires Octave-headers2.9 or higher)
make mex4m # makes mexSLOAD for Matlab (path_to_mex need to be defined in Makefile)
make biosig4python # compiles the BioSig interface for Python (requires SWIG and Python)
make all # all of the above
make sigviewer # recompiles SigViewer (requires qmake and Qt, the sources of sigviewer must be in ../sigviewer)
make testscp
make testhl7
make test # tests HL7<->SCP, SCP<->GDF, GDF<->HL7 converters
make test6 # tests bidirectional conversion between 6 differerent data formats
# Mac OS X (tested under 10.7 Lion)
1. First, get Xcode from the App Store. You need to create an Apple Developer Account (which is free) to install the command line tools (see next step).
2. In Xcode, go to Preferences - Downloads - Components - Install Command Line Tools.
3. Install MacPorts from http://www.macports.org/.
4. In a terminal, type "sudo port install gawk".
5. In a terminal, type "sudo port install SuiteSparse".
Optional (if you want a good IDE, this is recommended):
6. Install Eclipse from http://www.eclipse.org/.
7. Install CDT (in Eclipse, go to Help - Install New Software...).
Activate the CDT repository by clicking on "Available Software Sites" and activate "CDT Juno".
After clicking OK, select "-- All Available Sites --" and install "CDT Main Features".
8. In Eclipse, go to Preferences - C/C++ - Build - Environment - Add...
Enter PATH in the Name text box and /opt/local/bin:/opt/local/sbin in the Value text box.
9. To load the project, go to File - New - Makefile Project with Existing Code.
Fill in the name of the project (for example, biosig4c++) and enter the root folder containing the source code of biosig4c++.
10. In the Project Explorer, you can now right-click on the project and choose Clean or Build to start compiling the project.
# MinGW Crosscompiler on Debian/Ubuntu for Windows
- aptitude install mingw32 mingw32-binutils mingw32-runtime
# mxe/mce-w64 on GNU/Linux for Windows
Prerequisites P3) and/or P4) (see above)
- modify Makefile and set variable CROSS for Win32 (and CROSS64 for Win64) to the proper value e.g.
CROSS = $(HOME)/src/mxe/usr/bin/i686-pc-mingw32
CROSS64 = $(HOME)/src/mce-w64/usr/bin/x86_64-w64-mingw32
- run the command
make win32/save2gdf.exe # converter between data formats
make win32/libbiosig.dll # dynamic library
make win32/libbiosig.a # static library
make win32mma # Win32/Mathematica interface
make mexw32 # Win32/Matlab mex interface
make win32 # all of the above
make win64/save2gdf.exe # converter between data formats 64bit Windows
make mexw64 # Win64/Matlab mex interface
# Windows + MinGW
Prerequisites P5) (see above)
Support for FEF, ZLIB, CHOLMOD is turned off, because of lack of support in MinGW.
In general, Makefile.win32 should be used.
- Run the make command
make -f Makefile.win32 libbiosig.a
make -f Makefile.win32 save2gdf.exe
make -f Makefile.win32 sigviewer
make -C mma -f Makefile.win32 sload.exe # mathematica interface
You can also start compilation of sigviewer.
First, you need to have the sigviewer sources in ..\sigviewer and
Then, you need to run once qmake in ..\sigviewer\src\
make -f Makefile.win32 sigviewer
# Matlab/Win32 using MinGW on Windows
do the steps in "Windows+MinGW"
install and configure gnumex (from http://gnumex.sf.net)
make libbiosig.a
start matlab
>> gnumex % configure mingw for mex
>> mex mexSLOAD.cpp libbiosig \mingw\lib\libws2_32.a
# Mathematica/Win32 using MinGW on Windows
Adapt user-specified variables (directory names) in Makefile.win32 and mma/Makefile.win32
cd biosig4c++/mma
make -f Makefile.win32 sload.exe
# Windows + Cygwin
Currently, only the file converter save2gdf is supported.
- install Cygwin
- within Cygwin install gcc4 g++4, zlib, suitesparse/cholmod and make
- run the make command
make save2gdf
# MSVC - Microsoft Visual C++
MSVC is currently not supported. You are on your own.
# Other platforms (Windows+MSVC, MacOSX, Solaris, etc. )
some tests on other Unix-like systems have been successful.
Installation:
-------------
run as root
make
make install # installs save2gdf, save2scp, save2aecg,
make install_octave # installs mexSLOAD.mex in /usr/local/share/octave/site-m/
make install_sigviewer # installs sigviewer
Execution:
----------
# if test.gdf exists, some header information is displayed
save2gdf test.gdf
# help and usage information
save2gdf -h
# converts a data file into a GDF format (destination
save2gdf PFE103.scp t5.gdf
# converts a data file into a SCP format (destination
save2scp t5.gdf t5.scp
save2gdf -f=SCP t5.gdf t5.scp
# converts a data file into a HL7aECG format (destination
save2aecg t5.gdf t5.hl7
save2gdf -f=HL7aECG t5.gdf t5.hl7
# load matlab into octave or matlab
start octave or matlab
addpath path_to_mexSLOAD.mex
[data,HDR] = mexSLOAD(filename); % loads data and header information
Development & Testing:
----------------------
There are several testing functions included.
The following commands test the converter and should finish without errors.
make test
make testhl7
make testscp
make test6
The Octave/Matlab script
test0/test01.m
tests whether the various data formats give the same results
or whether some conversion error has been included.
Copyright (C) 2005-2013, Alois Schloegl <alois.schloegl@gmail.com>
This function is part of the "BioSig for C/C++" repository
(BioSig4C++) at http://biosig.sf.net/
|