Installation

morphMan (morphological manipulation) is a collection of scripts to objectively manipulate morphological features of patient-specific vascular geometries. The project is accessible through GitHub, Anaconda, and conda-forge .

Compatibility and Dependencies

The general dependencies of morphMan are

  • VMTK 1.5.0
  • VTK 9.1.0
  • Numpy 1.23
  • SciPy 1.8.1
  • Python >=3.8

Basic Installation

We recommend that you can install morphMan through conda-forge. First, install Anaconda or Miniconda. Then execute the following command in a terminal window to add the conda-forge channel:

$ conda config --add channels conda-forge
$ conda config --set channel_priority strict

Once the conda-forge channel has been added, you can create a conda environment with morphman installed with:

$ conda create -n your_environment morphman

Note

Replace your_environment with the environment name.

You can then activate your environment by running conda activate your_environment or source activate your_environment. Now you are all set, and can start using morphMan. morphMan can be accessed by opening a Python console and typing:

>>> import morphman

which will give you access to every method within the framework. Alternatively you can use one of the six main methods of manipulation directly through the terminal, by typing:

$ morphman-[METHOD]

followed by the command line arguments for the selected method. A detailed explanation for usage of morphMan is described in Using morphMan.

Warning

Windows users may experience import errors from VMTK such as:

ImportError: DLL load failed while importing vtkvmtkSegmentationPython: The specified module could not be found.

A temporary fix is to comment out the following lines in the script vtkvmtk.py, commonly located in C:\Miniconda-x64\envs\your_environment\lib\site-packages\vmtk\vtkvmtk.py:

from .vtkvmtkSegmentationPython import *
from .vtkvmtkITKPython import *

or to use Dependency Walker to locate missing DLL files as suggested here.

Development version

Downloading

The latest development version of morphMan can be found on the official morphMan git repository on GitHub. Make sure Git is installed, which is needed to clone the repository. To clone the morphMan repository, navigate to the directory where you wish morphMan to be stored, type the following command, and press Enter:

$ git clone https://github.com/KVSlab/morphMan

If it not already present, this will install Python for you. After the source distribution has been downloaded, all the files required will be located in the newly created morphMan folder.

Building

In order to build and install morphMan, navigate into the morphMan folder, where a setup.py file will be located. First, make sure that all dependencies are installed. Then, building and installation of morphMan can be performed with pip by running the following command:

$ python -m pip install --editable .

The --editable flag installs the project in editable mode meaning that any changes to the original package will be reflected directly in your environment. Alternatively, morphMan can be installed using Python directly (deprecated):

$ python setup.py install