Metadata-Version: 2.1
Name: tse_motion
Version: 0.2.8.5
Summary: A package to rate motion artifacts in medical images.
Home-page: https://github.com/jinghangli98/tse-rating
Author: Jinghang Li
Author-email: jinghang.li@pitt.edu
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: monai
Requires-Dist: nibabel
Requires-Dist: torchvision
Requires-Dist: argparse

# Installation
```
pip install tse-motion
```
# CLI

```
rate-motion <path_to_nifti_file>
gen-motion <path_to_nifti_file> <output_file_name>

```
# Python
```python
from tse_rating.utils import rate, segment
img = nib.load('tse.nii.gz').get_fdata()
score = rate_motion_artifact(img)

score, grad_cam = rate_motion_artifact(img, save_gradcam=True)

masks = segment(nib.load('tse.nii.gz')) # returns a [2, W, H, Z] 4-dimensional tensor with the first and the second channel containing the left and the right hippocampus
mask = segment(nib.load('tse.nii.gz').get_fdata()[:,:,10]) # returns a [2, W, H] 3-dimensional tensor with the first and the second channel containing the left and the right hippocampus

```
