You can install the package directly from pypi using pip:
pip install mritkNote that it is recommended to use a virtual environment when installing the package, to avoid conflicts with other packages. You can create a virtual environment using venv:
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install mritkSome features of mritk require additional dependencies. You can install these extra dependencies using pip with the appropriate extras syntax.
- The show command: To use the
showcommand for visualizing MRI data in the terminal, you need to install thetextual-image,pillowandmatplotlibpackages. You can do this with the following command:
pip install mritk[show]- The napari command: To use the
naparicommand for visualizing MRI data in the Napari viewer, you need to install thenaparipackage. You can do this with the following command:
pip install mritk[napari]If you want to contribute to the development of mritk, you can install the package in editable mode. This allows you to make changes to the source code and have them reflected immediately without needing to reinstall the package (see also the Contributing guide for more info).
git clone https://github.com/scientificcomputing/mri-toolkit.git
cd mri-toolkit
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install -e .It is also possible the package directly from GitHub without cloning the repository:
pip install git+https://github.com/scientificcomputing/mri-toolkit.gitIf you intend to use the command line interface, you may want to install the package in an isolated environment using pipx. You can do this with the following command:
pipx install mritk