{"id":13764543,"url":"https://github.com/openmeeg/openmeeg","last_synced_at":"2025-04-06T20:09:50.353Z","repository":{"id":2329280,"uuid":"3290574","full_name":"openmeeg/openmeeg","owner":"openmeeg","description":"A C++ package for low-frequency bio-electromagnetism solving forward problems in the field of EEG and MEG.","archived":false,"fork":false,"pushed_at":"2024-03-25T22:47:14.000Z","size":36922,"stargazers_count":70,"open_issues_count":58,"forks_count":49,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-03-26T07:15:42.314Z","etag":null,"topics":["bem","c-plus-plus","eeg","electromagnetism","forward-problem","meg"],"latest_commit_sha":null,"homepage":"http://openmeeg.github.io","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openmeeg.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2012-01-28T13:16:01.000Z","updated_at":"2024-04-02T18:37:09.432Z","dependencies_parsed_at":"2024-04-02T18:47:32.494Z","dependency_job_id":null,"html_url":"https://github.com/openmeeg/openmeeg","commit_stats":{"total_commits":2135,"total_committers":23,"mean_commits":92.82608695652173,"dds":0.5381733021077284,"last_synced_commit":"c9ac04b42dce7a76cd06d4c83cc21f4006efbd9f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmeeg%2Fopenmeeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmeeg%2Fopenmeeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmeeg%2Fopenmeeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmeeg%2Fopenmeeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openmeeg","download_url":"https://codeload.github.com/openmeeg/openmeeg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543589,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bem","c-plus-plus","eeg","electromagnetism","forward-problem","meg"],"created_at":"2024-08-03T16:00:22.505Z","updated_at":"2025-04-06T20:09:50.335Z","avatar_url":"https://github.com/openmeeg.png","language":"C++","funding_links":[],"categories":["Electromagnetism"],"sub_categories":["Sound"],"readme":"|GitHub Actions|_ |CodeQL|_ |CodeCov|_ |PyPIVersion|_ |condaVersion|_\n\n.. |GitHub Actions| image:: https://github.com/openmeeg/openmeeg/actions/workflows/build_and_test.yml/badge.svg\n.. _Github Actions: https://github.com/openmeeg/openmeeg/actions/workflows/build_and_test.yml\n\n.. |CodeQL| image:: https://github.com/openmeeg/openmeeg/workflows/CodeQL/badge.svg\n.. _CodeQL: https://github.com/openmeeg/openmeeg/actions/workflows/codeql-analysis.yml\n\n.. |CodeCov| image:: https://codecov.io/gh/openmeeg/openmeeg/branch/main/graph/badge.svg\n.. _CodeCov: https://codecov.io/gh/openmeeg/openmeeg\n\n.. |PyPIVersion| image:: https://badge.fury.io/py/openmeeg.svg\n.. _PyPIVersion: https://badge.fury.io/py/openmeeg\n\n.. |condaVersion| image:: https://anaconda.org/conda-forge/openmeeg/badges/version.svg\n.. _condaVersion: https://anaconda.org/conda-forge/openmeeg\n\nOpenMEEG: forward problems solver in the field of EEG and MEG\n=============================================================\n\n.. highlight:: console\n\nThe OpenMEEG software is a C++ package for solving the forward\nproblems of electroencephalography (EEG) and magnetoencephalography (MEG).\n\nOpenMEEG is distributed under the French opensource license CeCILL-B. It is\nintended to give users the freedom to modify and redistribute the software.\nIt is therefore compatible with popular opensource licenses such as the GPL\nand BSD licenses. The CeCILL-B license imposes to anybody distributing a\nsoftware incorporating OpenMEEG the obligation to give credits (by citing the\nappropriate publications), in order for all contributions to be properly\nidentified and acknowledged.\n\nCite this software\n------------------\n\nThe references to be acknowledged are ::\n\n    Gramfort A, Papadopoulo T, Olivi E, Clerc M. OpenMEEG: opensource software for quasistatic\n    bioelectromagnetics. Biomedical engineering online (2010) vol. 9 (1) pp. 45\n\n    Kybic J, Clerc M, Abboud T, Faugeras O, Keriven R, Papadopoulo T. Generalized head models for MEG/EEG: boundary element method\n    beyond nested volumes. Phys. Med. Biol. (2006) vol. 51 pp. 1333-1346\n\n.. image:: https://raw.githubusercontent.com/openmeeg/openmeeg.github.io/source/_static/inria.png\n\nInstall precompiled library and Python bindings\n-----------------------------------------------\n\nTo install OpenMEEG (along with the binary applications) via `anaconda \u003chttps://www.anaconda.com/download/\u003e`_ you can just do::\n\n    $ conda install -c conda-forge openmeeg\n\nPython wrappers can also be installed via `pip`::\n\n    $ pip install openmeeg\n\nOn Fedora::\n\n    $ dnf install openmeeg openmeeg-devel python2-openmeeg\n\nOn RHEL/CentOS 7, enable `EPEL repositories \u003chttps://fedoraproject.org/wiki/EPEL\u003e`_ and install::\n\n    $ yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n    $ yum install openmeeg openmeeg-devel python2-openmeeg\n\nAdditional repositories recommended on RHEL 7::\n\n    $ subscription-manager repos --enable \"rhel-*-optional-rpms\" --enable \"rhel-*-extras-rpms\"\n\nBuild OpenMEEG from source\n--------------------------\n\nOn any operating system, you should get the latest OpenMEEG source the usual way::\n\n    $ git clone https://github.com/openmeeg/openmeeg.git\n    $ cd openmeeg\n\nThen you need to get dependencies installed and configured for your operating system.\n\nBuilding on Linux\n^^^^^^^^^^^^^^^^^\n\nOn Debian/Ubuntu you will need to install the dependencies with (Fedora flavors can use a similar command)::\n\n    $ sudo apt install gcc g++ make cmake libopenblas-dev liblapacke-dev libmatio-dev libhdf5-dev\n\n*optionally*::\n\n    $ sudo apt install python3-numpy swig libvtk6-dev doxygen graphviz libcgal-dev\n\nthen::\n\n    $ ./build_tools/cmake_configure.sh\n    $ cmake --build build --config release\n\nThe ``cmake_configure.sh`` script should automatically set the build to configure\nPython using SWIG.\n\nBuilding on macOS\n^^^^^^^^^^^^^^^^^\nFor local debugging, it's easiest to use ``brew`` to install dependencies::\n\n    $ brew install hdf5 libmatio libomp swig openblas\n\nThen follow brew's suggestion to add to your paths (probably in ``.bash_profile`` or some similar place) with something like the following::\n\n    $ export PATH=\"$HOMEBREW_PREFIX/opt/llvm/bin:$PATH\n    $ export LDFLAGS=\"-L$HOMEBREW_PREFIX/opt/llvm/lib -L$HOMEBREW_PREFIX/opt/openblas/lib\"\n    $ export CPPFLAGS=\"-I$HOMEBREW_PREFIX/opt/llvm/include -I$HOMEBREW_PREFIX/opt/openblas/include\"\n\nThen you should be able to build as usual::\n\n    $ ./build_tools/cmake_configure.sh\n    $ cmake --build build --config release\n\nBuilding on Windows\n^^^^^^^^^^^^^^^^^^^\nOne configuration that makes Windows development easier is getting a usable\nBash shell under Windows properly configured to compile using Visual Studio.\nThe steps are roughly:\n\n1. Install some variant of `Visual Studio \u003chttps://visualstudio.microsoft.com/downloads/\u003e`__ (e.g., `2019 \u003chttps://visualstudio.microsoft.com/vs/older-downloads/\u003e`__), the community variants are free and should work.\n2. Install the `Git for Windows SDK \u003chttps://github.com/git-for-windows/build-extra/releases\u003e`_.\n3. Launch a ``x64 Native Tools Command Prompt for VS 2019`` (i.e., a variant of ``cmd``),\n   which can be done from the Start menu.\n4. Run ``C:\\git-sdk-64\\usr\\bin\\bash -l`` from within that prompt.\n\n.. note:: If you do not have access to Windows but need to debug it, consider\n          using the `Windows VM dev images \u003chttps://developer.microsoft.com/en-us/windows/downloads/virtual-machines/\u003e`__.\n\nFor dependencies on Windows, we make use of ``vcpkg``. The default generator\nis ``\"Visual Studio 17 2022\"``, if you would like to use 2019 then set::\n\n    $ export CMAKE_GENERATOR=\"Visual Studio 16 2019\"\n\nThen you can use our convenience script for setting up ``vcpkg``. From the ``openmeeg``\nroot, run::\n\n    $ source ./build_tools/setup_vcpkg_compilation.sh\n\nThen you need MKL or OpenBLAS. The easiest way to get this is to use our\nOpenBLAS download script (which will download to ``$PWD/openblas/64``) and set\nan envs var to tell ``cmake`` how to interface with it and how to find the DLL\nin the compiled library::\n\n    $ ./build_tools/download_openblas.sh\n    $ export CMAKE_PREFIX_PATH=$(cygpath -m $PWD/openblas/64)\n    $ export CMAKE_CXX_FLAGS=\"-I$(cygpath -m $PWD/openblas/64/include)\"\n    $ export PATH=$PATH:$PWD/openblas/64/lib\n\nThen you also need the path to the compiled libraries for tests to work::\n\n    $ export PATH=$PATH:$PWD/build/OpenMEEG/Release:$PWD/build/OpenMEEGMaths/Release\n\n.. note:: Consider adding ``export`` statements to your ``~.bashrc`` to\n          facilitate future debugging, but be sure to translate the ``$PWD``\n          to the actual Unix-formatted path on your system, e.g.::\n\n              export CMAKE_GENERATOR=\"Visual Studio 16 2019\"\n              export CMAKE_PREFIX_PATH=C:/Users/whoever/python/openmeeg/openblas/64\n              export CMAKE_CXX_FLAGS=\"-IC:/Users/whoever/python/openmeeg/openblas/64/include\"\n              export PATH=$PATH:/c/Users/whoever/python/openmeeg/openblas/64/lib:/c/Users/whoever/python/openmeeg/build/OpenMEEG/Release:/c/Users/whoever/python/openmeeg/build/OpenMEEGMaths/Release\n\nThen you can build as usual::\n\n    $ ./build_tools/cmake_configure.sh\n    $ cmake --build build --config release\n\nThe configure step will take a few minutes because this is the stage during\nwhich ``vcpkg`` builds dependencies (and HDF5 in particular takes some time).\nBut once it has completed, any subsequent ``./build_tools/cmake_configure.sh``\ncalls should be much faster because the completed dependency builds are stored\nin the ``vcpkg`` directory for future use.\n\nIf you ever have problems with DLL linkage, consider using::\n\n    $ ./build_tools/install_dependency_walker.sh\n    $ ./Dependencies/DependenciesGui.exe\n\nto examine issues with ``OpenMEEGMaths.dll`` for example.\n\nTesting\n^^^^^^^\nOnce you have a complete build in ``build``, you can test with::\n\n    $ cd build\n    $ ctest -C release || ctest -C release --rerun-failed --output-on-failure\n\nOptional build variables\n^^^^^^^^^^^^^^^^^^^^^^^^\nYou will need to define more CMake variables if you want the support for:\n\n`-DENABLE_PYTHON=ON`` (Python \u003e= 3.10 is required)\n    Enable Python wrapping (automatically enabled by cmake_configure.sh)\n`-DUSE_VTK=ON`\n    VTK file format support.\n`-DUSE_CGAL=ON`\n    CGAL meshing tools.\n`-DBUILD_DOCUMENTATION=ON`\n    Reference documentation. Make sure to have `doxygen` with `dot` support.\n`-DENABLE_WERROR=ON`\n    Treat compilation warnings as errors\n`-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache`\n    To speed up builds. `ccache` must be installed.\n\nInstallation\n^^^^^^^^^^^^\nIn usual cmake fashion, you can install with (and optionally with ``--install-prefix=...`` to install somewhere other than the default)::\n\n    $ cmake --build build --target install\n\nYou should now be able to run the *om_assemble* command and see something like this::\n\n    $ om_assemble\n    om_assemble version 2.5.5 compiled at Aug 26 2022 18:17:12\n\n    om_assemble [-option] [filepaths...]\n\n    option :\n       -HeadMat, -HM, -hm :\n           Compute Head Matrix for Symmetric BEM (left-hand side of linear system).\n           ...\n\nIn some Linux distributions (AMD64/X86_64) you may see some errors like this::\n\n    Error while loading shared libraries: libOpenMEEG.so.1: cannot open shared object file: No such file or directory\n\nYou need to ensure that the ``install`` target libraries (given the prefix that\nwas used) is in your library search path, e.g., by settincg ``LD_LIBRARY_PATH``\nor editing ``/etc/ld.so.conf`` and using ``sudo ldconfig``.\n\nYou can now give a try to OpenMEEG on the `sample dataset \u003chttps://github.com/openmeeg/openmeeg_sample_data/archive/master.zip\u003e`_.\n\nSupported Blas/Lapack Implementations\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nWe support `OpenBLAS \u003chttp://www.openblas.net/\u003e`_ and\n`Intel MKL \u003chttp://software.intel.com/en-us/intel-mkl/\u003e`_ on Linux, macOS, and Windows.\n\nUsing OpenMEEG\n--------------\n\nHave a look into the `tutorial \u003chttps://openmeeg.github.io/tutorial.html\u003e`_\nfor more info and for defining your geometry.\n\nCeCILL-B full license\n---------------------\n\nThis software is governed by the CeCILL-B license under French law and\nabiding by the rules of distribution of free software. You can use,\nmodify and/ or redistribute the software under the terms of the CeCILL-B\nlicense as circulated by CEA, CNRS and INRIA at the following URL\n\"http://www.cecill.info\".\n\nAs a counterpart to the access to the source code and rights to copy,\nmodify and redistribute granted by the license, users are provided only\nwith a limited warranty and the software's authors, the holders of the\neconomic rights, and the successive licensors have only limited\nliability.\n\nIn this respect, the user's attention is drawn to the risks associated\nwith loading, using, modifying and/or developing or reproducing the\nsoftware by the user in light of its specific status of free software,\nthat may mean that it is complicated to manipulate, and that also\ntherefore means that it is reserved for developers and experienced\nprofessionals having in-depth computer knowledge. Users are therefore\nencouraged to load and test the software's suitability as regards their\nrequirements in conditions enabling the security of their systems and/or\ndata to be ensured and, more generally, to use and operate it in the\nsame conditions as regards security.\n\nThe fact that you are presently reading this means that you have had\nknowledge of the CeCILL-B license and that you accept its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmeeg%2Fopenmeeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmeeg%2Fopenmeeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmeeg%2Fopenmeeg/lists"}