Generate numerical phantoms.
Project description
Installation
pip install phantominator
About
Python package for easy generation of numerical phantoms. I often need a simple image to try something out on. In MATLAB, I would use the phantom command to quickly get something to work with. In Python, it’s not quite so easy, so I made this package that’s quick to install and use so there’s as little friction as possible. There are other implementations of Shepp-Logan available from other projects, but they are usually not as easy to install or include other things that I don’t want for this project.
This package offers both CT and MR versions.
Usage
Basic usage:
# CT phantom
from phantominator import shepp_logan
ph = shepp_logan(128)
# MR phantom (returns proton density, T1, and T2 maps)
M0, T1, T2 = shepp_logan((128, 128, 20), MR=True)
# Dynamic (concentric circles), 20 time frames
from phantominator import dynamic
ph = dynamic(128, 20)
Also see the examples module and docstrings. The interface for CT phantom generation is similar to MATLAB’s phantom function.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for phantominator-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ade44247f6006138e0670c003ae888d99f6d64467cf9e6fc0d2e993a07d4e960 |
|
MD5 | 7a44d2a0b6a28a372eb54f5fa7eecbc8 |
|
BLAKE2b-256 | 7f54e47dc9949750ed5e71b8c4e8313a50ac6ef37bc86b83f36ec7447133316c |