Professional Documents
Culture Documents
Iqtool - Exe: Guideline A Framework For Developing Image Quality Tools
Iqtool - Exe: Guideline A Framework For Developing Image Quality Tools
Guideline IQtool.exe
A framework for developing
image quality tools
Version: 3.30
Index
1. Purpose............................................................................................................................3
2. Access..............................................................................................................................3
6. IEC / NEMA.....................................................................................................................14
6.1. Performance measurements acc. to IEC .............................................................................. 14
6.2. Performance measurements acc. to NEMA .......................................................................... 16
9. MPR 3D-Viewer..............................................................................................................24
9.1. 3D distortion evaluation ......................................................................................................... 24
1. Purpose
This document is designed as a short guideline for the image quality tool IQtool.exe as it is
developed in the MR physics department. The software is a framework to develop MR image
processing related code for prototyping. It may not be freely distributed; the code is not under
software quality control and may not be applied to medical evaluation.
Intention of the tool is to solve problems around MRI as they arise here in our lab, not to
completely cover the range of possible requirements, needs or eventualities. This includes
documentation here in this paper; whatever task will be applied by third party people and
therefore needs to have some more information about IQtool.exe will be included in a
succinct manner.
2. Access
The executable, some demonstration data and this documentation can be accessed for all
Siemens Healthcare MR colleagues in the directory:
file:\\I:\1_MR\1_HQMR\old_data\PLM\.Common\Tools_MR-Physik\IQtool
No worry, frequent renaming of main directories always will keep you busy looking for the
right newest release ...
Internally, the available image formats for display and evaluation can have the representation
• 8 bit unsigned integer (gray value)
• 16 bit unsigned integer (gray value)
• 32 bit float number (gray value)
• 24 bit RGB (true color)
• 64 bit complex number
Alternatively, the DICOM browser can be used to first select a file folder, and then select all
appearing DICOM images via the DICOM tree representation (patient name → study →
series → protocol):
Please note that the philosophy is only to read files, the result of all image manipulations or
image calculations can be copied into the OLE clipboard then. Numerical results may be
inserted in an Excel sheet for further evaluation; images may be inserted either in any office
document or picture processing software.
1
Use “Export-to-offline“ from the Syngo UI
rittdiz7 Page 4 4/17/2009
IQtool_guide_3'30.doc
Siemens MED MR PLM ST PHYS
Dr. Dieter Ritter
3.2. Windowing
Image windowing is possible with the right mouse button. Vertical movement controls the
brightness, horizontal movement controls the contrast. Windowing is not allowed for fixed 8
bit gray value data (as also a DICOM image might be) and fixed RGB images. Almost any
processing on images will result in 32 bit float values; windowing always is available there.
The dashed diagonal line defines an additional evaluation line, e.g. the profile along this line
can be shown. The small circle denotes the beginning of this line (e.g. start index of the
profile line).
3.5. Footer
The bottom frame line shows the current cursor position (x,y), the windowing range (w1,w2)
and the image intensity as:
• Intensity I (gray value image)
• Color R/G/B (true color image)
• Magnitude, phase, real- and imaginary-part A/P/Re/Im (complex image)
4.1. Zoom
Set the image zoom factor to
• 25%
• 50%
• 100%
• 200%
• 400%
4.2. Windowing
Resets the image windowing to standard values and allows setting the mouse sensitivity of
image windowing (increasing by factor 25). Pseudo color representation can be selected for
gray level images.
In subsequent windows (e.g. line profile) this menu item switches the evaluation or display to
the desired part of the complex number.
Image Information shows you relevant attached image data (e.g. used DICOM tags).
Profile
The dashed diagonal of the ROI is used to define a profile line (starting point is the line end
marked with the small circle). Again, in case of a complex image you can switch the
evaluation to the different parts (see 4.3). Use the clipboard to access the data (see 4.4). The
meaning of the parameters is:
• Pixels line length in image pixels
• Length line length in mm (if defined in the DICOM header, see 4.4)
• Angle angle of the profile (horizontal to the right = 0°)
Image Combination
Methods to perform image arithmetic by combination. Please note that all results are
computed in 32bit float (gray value) format:
• image addition
• image addition quadratically (sqrt(IA2+IB2), e.g. for iPAT combination)
• image subtraction
• image multiplication
• image division
ROI handling
Here you can save and load the position, size and shape of an ROI. This might be useful to
transfer an ROI to an identical place at another image or for subsequent measurements.
Fourier-Transformation
Computes the complex Fourier-transformation of a
2D image of arbitrary type
Inverse Fourier-Transformation
Computes the complex inverse Fourier-
transformation of a 2D image of arbitrary type
Crop to ROI
Shrinks the images size to the region of Interest (ROI)
The corresponding MTF evaluation output below shows on the upper left the edge-detection
(ED) within the selected ROI, on the upper right the edge-spread-function (ESF) that is the
averaged and adequate interpolated edge profile across the edge direction. Real and
imaginary parts are evaluated separately so far. On the lower left the line-spread-function
(LSF) is shown as the derivative of the ESF. Roughly it’s Fourier transformation defines the
desired MTF (lower right). The ideal form is a rect-function:
The result may be exported to the Clipboard selecting the “View” menu for export to Excel.
Noise-Power-Spectrum (NPS)
The NPS represents the noise power in the frequency components of an image in-between
the negative and positive Nyquist-frequency (horizontal and vertical). It is defined as the
Fourier-transform of the auto-covariance of the image. NPS separates random noise
(inherent) from systematic noise (typically introduced by equipment malfunction or design
limitations). Apply a profile plot of a half-diagonal to achieve a one-dimensional
representation of the NPS.
This requires an image size of 2nx2n pixels (otherwise the menu item is dimmed). Please see
5.3 how to achieve such a format for images of different size.
Two examples, left the NPS of an uniform MR image with equally distributed noise but an intensity
inhomogeneity (denoted by the white streaks). On the right the NPS of a pure white noise image
where a Gaussian- and Unsharp-masking filter was applied (in pseudo color view).
Menu item “evaluation” finally shows the scatter plot of the errors between the detected
markers and their true position. The abscissa denotes the normalized ellipsoidal radius (with
value 1.0 onto the surface of the elliptical DEV, marked by the dotted line).
As customary, the result can be copied into the Windows clipboard to paste into an Excel
sheet e.g. for further use.
Distortion evaluation of a 3D volume can be done within the 3D viewer (see 9.1).
6. IEC / NEMA
6.1. Performance measurements acc. to IEC
Slice Thickness
MRI slice thickness can be measured according to IEC with two methods:
The longer opposed aspects of the rectangular ROI hereby define the evaluation profiles
overlaying the inclining slabs/wedges (marked here with orange and green). The meaning of
the parameters is:
• Alpha wedge/slab angle of the phantom
Spatial Resolution
Computes the modulation factor within the ROI according to IEC.
Ghosting
Step 1 “Set Regions”: three colored quadrates
have to be positioned by hand (left mouse
button) to cover regions of phantom signal,
ghost signal and background noise signal
(refer to the IEC). The color code is:
green = signal ROI
red = ghost ROI
blue = noise ROI
menu 1) First define the center of the phantom by moving the ends of the green lines
and then ...
menu 2) align the perimeter by moving either the middle point or end points of the
yellow lines. IQtool gives you a suggestion where to place the points, always
check these positions for misalignments (e.g. due to an air bubble in the
phantom). You may use image zoom [4.1] to achieve subpixel accuracy.
Finally select item...
menu 3) to get the evaluation data.
Finally an ROI is overlaid to show the true phantom geometry with respect to the selected
center position.
Affine Transformation
Performs 2D affine transformation to any image format, the result is always computed in
32bit float (gray value) format. Transformation parameters are:
• Rotation
• Translation
• Scale
• Shear
Pixel interpolation can be chosen as:
• Nearest neighbor
• Linear
• B-Spline
Normalized-Mutual-Information (NMI)
Computes the joint-histogram image and the NMI = 1.522
normalized-mutual-information number (NMI) of
two images. NMI is designed for correlation
measure of multimodal images (e.g. MR and
PET) and is a quality number for image
registration. The first image is the active one, the
second image can be chosen from a list of all
open images in the program.
Elastic Registration
An elastic registration for two (multimodal) images of
same size is calculated. The active image is the so called
“model image”, the second image can be chosen from a
list of all open images in the program as the “reference
image”. The model image will be warped to optimally fit
the reference image by maximizing the NMI (the result
may be reviewed by image subtracting). A dynamic multi-
scale grid defines the parameters (control points) for the
appropriate local B-spline transformations; a gradient
ascent method fits the parameters to optimize the NMI in
an iteration loop (quality function example see right).
The registration can be applied to any image format; the result is always computed in 32bit
float (gray value) format. Transformation parameters are:
• Starting grid size number of control points along image width
• Iterations per grid step optimization loop over all parameters (per grid
size)
• Number of grid expansions control points will be quadruplicated at each
grid step
• Relative control point amplitude factor of the control point distance as the
maximum control point shift at the start
point of each grid step
• Amplitude decrease factor linear decrease of the amplitude down to this
factor of the maximum shift at the end point of
each grid step
• Differentiation width interval for gradient calculation [pixel]
Finally a logfile is written to evaluate the optimization progress and final control point
distribution. Please note that the focus of this implementation is an architectural one for fast
prototyping and reliable evaluation. Therefore elastic registration may take a night run here.
There are dozens of known methods to speed up the processing time dramatically by a
factor of several hundred!
Two images in subtraction before (left) and after (right) elastic registration. Note that the result is a
perfect geometric fit (although there are remaining high-pass-like looking structures caused by the
B-spline intensity interpolation)
Magnetic B0 field expansion along the current selected MR image is performed. The position
and orientation of this DICOM image is used to calculate the “true” B0 value at each image
pixel position in the 3D scanning volume. The appropriate Legendre coefficients gained by
the “magnet shim” tune-up step are used. They have to be loaded from (double precision) file
that can be found at any scanner in the directory:
C:\MedCom\service\html\seso\sitedb\log\shim\iqshim_output_*.xml
The pixel values of the congruent B0 field image are scaled to [ppm] units of the ground
magnetic strength (see image information 4.4). The following example shows a sagittal slice
of a short bore 3T magnet (Verio), here a circle with diameter 368,8mm (vertical readout-
direction, gradient distortion correction applied). Multiplication (5.1) of this image with the
here computed adequate B0 image leads to the right image where geometric distortion and
its cause, the B0 inhomogeneity, is visualized in parallel.
The B0 expansion is based on Legendre coefficients measured during the initial system
setup. From that time on each shim-activity (phantom-shim, 3D-shim) changes at least the
gradient offset currents for the linear terms what invalidates the primary magnetic field data.
On the other side each shim activity is to optimize (meaning setting to zero) some remaining
Legendre coefficients with their corresponding electrical coils. Therefore the following system
depended shim status can be chosen:
• none
• for linear terms (A10, A11, B11)
• for linear terms and (A20)
• for linear terms and all second order terms (A20, A21, A22, B21, B22)
Any offset in z-direction2 (DCS) as used between the 3D-slabs in whole body composing
should be indicated.
2
as in DICOM tag (0x0019,0x1014)
rittdiz7 Page 20 4/17/2009
IQtool_guide_3'30.doc
Siemens MED MR PLM ST PHYS
Dr. Dieter Ritter
Please note that so far all corrections can be done on images with standard k-space
sampling scheme only.
The example below shows as a result the distortion measurement (see Fehler!
Verweisquelle konnte nicht gefunden werden.) on a sagittal image (Verio 3T, pixel
bandwidth 100Hz/Px, SE, phantom Ø368,8mm, gradient distortion correction on, vertical
readout direction) without (left) and with (right) B0 distortion correction.
3
the effect of B0 distortion depends on the pixel bandwidth
rittdiz7 Page 21 4/17/2009
IQtool_guide_3'30.doc
Siemens MED MR PLM ST PHYS
Dr. Dieter Ritter
• Phase-encoding direction
• Pixel band width (pbw)
• Center frequency (f0)
r = 150mm
r = 200mm
As actual intention now the translation map is further used to perform B0 distortion correction
in both original images (model and reference). The corrected images appear as new images
in the main window as well as DICOM exports in the original folder, respectively named:
• DisB0(type1){model}.dcm
• DisB0(type1){reference}.dcm
r = 150mm
r = 150mm
r = 200mm r = 200mm
sag sag
The output above shows a 3D distortion phantom as subtraction between the two readout-
direction swapped MR images. On the left side the subtracted original images can be seen,
the deviations of the spheres due to B0 inhomogeneities are obvious. After B0 distortion
correction both images are subtracted again (right side), now they are geometrically identical.
This means that the effect of B0 inhomogeneity induced distortion is eliminated.
9. MPR 3D-Viewer
A stack of 2D images forming a 3D volume
are displayed in three orthogonal cutting
planes with MPR (multi planar
reconstruction). Zooming and windowing is
supported. As geometrical information is
needed for the display, this is for 16-bit
DICOM images only.
A 2D grid mapping relatively to a local reference marker (marked in red) is first done in each
image separately; all other isolated markers are not used any more for the planar evaluation
but with the sterical evaluation (see below). The global reference marker (marked in yellow)
is defined as the biggest nearest reference marker to the DCS isocenter in the stack of all
images. After correction for the common, global 3D grid rotation, the next step performs a
refined 2D grid mapping again, marking all local reference markers in cyan whose joined
markers are not used for the 3D evaluation because the distance from the corresponding
reference feature to the scanners isocenter-line is too far.
As a result the mean-/max- deviation graphs over the normalized shell (as known from 5.5) is
drawn and can be copied to the clipboard:
The left image shows the geometric distortion with the “planar evaluation” (lateral image
coordinates only), the right image shows the “sterical evaluation” using the true marker
positions in 3D. Again the x/y/z-deviation [mm] is given in DCS-coordinate system.
Note: The planar evaluation corrects only for the rotation around the vector in slab-direction,
the sterical evaluation allows to correct for all three rotations in (x,y,z)-direction
Note: The interpretation of the sterical evaluation needs some attention. To extract reliably
the 3D spherical markers (2D circles are much less error-prone), only the “good
shaped” markers are used neglecting the others as they main appear exactly in those
outer regions we are interested in. As a consequence the sterical result may show the
lower error numbers in the outer shell, because of using fewer markers there than the
planar evaluation!
It is recommended to compare both evaluations therefore, if the lateral coordinates
are consistent with each other, you can trust the third coordinate of the sterical
evaluation too.
Note: For the sterical evaluation, the distance between the images of a 3D-slab has to be
25% of the spherical marker diameter.
end