|
SMIL 1.1.2
|
Typical workflow for installing Smil from sources is :
cd /somewhere git clone https://github.com/MinesParis-MorphoMath mkdir -p build cd build
contrib/scripts to easy installation or requirements. The following shall work fine for Ubuntu, Debian, CentOS and Fedora source /etc/os-release sudo source ../smil/contrib/scripts/requirements-$ID.shThese scripts are also available at contrib/scripts
config-smil configuration script : ../smil/contrib/scripts/config-smil -h ../smil/contrib/scripts/config-smil --auto --test make -j 8 sudo make install
ccmake to fine tune Smil configuration : ccmake ../smil make -j 8 sudo make install
config-smil script and fine tune it with ccmake. $ ../smil/contrib/scripts/config-smil --help
config-smil
Usage :
config-smil [ options ] SourceDirectory
Options :
--help
This message
--prefix=prefix
This option defines the prefix where Smil will be installed.
Default value is /usr/local.
--addon=name,name,name,...
A comma separated list of Addons to enable
Default enabled Addons : Color Filters HoughTransform Chabardes StochasticWS FFT Parsimonious
--generic
Compile for a generic architecture. Default is to optimize for the
processor in the computer Smil is being compiled.
--auto
Optimize Smil generated code for the processor at this computer.
This is the default option.
--doc
--devdoc
Build doxygen documentation
--test
Add Makefile targets to build test programs (make test)
--package
Add Makefile targets to build Linux packages
-v
Verbose
-Dvar=value
Define CMake variables (use with care)
Example :
config-smil --addon=GraphCuts --prefix=/usr/local/Smil-27 /home/sources/smil
Author :
Jose-Marcio Martins da Cruz
See also :
Full Smil documentation at : https://smil.cmm.minesparis.psl.euThis area in the source tree contains some programs which, for some reason, aren't part of Smil core code : need particular external libraries, experimental, not fully validated, ...
This addons can be enabled/disabled at configuration time (with cmake or ccmake. Addons enabled by default at current release are : Color, Filters, StochasticWS, Parsimonious, ZhangSkel, FFT, HoughTransform and Chabardes.
This area in the source tree is reserved for programs created by final users.
To create your own module, just duplicate the SampleModule directory inside the UserModules directory, and replace all references to "SampleModule" by the name of your module. And adapt all files inside to fit your needs. We hope this example is quite self-explanatory.
Don't forget to enable UserModules at configuration time, with cmake or ccmake.
Running Smil under Anaconda has many advantages :
gcc, Python, Qt, ....The downside is that you'll need to install Smil from sources... but that's not that hard. Just follow these steps :
# get it (YYYY-MM is the year and month of the last release) wget https://repo.anaconda.com/archive/Anaconda3-YYYY.MM-Linux-x86_64.sh # launch the installer and answer all questions bash ./Anaconda3-YYYY.MM-Linux-x86_64.shYou'll need to login again to have your conda base environment available.
# the option "python=3.8" is useful if you want a particular version of Python
conda create -n smil python=3.8
conda activate smil
conda install gxx_linux-64 cmake swig \
libpng jpeg libtiff curl \
numpy ipython \
qt pyqt
conda install -c conda-forge qwt
cd /somewhere git clone https://github.com/MinesParis-MorphoMath mkdir -p build cd build
../smil/contrib/scripts/config-smil -h ../smil/contrib/scripts/config-smil --auto --prefix=/whatever/Smil-38 make -j 8 sudo make installYou'll need to add a
–prefix option to indicate where you want to install Smil. This may happen in two situations :export PYTHONPATH=/whatever/Smil-38/lib/Smil export LD_LIBRARY_PATH=$CONDA_PREFIX/lib
$ ipython Python 3.8.5 (default, Jul 28 2020, 12:59:40) Type 'copyright', 'credits' or 'license' for more information IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import smilPython as sp SMIL (Simple Morphological Image Library) 0.10.6-dev Copyright (c) 2011-2016, Matthieu FAESSEL and ARMINES Copyright (c) 2017-2024, CMM - Centre de Morphologie Mathematique All rights reserved. In [2]: im = sp.Image() In [3]: im.show()