Skip to content

aemhd/convert-NIfTI-to-JPG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Quick Overview

  • Convert NIfTI images to jpg images.

Dependencies

  • nibabel : Used for reading NIfTI files.
  • Image : Used for saving data in jpg format.
  • numpy : Used for accessing multi-dimensional arrays and matrice.
  • gzip : Used for accessing compressed file (nii.gz) files.
  • tempfile : Used for creating and managing temp files while conversion.
  • shutil : Used for files operations like Copy and Moving.
  • os : Used for listing directory files.

Assumptions

This code is working on compressed NIfTI (extension .nii.gz). For working on uncompressed NIfTI files, just replace the gzip.open funtion with open

How to Use

Call the function and only pass the folder that contains the nii.gz files.

Example:

nii_to_jpg(folder)

The resulted jpg files will be saved in the same folder.

About

Convert compressed NIfTI files to JPG file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages