Gif Your Nifti: A Simple Solution for Creating GIFs from NIfTI Images
Gif Your Nifti is an ingenious tool designed to generate visually appealing GIFs from NIfTI (.nii
or .nii.gz
) files with ease. The project aims to effortlessly convert brain imaging data into GIF animations, allowing users to explore and share their medical imaging findings in a more accessible format.
Getting Started
Dependencies
Before diving into using Gif Your Nifti, users need to ensure they have the necessary dependencies installed. These include:
- NumPy (version 1.14.2)
- NiBabel (version 2.2.1)
- matplotlib (version 2.2.0)
- imageio (version 2.2.0)
- scikit-image (version 0.13.0)
Installation
The simplest way to get started is by installing Gif Your Nifti directly from its GitHub repository:
pip install git+https://github.com/miykael/gif_your_nifti.git
For developers looking to contribute, cloning the repository and installing via requirements is an option:
pip install .
# or
pip install -r requirements.txt
For those who prefer using Docker, creating and running a container is also supported.
Creating GIFs
Gif Your Nifti offers several modes to create various types of GIFs:
- Grayscale GIF: A basic grayscale animation can be generated effortlessly.
- Pseudocolor GIF: Users can apply different color mappings to enhance the visual appeal.
- Depth GIF: This mode adds a visual depth layer, indicating the intensity changes between slices.
- RGB GIF: Allows combining multiple NIfTI files to create a colorful GIF representation involving Red, Green, and Blue channels.
Resizing GIFs
Users can adjust the size of their GIFs by specifying a size parameter, allowing more control over the final output's dimensions and playback speed.
Usage Within a Python Script
For those who wish to integrate Gif Your Nifti into their workflows, it is possible to utilize its functionalities directly from a Python script. Example scripts can be found within the repository to guide users on how to programmatically leverage this tool.
License
Gif Your Nifti is distributed under the BSD 3-Clause License, encouraging broad usage and collaboration in the development community.
In summary, Gif Your Nifti stands out as a versatile tool for researchers and professionals working with NIfTI images, providing a straightforward path to converting complex medical imaging data into easily interpretable and shareable animations. Whether used via command line, integrated into a script, or run within a Docker container, Gif Your Nifti makes creating GIFs accessible to everyone.