Metadata-Version: 2.4
Name: niicat
Version: 0.6.0
Summary: Preview nifti images on the terminal
Home-page: https://github.com/MIC-DKFZ/niicat/
Author: Jakob Wasserthal
Author-email: j.wasserthal@dkfz.de
License: GPL v2
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: nibabel>=2.3.0
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: Pillow
Requires-Dist: importlib-metadata; python_version < "3.8"
Provides-Extra: libsixel
Requires-Dist: libsixel-python; extra == "libsixel"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# niicat

This is a tool to quickly preview nifti images on the terminal. 
This can be helpful if you are working on a remote server via SSH and do not have
a -X connection. Niicat can also display png, jpg or similar images.

Your terminal must support inline images. Ubuntu's default terminal (GNOME Terminal / Ptyxis),
Apple Terminal, and Alacritty do not. When using SSH, it is the terminal on your local machine
that must support the protocol.

| Flag | Protocol | Works in |
|------|----------|----------|
| (default) | iTerm2 imgcat | [iTerm2](https://iterm2.com/), WezTerm, VS Code (enable `terminal.integrated.enableImages`) |
| `-kt` | [Kitty graphics](https://sw.kovidgoyal.net/kitty/graphics-protocol) | [Kitty](https://sw.kovidgoyal.net/kitty/), Ghostty, WezTerm |
| `-lb` / `-ls` | [Sixel](https://github.com/saitoha/libsixel) | mlterm, foot, WezTerm, Konsole, Windows Terminal, xterm (`-ti 340`) |


### Install:

```
pip install niicat
```


### Usage:

```
niicat T1.nii.gz
```

![](niicat/resources/example.gif)

If nothing is displayed, your terminal likely does not support the selected protocol.
Try another flag from the table above, or switch to a terminal that does.

`-lb` uses `img2sixel` from `libsixel-bin` (`sudo apt install libsixel-bin`).
`-ls` uses `libsixel-python`.

Niicat was only tested on python >= 3.7.


### Copyright

Copyright © German Cancer Research Center (DKFZ), Division of Medical Image Computing (MIC).
Please make sure that your usage of this code is in compliance with the [code license](LICENSE).
