0% found this document useful (0 votes)
2 views

Digital_Image_Basics

The document provides an introduction to digital medical imaging, explaining that these images represent spatial distributions of physical or chemical properties in an organism, not just pictures. It covers key concepts such as spatial and contrast resolution, digitization through sampling and quantization, and the importance of bit depth in determining image precision. Additionally, it discusses image formats, display techniques, and the use of look-up tables (LUT) for visual representation.

Uploaded by

cristinafraguasl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Digital_Image_Basics

The document provides an introduction to digital medical imaging, explaining that these images represent spatial distributions of physical or chemical properties in an organism, not just pictures. It covers key concepts such as spatial and contrast resolution, digitization through sampling and quantization, and the importance of bit depth in determining image precision. Additionally, it discusses image formats, display techniques, and the use of look-up tables (LUT) for visual representation.

Uploaded by

cristinafraguasl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Introduction to Bioengineering

Digital Image Basics


Mónica Abella ([email protected])
7.2.H24
Medical image

• Digital medical images are a representation of the spatial


distribution (map) of some physical or chemical property in the
organism-> numbers not a picture!
• To represent this map as a picture we can assign gray levels or
colors to each value

M2.257.15529-48 Introduction to Bioengineering, Digital Image 2


Image display

Look-up table (LUT)


M2.257.15529-48 Introduction to Bioengineering, Digital Image 3
Medical image

• Digital medical images are a representation of the spatial


distribution (map) of some physical or chemical property in the
organism-> numbers not a picture!
• To represent this map as a picture we can assign gray levels or
colors to each value

LUT

M2.257.15529-48 Introduction to Bioengineering, Digital Image 4


Quality parameters

• Spatial resolution:
Size of the smaller detail we
can see in an image

• Contrast resolution:
Ability to distinguish among
structures with similar value

M2.257.15529-48 Introduction to Bioengineering, Digital Image 5


Spatial resolution
Question: How could I measure the spatial resolution of
my imaging system?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 6


Contrast resolution
Question: How could I measure the contrast resolution
of my imaging system?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 7


Analog Image: 2D signal

Voltage
ECG: 1D signal

time

M2.257.15529-48 Introduction to Bioengineering, Digital Image 8


Analog Image: 2D signal
1D signal

MRI: 2D signal
ECG: 1D signal

M2.257.15529-48 Introduction to Bioengineering, Digital Image 9


Analog Image: 2D signal
1D signal

value
distance (mm)

value

distance (mm)
M2.257.15529-48 Introduction to Bioengineering, Digital Image 10
Continuos (analog) – discrete (digital)

M2.257.15529-48 Introduction to Bioengineering, Digital Image 11


Digitization I: Sampling
• Analog 2D signal, f(x,y): infinite points
• We can neither acquire (not ideal acquisition systems) nor
store infinite points (finite disk memory)
• We only take a finite number of samples

The space is divided in small elements: pixels

Sampling

Matrix size: number of pixels in each direction

M2.257.15529-48 Introduction to Bioengineering, Digital Image 12


Digitization I: Sampling
Different matrix size
What about spatial resolution?

32 x 32
64 x 64
128 x 128
256 x 256
 Field of view (FOV):Real size of
the space represented in the
image

M2.257.15529-48 Introduction to Bioengineering, Digital Image 13


Digitization I: Sampling

Same FOV
Different matrix size
What about spatial resolution?

256 x 256 128 x 128 64 x 64 32 x 32

M2.257.15529-48 Introduction to Bioengineering, Digital Image 14


Digitalization

• We have gone from infinite points to a finite


number of pixels

Sampling

Now, what is the value at each pixel?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 15


Digitalization II: Quantization
• Points in an analog image can have values arbitrarily
precise (it is a continuous distribution)
• We can neither record (limitations in the acquisition) nor
store (limitations in disk space) values with infinite
precision
• We need to round values: The digital images will have a
limited number of possible values

Sampling Quantization

Bit depth: number of bits used for each pixel (defines max.
precision achievable)
M2.257.15529-48 Introduction to Bioengineering, Digital Image 16
Digitalization II: Quantization

255
...
108
107 Real value: 102.86778…
106
105
104
103
102 Quantization
101 value: 103
100

... There is a
0 quantization
error!!

M2.257.15529-48 Introduction to Bioengineering, Digital Image 17


Digitalization II: Quantization

256 8

4 2

M2.257.15529-48 Introduction to Bioengineering, Digital Image 18


Digitalization II: Quantization

• False contouring

M2.257.15529-48 Introduction to Bioengineering, Digital Image 19


Digitalization II: Quantization
• Bit depth: number of bits used for each pixel (defines
max. precision achievable)
• How many values should I store?
– Amount of information: how much will I need?
– Disk space

• Hounsfield Units: -1000 .. 3000


