Image and Its Properties 39
65536 (= 216 ) or a bit-depth of 16. A good example of such an image
is a CT DICOM image.
Scientific image formats store the pixel values at high precision, not
only for accuracy, but also to ensure that physical phenomena records
are not lost. In CT, for example, a pixel value of > 1000 indicates
bone. If the image is stored in 8-bit, the pixel value of bone would be
truncated at 255 and hence the information will be permanently lost. In
fact, the most significant pixels in CT have intensity > 255 and hence
need higher bit-depth.
There are a few image formats that store images at even higher
bit-depth such as 32 or 64. For example, a JPEG image containing
RGB (3 channels) will have a bit-depth of 8 for each channel and hence
has a total bit-depth of 24. Similarly, a TIFF microscope image with
5 channels (say) with each channel at 16-bit depth will have a total
bit-depth of 80.
3.2.2 Pixel and Voxel
A pixel in an image can be thought of as a bucket that collects light
or electrons depending on the type of detector used. A single pixel in
an image spans a distance in the physical world. For example, in Figure
3.2, the arrows indicate the width and height of a pixel placed adjacent
to three other pixels. In this case, the width and height of this pixel
is 0.5 mm. Thus in a physical space, traversing a distance of 0.5 mm
is equivalent to traversing 1 pixel in the pixel space. For all practical
purposes, we can assume that detectors have square pixels, i.e., the
pixel width and pixel height are the same.
The pixel size could be different for different imaging modalities
and different detectors. For example, the pixel size is greater for CT
compared to micro-CT.
In medical and microscope imaging, it is more common to acquire
3D images. In such cases, the pixel size will have a third dimension,
40 Image Processing and Acquisition using Python
FIGURE 3.2: Width and height of pixel in physical space.
namely the pixel depth. The term pixel is generally applied to 2D and
is replaced by voxel in 3D images.
Most of the common image formats like DICOM, nifti, and some
microscope image formats contain the voxel size in their header. Hence,
when such images are read in a visualization or image processing pro-
gram, an accurate analysis and visualization can be performed. But if
the image does not have the information in the header or if the visual-
ization or image processing program cannot read the header properly,
it is important to use the correct voxel size for analysis.
Figure 3.3 illustrates the problem of using an incorrect voxel size in
visualization. The left image is the volume rendering of an optical coher-
ence tomography image with incorrect voxel size in the z-direction. The
right image is the volume rendering of the same image with correct voxel
size. In the left image, it can be seen clearly that the object is highly
elongated in the z-direction. In addition, the undulations at the top
of the volume and the five hilly structures at the top are also made
prominent by the incorrect voxel size. The right image has the same
shape and size as the original object. The problem not only affects
visualization but also any measurements performed on the volume.