gdcmviewer command not found

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

Introduction

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

gdcmviewer: command not found

or when using sudo you get the following error message

sudo: gdcmviewer: command not found

Solutions to gdcmviewer: command not found

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

In Ubuntu gdcmviewer is provided by libvtkgdcm-tools package.

libvtkgdcm-tools is:

Grassroots DiCoM is a C++ library for DICOM medical files. It is automatically wrapped to python/C#/Java (using swig). It supports RAW,JPEG (lossy/lossless),J2K,JPEG-LS, RLE and deflated.

Libvtkgdcm-tools provides a number of command line debugging and utility tool. Install this package for the gdcmviewer, gdcm2pnm and gdcm2vtk programs.

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

sudo apt-get -y install libvtkgdcm-tools

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

You can also use apt command to install libvtkgdcm-tools.

sudo apt -y install libvtkgdcm-tools

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

sudo aptitude install libvtkgdcm-tools

Summary

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