– Its 4000 different values (for HU
differences of 1 HU)
– If I use 8 bits/pixel: 256 different
values
– If I use 12 bits/pixel: 4096 (minimum
bit depth for CT)

M2.257.15529-48 Introduction to Bioengineering, Digital Image 20


Digitization

Digitization

Sampling Quantization

M2.257.15529-48 Introduction to Bioengineering, Digital Image 21


Digital Image

Question: what is a digital image?, what do we actually


have stored in the PC?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 22


Digital Image

M2.257.15529-48 Introduction to Bioengineering, Digital Image 23


Digital Image

M2.257.15529-48 Introduction to Bioengineering, Digital Image 24


Digital Image

9 5
0

M2.257.15529-48 Introduction to Bioengineering, Digital Image 25


Digital Image

Question: what is a digital image?, what do we actually


have stored in the PC?
• List of numbers (really, a list of
bits!): value of the image at each
point
• Header information: how to
arrange those bits? type of data,
endianness, size of the image, …
• Different image formats: tiff, jpeg,
DICOM, raw,…

M2.257.15529-48 Introduction to Bioengineering, Digital Image 26


ImageJ http://imagej.nih.gov/ij/

• Java-based image processing program developed at the


National Institutes of Health
– Public domain
– Designed with an open architecture that provides extensibility via
Java plugins and recordable macros

M2.257.15529-48 Introduction to Bioengineering, Digital Image 27


Image formats
• File->Open->Cell Colony
– Format?
– Header info?
– Matrix size?
– Bit-depth?, number of possible values?

• File->Open->CTslice.dcm
– Format?
– Image->Show Info
 When was this study acquired?
 What is the manufacturer of the scanner?
– Pixel size?
– Bit-depth?, number of possible values?
– Maximum spatial resolution?
– Can we change the visualization colors? Image->Lookup tables

M2.257.15529-48 Introduction to Bioengineering, Digital Image 28


Pseudo-color

We can not distinguish very similar gray levels

M2.257.15529-48 Introduction to Bioengineering, Digital Image 29


Image formats
• Raw data: StudyIopamiro
– Each study consists of a header file (with extension “.ACT”) and a data
file (extension “.ctf”) stored as: Signed of 16 bits.
– Try File->Open
– To open each study we need to used File->Import->Raw:
1. Open the header file (extension “.ACT”) with a text editor (for example
use the “Wordpad” application).
2. Find data type, endianness, and matrix size:
 Number of pixels on the horizontal direction (Proj_size_radial)
 Number of pixel son the vertical direction (Proj_size_axial)
 Number of images (Projections_per_file)
– Number of possible values?
– Open the three studies and explain what you see in each one

M2.257.15529-48 Introduction to Bioengineering, Digital Image 30


Image formats and profiles
• File->Open->T1 Head
– Matrix size?
– FOV?
– Bit-depth?
– Number of possible values?
– Maximum spatial resolution?
– Image->Stacks->Reslice

• Draw a line in horizontal direction across the image at a height


of 190.5 mm using the tool . Plot the profile with Analyze-
>Plot Profile.
– What do you see?
– What do you think these profiles could be useful for?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 31


Resolution-pixel size
• Take just one slice: Image->Duplicate
• With Image->Scale reduce the image size using 0.25 as scale factor in both
directions X e Y (X scale, Y scale)
– Select the option Create new window, to save the current image naming it
“Copy” (in Title). Make it bigger with the zooming tool
 What is the field of view?
 What is the matrix size?
 What is the pixel size?
 What is the resolution of the new image?

• Increase the size of image “Copy” with Image->Scale selecting a scale


factor of 4 in both directions (X scale, Y scale).
– What is the pixel size?
– Have we lost information compared to the original image?
– What is the resolution of the new image?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 32


Histogram
Pixel value histogram
• The pixel value histogram, h(z), of an image
represents the number of pixels that have a
given value, z

Question: what would be the histogram of the


following image?

Pixel values
0
1
2
3

M2.257.15529-48 Introduction to Bioengineering, Digital Image 34


Pixel value histogram
• The pixel value histogram, h(z), of an image
represents the number of pixels that have a
given value, z

Question: what would be the histogram of the


following image?
Histogram
Pixel values 18
16
0

Number of pixels
14
12
1 10
8

2 6
4
2
3 0
0 1 2 3
Pixel value

M2.257.15529-48 Introduction to Bioengineering, Digital Image 35


Pixel value histogram
• The pixel value histogram, h(z), of an image
represents the number of pixels that have a
given value, z

Number of pixels

Image value

Question: what is the result of integrating the


histogram (adding up all the values)?
M2.257.15529-48 Introduction to Bioengineering, Digital Image 36
Pixel value histogram

Question: What can


we say about the
Pixel value Pixel value
images that have
each of these
histograms?

Pixel value Pixel value

