Skip to main content

Python bindings of the gems segmentation package.

Project description

charm-gems

PyPI version Linux Build MacOS Build Windows Build

This repository contains the gems C++ code and python bindings used in Freesurfer's Sequence-Adaptive Multimodal SEGmentation (SAMSEG) (Puonti et al., NeuroImage, 2016) and in SimNIBS 4.0 Complete Head Anatomy Reconstruction Method (CHARM) (Puonti et al., NeuroImage, 2020) to create individualized head models for electric field simulations.

Installation

The compiled charm-gems library is available via pip ≥ 19.3, for python 3.6, 3.7 and 3.8

pip install --upgrade pip
pip install charm-gems

Afterwards the package can be imported by calling

import charm_gems as gems

Manual Installation

Requirements

Preparation

This repository uses submodules. To start it, use

git submodule init
git submodule update

Linux/MacOS

  1. Build ITK
mkdir ITK-build
cd ITK-build
cmake \
    -DBUILD_SHARED_LIBS=OFF \
    -DBUILD_TESTING=OFF \
    -DBUILD_EXAMPLES=OFF \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=../ITK-install \
    ../ITK
make install
cd ..
  1. Install charm-gems
ITK_DIR=ITK-install python setup.py install

Windows (Tested on Visual Studio 2019)

  1. Build ITK
md ITK-build
cd ITK-build
cmake.exe ^
    -DBUILD_SHARED_LIBS=OFF ^
    -DBUILD_TESTING=OFF ^
    -DBUILD_EXAMPLES=OFF ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_INSTALL_PREFIX=..\ITK-install ^
    ..\ITK
cmake --build . --config Release --target Install
cd ..
  1. Install charm-gems
set ITK_DIR=ITK-install
python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

charm_gems-1.3.3-cp311-cp311-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

charm_gems-1.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

charm_gems-1.3.3-cp311-cp311-macosx_11_0_universal2.whl (4.8 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ universal2 (ARM64, x86-64)

charm_gems-1.3.3-cp310-cp310-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

charm_gems-1.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

charm_gems-1.3.3-cp310-cp310-macosx_12_0_x86_64.whl (4.8 MB view hashes)

Uploaded CPython 3.10 macOS 12.0+ x86-64

charm_gems-1.3.3-cp39-cp39-win_amd64.whl (2.8 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

charm_gems-1.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

charm_gems-1.3.3-cp39-cp39-macosx_12_0_x86_64.whl (4.8 MB view hashes)

Uploaded CPython 3.9 macOS 12.0+ x86-64

charm_gems-1.3.3-cp38-cp38-win_amd64.whl (2.9 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

charm_gems-1.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

charm_gems-1.3.3-cp38-cp38-macosx_12_0_x86_64.whl (4.8 MB view hashes)

Uploaded CPython 3.8 macOS 12.0+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page