How To Install matlab-jnifti on Kali Linux

In this tutorial we learn how to install matlab-jnifti on Kali Linux. matlab-jnifti is fast NIfTI-1/2 reader and NIfTI-to-JNIfTI converter for MATLAB

Introduction

In this tutorial we learn how to install matlab-jnifti on Kali Linux.

What is matlab-jnifti

matlab-jnifti is:

The JNIfTI toolbox includes a stand-alone NIfTI-1/2 parser that works on both MATLAB and GNU Octave without needing additional components. To just reading and writing the un-compressed NIfTI and Analyze7.5 files (.nii, .hdr/.img), one only needs to run addpath(’/path/to/jnifti’). For MATLAB, JNIfTI toolbox utilizes memmapfile-based disk-reading, making it very fast. For Octave, memmapfile is currently not implemented, so, a full reading is required.

The JNIfTI toolbox is also capable of reading/writing gzip-compressed NIfTI and Analyze7.5 files (.nii.gz, .hdr.gz, .img.gz). This feature is supported in MATLAB directly without needing another toolbox (MATLAB must be in the JVM-enabled mode).

To process gzip-compressed NIfTI/Analyze files in Octave and MATLAB with -nojvm, one need to install the open-source JSONLab and ZMat toolboxes

There are three methods to install matlab-jnifti on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install matlab-jnifti Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install matlab-jnifti using apt-get by running the following command:

sudo apt-get -y install matlab-jnifti

Install matlab-jnifti Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install matlab-jnifti using apt by running the following command:

sudo apt -y install matlab-jnifti

Install matlab-jnifti Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install matlab-jnifti using aptitude by running the following command:

sudo aptitude -y install matlab-jnifti

How To Uninstall matlab-jnifti on Kali Linux

To uninstall only the matlab-jnifti package we can use the following command:

sudo apt-get remove matlab-jnifti

Uninstall matlab-jnifti And Its Dependencies

To uninstall matlab-jnifti and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove matlab-jnifti

Remove matlab-jnifti Configurations and Data

To remove matlab-jnifti configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge matlab-jnifti

Remove matlab-jnifti configuration, data, and all of its dependencies

We can use the following command to remove matlab-jnifti configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge matlab-jnifti

Dependencies

matlab-jnifti have the following dependencies:

References

Summary

In this tutorial we learn how to install matlab-jnifti package on Kali Linux using different package management tools: apt, apt-get and aptitude.