M2.257.15529-48 Introduction to Bioengineering, Digital Image 37


Pixel value histogram
Bright
Dark image image

Question: What can


we say about the
Pixel value Pixel value
images that have
each of these
Low
histograms? contrast High
image contrast
image

Pixel value Pixel value

M2.257.15529-48 Introduction to Bioengineering, Digital Image 38


Pixel value histogram
Question: Which histogram
corresponds to each image? 1

a b

c d

M2.257.15529-48 Introduction to Bioengineering, Digital Image 39


Pixel value histogram
Question: Which histogram
corresponds to each image? 1 a

a b

2 b

3 d

c d

4 c

M2.257.15529-48 Introduction to Bioengineering, Digital Image 40


Image display

• Medical images are a map of some physical or chemical


property in the organism, not a picture!
• To represent this map as a picture we can assign gray levels or
colors to each value

LUT

M2.257.15529-48 Introduction to Bioengineering, Digital Image 41


Image display

M2.257.15529-48 Introduction to Bioengineering, Digital Image 42


Image display: Look-up table (LUT)

• The pixel values are addresses to “look up” the brightness


information which is sent to the monitor and used to “paint”
that pixel on the screen

M2.257.15529-48 Introduction to Bioengineering, Digital Image 43


Digitalization II: Quantization
• Bit depth: number of bits used for each pixel
(defines max. precision achievable)
• How many values should I store?
– Amount of information: how much will I need?
– Disk space

• Hounsfield Units: -1000 .. 3000


– Its 4000 different values (for HU
differences of 1 HU)
– If I use 8 bits/pixel: 256 different
values
– If I use 12 bits/pixel: 4096
(minimum bit depth)

M2.257.15529-48 Introduction to Bioengineering, Digital Image 44


Digitalization II: Quantization
• Bit depth: number of bits used for each pixel
(defines max. precision achievable)
• How many values should I store?
– Amount of information: how much will I need?
– Disk space
• Medical images are usually quantified with 8,
12, or 16 bits
– Human eye can not distinguish between more than
~1000 consecutive grey levels (10 bits)
– Conventional screens: 256 (8 bits)

Question: Then, why using more values


than we can distinguish?
M2.257.15529-48 Introduction to Bioengineering, Digital Image 45
Image display

• Digital medical images are a map of some


physical or chemical property in the organism,
numbers not a picture!
• To represent this map as a picture we can assign
gray levels or colors to each value

M2.257.15529-48 Introduction to Bioengineering, Digital Image 46


Linear gray-level LUT: Window width and level

• To select the range we want


to visualize on the screen
– Our eye can only distinguish
~1000 consecutive values
Visualization gray level

• In most medical systems it is


performed just moving the
Pixel value
mouse
M2.257.15529-48 Introduction to Bioengineering, Digital Image 47
Linear gray-level LUT: Window width and level

Soft-tissue window Bone window

M2.257.15529-48 Introduction to Bioengineering, Digital Image 48


Image display
• Open brain.tif
– Basic parameters:
 Matrix size?
 FOV?
 Bit-depth?, how many different values could be found in this image?
– Determine the size of the smallest detail that can be seen in the image if it
was acquired with a scanner of resolution of 0.1 mm
– How many different pixel values could be found in this image?
– Visualize the histogram with Analize->Histogram
• Make a copy of the image with Image->Duplicate (name it “BrainCopy”)
– Select the image “BrainCopy” and adjust its visualization with Image->Adjust->
Window&Level
– Visualize the histograms of the two images “brain.tif and “BrainCopy” with
Analize->Histogram (after selecting the image), what is the difference?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 49


Window and level
• File->Open->CTslice.dcm
– Type?
– Matrix size?
– FOV?
– Bit-depth?, number of possible values?
– Maximum spatial resolution?
– How could you see detail inside the lung or in the bone?
 Playing with Window&Level find the right values of window and level to
see bone and to see the lungs

M2.257.15529-48 Introduction to Bioengineering, Digital Image 50


Window width

If we have the same window level, in which image


the window width is bigger?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 51


Window level

If we have the same window width, in which


image the window level is higher?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 52


Noise / Artifact
Other problems in the images
• Apart from a wrong sampling (loss of spatial resolution) or a
wrong quantization (loss of contrast resolution), images are
degraded by:
– Noise
 Error in pixel value of stochastic nature: when
repeating the experiment, different noise
 Uncertainties in the acquisition process
– Artifacts
 Error in pixel value of systematic nature: if I repeat
the experiment I get the same image
 Not ideal acquisition conditions: misalignments,
“broken” parts, moving of the patient, interfering
materials within the FOV, …

M2.257.15529-48 Introduction to Bioengineering, Digital Image 54


Noise or artifact?

M2.257.15529-48 Introduction to Bioengineering, Digital Image 55

You might also like