THE PRINCIPLES OF PRACTICAL EDGE DETECTION IN CARDIAC COMPUTED TOMOGRAPHY FOR THE CLINICIAN AND NON-PHYSICIST John A. Rumberger, PhD, MD, FACC, FSCCT Princeton, New Jersey USA
Twitter: @DrRumberger
Page 1 of 20
Abstract: Cardiac CT has become a major clinical diagnostic methodology throughout the world. But the fidelity of the reconstructed image of a physical portion of the body depends on many aspects, not the least of which is the spatial resolution of the imaging modality. CT images are made up of ‘picture elements’ [pixels] as they are presented as a 2-dimensional represention. To separate borders between cardiac [or any other body part] structures it is essential to understand the concept of fidelity of ‘edge detection’. A physical object has a border that we perceive through our eyes that have incredible ‘spatial resolution’, but this can be altered by the amount of light incident on the edge; seeing at night is not as ‘robust’ as seeing during the daylight. The same aspect is that the edge of a physical object imaged with CT will have an apparent ‘edge’ depending on the resolution of the scanner and the parameters of the gray scale presented to the observed. The principles of edge detection in Cardiac CT are complex but can be broken down into relatively simplistic examples to allow the clinician to optimally utilize these techniques. Keywords: Cardiac CT, edge detection, display window, display level, full width half maximum, pixel, voxel
Page 2 of 20
I.
Introduction:
X-ray computed tomography has been clinically available since the 1970’s and due to a variety of issues was initially used to image the static brain. Imaging of the chest using ‘body CT’ came along quickly – but was very ‘slow’ in terms of acquisition and ‘spatial resolution’ was in centimeters – although the heart and its supporting structures were included in chest imaging – it was years until a scanner was developed to specifically study the heart. This was Electron Beam CT [EBCT] with spatial resolution on the order of 1 mm x 1 mm x 3 mm [later to 1 mm x 1 mm x 1.5 mm of the ill-fated ‘E-Speed’ made briefly by General Electric] but with temporal resolution on the order of 50-100 msec – thus allowing one to review gross characteristics of the heart with ‘blur’ free images, due to the incessant movement of the heart in an out of the 2 and 3-dimensional imaging planes at a rate of about once per second – or a repetition rate of 1,000 msec for a heart rate of 60 beats/minute. EBCT was to dominate ‘cardiac CT’ for two decades in research varying from left ventricular size, shape, and function to definition of changes in contrast across the myocardium to estimate myocardial perfusion. Finally, it was the first CT scanner type to allow for non-invasive imaging of the coronary arteries – initially to define coronary artery calcification [later proven to be a relatively repeatable estimation of coronary atherosclerotic plaque burden] and then to imaging the proximal coronary arteries following intravenous contrast injection. EBCT is now in the past; only 110 were ever installed due to being too ‘temperamental’ to be used consistently on a daily basis, being highly expensive to produce and to maintain, and NOT providing true isentropic [i.e. ‘cubic’ voxels]. Today 64+-slice Multi-Detector Computed Tomography [MDCT] is the ‘state of the art’ for Cardiac related imaging and there are literally more than 10,000 scanners installed across the globe. Although there is a lot of talk about Artificial Intelligence use in all forms of imaging, whether body parts or the heart, the basic issue is that one needs to ‘visually’ separate one structure from the other in order to make a diagnosis or define specific issues of tissue characterization. This can be as simple as separating the pericardium from the adjacent myocardium to as complex as defining the layers of atherosclerotic plaque in the coronary mural surfaces from the adjacent coronary lumen – issues of plaque type and degrees of hemodynamically significant coronary luminal narrowing being of paramount concern. In 1992 my colleague and I wrote/edited the first textbook on the “Principles and Practice of Cardiac CT using Ultrafast” [nee: EBCT] and I wrote a chapter on the principles of cardiac ‘edge detection’; in the years since, I have not seen a discourse or re-discussion of these aspects as applied to modern Cardiac CT – however, as a scientist and a clinician this aspect is of paramount concern and generally not an issue addressed by the clinician – I would like to attempt to expand that information to a newer audience but in a way to be understandable for the non-physicist – that is to paraphrase MY interpretation of Stephen Hawking’s popular writings – it you need equations to explain physics – then you don’t
Page 3 of 20
understand it – so I will leave out the equations and the purpose of this discourse to one thing, to update my prior book chapter and introduce: ‘practical edge detection in Cardiac CT for the Clinician’. 2.
Principles of CT Image Reconstruction:
To appreciate the issues of proper border definition and edge detection, it is first necessary to review briefly how a cardiac CT image is reconstructed and what accounts for image reconstruction artifacts which can compromise the integrity of border definition. A CT scanner consists of a rotating x-ray source and many x-ray detectors, all of which lie within the same imaging plane [single source CT] or adjacent but parallel planes [dual source CT]. I will restrict my comments to the more traditional single x-ray source CT. The ‘source’ rotates around the patient transmitting x-rays through the patient from multiple directions. In the case of EBCT the source was a circulating ‘electron beam’ rather than an xray tube as is used in moderate MDCT – but the principles of reconstruction are identical. The x-ray beam energy, passing through the subject is then recorded by the ‘detector’ array(s). Image reconstruction is accomplished currently by two different methods – both of which are ‘old’ but have been expedited by modern computer methods/algorithms. In the original EMI {Electrical and Musical Industries} Scanner, introduced in 1973 by Sir Godfrey Hounsfield, an ‘exact solution’ was required – essentially the initial ‘spatial’ resolution was 256 x 256 ‘pixels’ or ‘picture elements’ and from the known information of the x-ray source energy and the energy found at the detector, one can ‘suspect’ the attenuation of the x-ray through and ‘unknown’ body. This is referred to by the algorithm ART [algebraic reconstruction technique]. But this is just one x-ray/detector pair and there are many such pairs produced as the source rotates about the body. You may have learned in high school how to determine the value of a ‘unknowns’ by solving a series of simple equations [OK, I said no equations, but this is an exception!]. An example of this is shown in Figure 1. Here we are using the Lambert-Beer Equation to solve for the ‘density’ [or attenuation or in common CT vernacular the Hounsfield number] of an unknown object that is 2 x 2 ‘pixels’ in resolution. The µ is a representation of the density of the unknown object divided into 4 picture elements for display; its value is designed as ‘Hounsfield Unit/Density/Number’. Sir Godfrey Hounsfield awarded the Nobel Prize in Physiology and Medicine, along with Dr. Allan Cormack in 1979 for the development and application of a practical CT scanner has been also honored for the ‘density’ values assigned, by convention, to each reconstructed CT scan. The system is simple – water is assigned the Hn = 0, dense bone is assigned the Hn = +1000, and air is assigned the Hn = -1000 – between these densities lies essentially 2000 ‘shades of gray’ representing all other body components [fat, muscle, solid tissue, etc]. An example of the common Hn densities and the associated ‘tissue’ found in CT scans are shown in Figure 2.
Page 4 of 20
Now in Figure 1 we are looking at solving 4 equations in 4 unknowns and can be done using a hand-held calculator; but what is you want better ‘resolution’ or better definition of the object? If you want a display of 256 x 256 ‘pixels’ that means you need to solve 2562 equations in 2562 unknowns. Today the common pixel size of CT scans is 512 x 512 or even higher. Thus, as you can imagine, the ART technique is computationally very demanding and, in the beginning, ‘solutions’ took a very long time. MDCT manufacturers have now put back in ‘Iterative (statistical) Techniques’ and make these reconstructions available for use on the ‘raw’ CT data. This more exact solution improves the signal to noise ratio, improves contrast resolution, and importantly allows lower x-ray tube currents (mA) providing improved images at lower radiation doses to the patient. However, the ‘spatial resolution’, inherent in the scanner architecture is not improved. Hounsfield knew of another image reconstruction technique developed by Allan Cormack as early as 1963. This was the concept of ‘back projection’. Simply explained – the residual x-ray beam that is present after passing the x-ray through the body is then recorded by the ‘detector’ array. But knowledge of the x-ray energy incident on any individual detector does not describe where along the beam’s path the attenuation of the initial x-ray energy occurred. If it is assumed that an average amount of absorption occurred at all points along the beam, then it follows that the density of the object at any point in the x-ray path can be found by summing up the absorptions of all the individual beams that passed through that point. This is equivalent to projecting the detected absorption back from the detector toward the x-ray source to form a fan-shaped image for each x-ray source position and then summing up these images across all detectors. The principle is referred to as ‘backprojection’. These simple assumptions however are incorrect, for a non-homogeneous object such as any part of the human body. The effect of utilizing this wrong assumption is to blur the resultant reconstructed image of the object and the fidelity of the ‘border’ definition. The blurring can be partially corrected by altering the intensity of each back-projected ray so as to increase the difference between it and each of its neighboring rays. This is accomplished by subtracting a fraction of the absorption from nearby detectors and then re-scaling the data so that the overall absorption remains about the same. When these re-scaled absorptions are back-projected, a much sharper image is formed [and a much better definition of separating the edges between objects]. This is analogous to the technique used in the communications industry to filter out background noise and is referred to as ‘filtered back-projection’. The sequence of ‘reconstructing’ an unknown object from projections is demonstrated graphically in Figure 3 – beginning with one projection and ending up with multiple projections allows one to better define the object [it initially appears to be a square but as multiple projections are shown the object becomes a circle]. The issues of ‘blurring’ at the edge of the object, which would if depending on back projection alone, would look more
Page 5 of 20
like a circle with multiple spikes at the edges, is then resolved by using variable ‘reconstruction kernels’ or variable FFT [Free Fourier Transform] filtering to smooth out the edges (Figure 4). The Hn density of any particular pixel, P is dependent of the reconstructed densities of adjacent pixels. A sharp or ‘hard’ kernel uses only the immediately adjacent pixels to P to define the density of P – this sharpens the ‘edge’ but introduces more statistical noise; the more commonly applied ‘soft’ kernel smooths out the density at P by incorporating the reconstructed densities of more adjacent pixels, thus ‘smoothing’ out the noise but making the ‘edge’ more blurred [Figure 5]. A clinical example of a Cardiac CT in a patient with a stent in the left anterior descending coronary artery is shown in Figure 6 – note the differences for the ‘sharpness’ of the stent ‘edges’ in the same scan reconstructed with a ‘soft’ versus ‘hard’ reconstruction filer, or ‘kernel’. 3.
The Concept of Reconstructed Image Visual Display and Inspection: Window and Level
After the CT image is reconstructed it is display on a computer workstation. To understand the possible manipulations of the image for subsequent qualitative review and quantitative analysis of correct border definition or placement, it is necessary to fully comprehend manipulations of the image presentation/display using various ‘window’ and ‘level’ settings. So we are moving from ‘physical space’ in which the body part exists, and displaying it shadow in ‘image space’. The images of the body part are displayed in black and white on the workstation screen where the borders between various components of the body parts are divided into gray levels. As noted above, these shades of gray are called Hounsfield units or Hn numbers. Images are generally displayed for initial visual inspection and need to be set to a contrast and brightness that is not harsh to the eye. In CT the ‘window-width’ [or simply the window, W] is the range of gray scales presented in shades of gray with all Hn densities above the window displayed as white and all Hn densities below the window displayed as black. The ‘level’ (L) is defined as the CT density or gray level that lies in the center of the display range. These concepts are important in applying principles of border detection and quantification of image information, as will be subsequently discussed. An example of a contrast enhanced 64-slice CT image of the left main and proximal left anterior descending coronary artery, displayed at various window and level settings serves as an example of the alteration of the perceived ‘edges’ of the coronary arteries and the interpretation of the coronary artery plaque is displayed in Figure 7.
4.
The Concept of Full-Width, Half Maximum – separating physical reality from image space
In the very early days (‘circa’ 1984) of using EBCT to define left ventricular muscle mass we came upon an issue that initially forced us to suggest that quantitative analysis was not possible using CT. We had done experiments in an animal model of defining left
Page 6 of 20
ventricular muscle mass. The individual images, roughly at the time 1 cm apart were done at end-diastole constructing a ‘short axis’ stack [akin to what is now done using cardiac magnetic resonance imaging] from left ventricular apex to base. We displayed the images on the workstation being careful to carefully ‘trace’ the endocardial and epicardial surfaces of the contrast enhanced images and then using a modified Simpson’s Rule analogy, determined the calculated LV mass with the later scale measured autopsy LV mass. We then displayed the results in a standard X versus Y plot [X being the ‘true’ LV mass and Y being the CT derived LV mass]. This initial work showed an excellent correlation between image and autopsy with a correlation coefficient r=0.98 ; but the Y-intercept crossed at -30 grams. What that meant was that although the measurements were indeed accurate and reproducible between subject, the ‘true mass’ of the canine heart was ‘underestimated’ significantly. What we had failed to realize was that the visual perception of the epicardial edge was highly dependent on the W and L setting chosen for display – the same concept can be noted in Figure 7 where the apparent diameter of the LAD coronary artery gets larger when moving from the image at the upper left corner to the image at the lower right corner. Following this observation, we repeated the image tracing being careful to ‘visualize’ the true epicardial edge [especially as it was contrasted against the free wall, which is adjacent to the lungs and the septal wall, which is adjacent to the contrast filled RV chamber] and found again an excellent correlation with autopsy but now with a Y-intercept of Zero! What we observed in 1984 was that it is important to find the true ‘edge’ of the image display by understanding the density differences between the borders of various objects. Thus, the true border between say the left ventricular myocardium and the contrast enhanced RV represents a different border density than between the lateral myocardial wall and the adjacent lung. What was then clear was that the edge was defined by the ‘half contour’ or Full Width Half Maximum (FWHM) CT density – the concept of ‘physical-space’ borders between objects [separated by the 30 micron resolution of the human eye] had to be adapted to ‘image-space’ borders between objects [separated by the physical limitations of the computer eye or CT scanner of likely 2 ‘pixels’ or ‘voxels’, as is required from sampling theory]. Consider two objects – A and B that are sitting so that they are immediately adjacent to one another – the density of Object A is very high and the density of Object B is very low – with my visual sampling resolution of tens of microns – I can perceive what I would call the ‘true edge’ between A and B as a vertical line [Figure 8 top]. However, if my ‘sampling resolution’, now in ‘image’ space is in the hundreds of microns, the definition of the edge becomes a bit more difficult as the ‘pixel’ or ‘voxel’ edge between A and B is really a sigmoid-shaped curve and not a vertical line [Figure 8 bottom]. However, if I set my window-width to include the true densities of both A and B then the ‘edge’ is defined at the ‘half-maximum’ density or FWHM. 5.
The Concept of Border Threshold
Page 7 of 20
In general, the FWHM can be found at any border interface in image space and the ‘correct’ edge located. The threshold is the value of the location of the Hn number that corresponds to the maximum slope of the Hn number versus location curve (i.e. the CT or HN profile curve) near the borders between two imaged objects. For all practical purposes the ‘threshold’ and the ‘FWHM’ are numerically the same. However, CT images are not spatially uniform because of inherent problems secondary to the ‘ideal’ reconstruction of non-ideal scanning data; thus, there is no single ‘threshold’ that can define the entire endocardial border of circumference of the left ventricle [or even the entire mural and luminal borders of a coronary artery] within a given tomogram. Additionally, there is no single threshold that can define the entire epicardial surface as well. A mathematical calculation of all threshold CT densities for all structures can be determined but can be very tedious – but this not need be labor intensive if one understands that the human eye is an excellent edge detector, provided it is aided by a display of the image densities representing the ‘edge’. Border definition for analysis of Cardiac CT returns then to visual inspection but aided by the conceptualizations discussed above and the practical considerations given below. 6.
Practical Aspect of Border Definition in Clinical Cardiac Studies
It is well known that the human eye can perceive the size and shape of an object better during the day than at night. The actual reasons for this simple observation is beyond the scope of this discussion but is related to the actual differences between the perceived brightness (or in CT, the gray scale) of an object as separated from its surroundings. If a person approaches you on a walk at night in a dimly lit park, you can see the person but not identify their salient features. The same observation during a brightly lit afternoon will immediately allow you to perceive the physical characteristics of this person. By analogy, one is progressively better able to visually perceive the location of a given cardiac edge or border as the differences between the densities of the cardiac cavity or vessel lumen and the myocardium or mural surfaces increase from near zero [non-contrast enhanced, dimply lit] to the display limit of the system [with excessive contrast enhancement, brightly lit]. The visual placement of a certain cardiac border or edge is apparent to the eye when the image gray scale display encompasses the range of CT densities that constitute the particular edge in question. This concept is simplistically illustrated in Figure 9 that shows the CT density versus distance profile across a single cardiac border. This idealized CT density profile is similar to that seen in a reconstructed image of the left ventricle. Consider that the overall range of CT numbers in Figure x is from +1000 in the idealized contrast enhanced ‘tissue’ to -1,000 in the idealized ‘lung’. Although these numbers represent the true CT densities of the respective objects, the figure demonstrated two different ‘window and level’ display settings. The image display on the workstation console, by virtue of the chosen W and L settings will show all densities within the display range as shades of gray. In each image, CT densities above the display range will appear
Page 8 of 20
white and CT densities below the display range will appear black. The object of the analysis of this image is to define the distance from the center of the tissue to the lung surface (designated as ‘d’). In figure 8, viewing range #1 is from +1,000 to +500 (i.e. the L = 750 and W = 500, so CT shades of gray are represented by 750+250 = 1000 and 750-250 = 500). All other CT densities NOT within this viewing range would appear on the workstation as black or white. Placement of the border between the tissue and the lung, halfway between the display range of +1,000 to +500, will be visually apparent on the screen and the subsequent physical measurement of the distance be given as d1. However, definition of the distance of the edge from the center of the tissue, d1, will in fact be in error. In the same figure, if the window width is set at 2,000 and the level set at zero, the full dynamic range of CT numbers of the image and, most importantly, of the true border, are visually displayed on the workstation. If one observed the visual placement of the edge as the window and level setting are dynamically altered, the border would ‘expand’ from that measured as d1 to that measured as d2. The correct answer for the distance is given by d2; failure to correctly place the edge is therefore the cause of the errors that can be perpetuated in practice. The paradigm is: You will properly identify the edge visually, provided you display all CT numbers that make up the dynamic range of densities across that border. Learning to accurately and perhaps most importantly, reproducibly place the cardiac borders clearly has a learning curve 7.
Computer Assisted Edge or Border Recognition
Computed assisted edge detection has been applied to numerous cardiac imaging modalities, but with variable success in each instance. The advantages of such a system are numerous and would impart not only consistency to the edge recognition problems, but afford significant saving in the time required to tediously calculate or visually identify the physical borders represented in the reconstructed image. There are several factors affecting the potential application of quantitative border definition in cardiac CT images and include. a. b. c. d. e. f.
Spatial resolution of the system Density resolution of the system Dynamic display range of images Variable and spatially heterogeneous reconstruction artifacts Variable geometric anatomy between subjects The ‘sharpness’ of the edge from the choice of reconstruction method [kernel for back-projection versus statistical iteration].
Spatial resolution of CT systems in the past 40 years have gone from 10 mm to 0.5 mm and now some systems have been able to reduce this to 0.15 mm [150 microns]. Contrast coronary angiography has a spatial resolution of 100 microns – but has a significantly lower
Page 9 of 20
density resolution and dynamic display range – and thus cannot resolve issues of abnormalities in the mural surfaces of the coronary arteries adjacent to the coronary lumen as compared to modern Cardiac CT. The issues of using mathematically derived or more likely AI derived ‘edge fidelity’ will require the resolution of many issues including the correct ‘connectivity’ of the voxel to an adjacent voxel – only when the resolution of the image approaches the resolution of the human eye to define a ‘border’ will this approach become a clinical reality. 8.
Conclusions
Exact border or edge definition is essential for quantitative measurements using modern Cardiac CT. The principles of using the FWHM density values for the placement of the edge are NOT new but can be tedious in practical application. Using visual assessment of the border based on the realization the trained human eye is an excellent edge detecting device, provide sufficient display data (i.e. dynamic range of gray scales within and around the object of interest) are available for this decision. This method is highly reproducible in practice. These principles however had been discussed and the pitfalls of the methods elaborated.
Page 10 of 20
References:
Page 11 of 20
Figure 1:
Figure 1: Example of density resolution in a 2x2 pixel reconstructed image
Page 12 of 20
Figure 2:
Figure 2:
or the project5ion
Page 13 of 20
Figure 3: The method of CT image reconstruction using ‘back-projection’ – there is an unknown object and the x-rays pass through the object to the detector – using single, dual, and then multiple [multi angled] back projections the shape of the unknown object is revealed
Page 14 of 20
Figure 4: Simple back projection [see Figure 3] and filtered back projection using a variable reconstruction kernel and FFT [Fast Fourier Transform]
Page 15 of 20
Figure 5: the CT density of ‘P’ is dependent on the densities of its surroundings; the principles of soft and hard image reconstruction kernels
Page 16 of 20
Figure 6: Cardiac CT images of stent in LAD using ‘soft’ and ‘hard’ reconstruction kernels
Page 17 of 20
Figure 7:
Figure 7:
Page 18 of 20
Figure 8:
Page 19 of 20
Figure 9:
Page 20 of 20