nifti2dicom command not found

In this troubleshooting guide we learn how to fix nifti2dicom command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

nifti2dicom: command not found

or when using sudo you get the following error message

sudo: nifti2dicom: command not found

Solutions to nifti2dicom: command not found

How To Fix nifti2dicom: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu nifti2dicom is provided by nifti2dicom package.

nifti2dicom is:

Nifti2Dicom is a conversion tool that converts 3D NIfTI files (and other formats supported by ITK, including Analyze, MetaImage Nrrd and VTK) to DICOM. Unlike other conversion tools, it can import a DICOM file that is used to import the patient and study DICOM tags, and allows you to edit the accession number and other DICOM tags, in order to create a valid DICOM that can be imported in a PACS.

This package includes the command line tools.

To fix this problem, we can install more using the command below.

sudo apt-get -y install nifti2dicom

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install nifti2dicom.

sudo apt -y install nifti2dicom

Or if you have aptitude installed you can use the following command.

sudo aptitude install nifti2dicom

Summary

In this tutorial we learn how to fix nifti2dicom command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.