loading...
running...
The science
This is a CT suite. The slices you scroll through in the 2D viewer are produced by a scanner like this one: an X-ray tube and a detector arc rotate around the table while the table advances. The phantom is synthetic (no patient data).
Acquisition and the Radon transform. Each detector reading is a line integral of attenuation, p(theta, s) = integral of mu along the ray = -ln(I/I0) (Beer-Lambert). Stacking p over the view angle theta gives the sinogram; a point traces a sine wave in it, hence the name. Photon counting adds noise with variance 1/(N0 exp(-p)), so low mAs gives streaky images.
Reconstruction. Filtered back-projection inverts the Radon transform: each view is filtered with the ramp (Ram-Lak) kernel, which comes from the Fourier slice theorem, and smeared back along its rays:
mu(x, y) = (pi / N) sum over views of (p * h)(x cos(theta) + y sin(theta)), h = ramp kernel
With too few views, streaks appear (error falls roughly as 1/N); with a limited angular range (watch the image while the gantry is part-way round) you see limited-angle artefacts. This page uses parallel-beam geometry on a 96 x 96 version of the slice for speed, which is a simplification of the fan-beam geometry drawn.
Volume rendering. The 3D view ray-marches a 192 x 192 x 100 Hounsfield volume stored as a half-float 3D texture. Front-to-back compositing with opacity from the window, alpha_i = 1 - exp(-sigma_i ds), colour from HU bands (fat, soft tissue, enhanced vessel, bone) and gradient shading from central differences. Narrowing the window changes which tissues are opaque, exactly as windowing changes what you see on a slice. MIP keeps the maximum HU along each ray (good for contrast vessels and bone, no depth cues).
MPR. Multi-planar reformatting resamples the same voxels on axial, coronal and sagittal planes. The three planes are the cut faces drawn in the volume; the axial plane is also the plane the gantry is scanning, so the table moves to keep them registered.
Checks. Besides the numerical checks of the 2D viewer (window formula, noise scaling, Beer-Lambert, Radon, FBP...), this page tests the half-float texture round-trip of HU values and that the axial plane sits exactly in the gantry scan plane after the table settles.
Simplifications. Single effective X-ray energy (no beam hardening, scatter or metal artefacts), parallel-beam reconstruction of a down-sampled slice, piecewise-uniform phantom tissues, the phantom is scaled up so it fills the bore, not for diagnosis.
A PACS viewer shows numbers, not pictures: every pixel is a measured quantity and the viewer maps it to gray. This phantom is a synthetic thorax and abdomen (no patient data) built from analytic shapes, with tissue properties from published ranges.
CT. X-rays obey Beer-Lambert attenuation, I = I0 exp(-integral of mu ds). Reconstruction returns mu, expressed in Hounsfield units:
HU = 1000 (mu - mu_water) / mu_water (air -1000, water 0, bone > 300)
Image noise comes from photon statistics: SD scales as 1/sqrt(mAs) and 1/sqrt(slice thickness). Averaging thicker slices also blurs small lesions through partial volume.
Windowing. Screens show about 256 gray levels, CT holds thousands. The DICOM linear VOI LUT (PS3.3 C.11.2.1.2) maps window centre c and width w to gray y:
y = ((x - (c - 0.5)) / (w - 1) + 0.5) (ymax - ymin) + ymin, clipped to [ymin, ymax]
A narrow window (liver 60/150) shows a 22 HU lesion in 60 HU liver; a wide one (lung -600/1500) shows vessels in air. Same data, different question.
MRI. Spin-echo signal depends on proton density, T1, T2 and the timing you choose: S = PD (1 - exp(-TR/T1)) exp(-TE/T2). Short TR and TE give T1-weighting (fat bright, fluid dark); long TR and TE give T2-weighting (fluid bright). Magnitude noise is Rician. Tissue values are typical 1.5 T figures.
Radiograph. A projection sums mu along every ray; the page computes a digitally reconstructed radiograph with quantum noise from the photon count.
Ultrasound. The probe sends pulses; echo amplitude at an interface is set by acoustic impedance, R = ((Z2 - Z1)/(Z2 + Z1))^2, and depth by time of flight, d = c t / 2 with c = 1540 m/s. Attenuation (dB/cm/MHz x frequency x two-way distance) is compensated by time-gain control; speckle is a correlated Rayleigh field. Air and bone almost fully reflect, so ribs and lung cast shadows.
PACS and DICOM. Scanner, router, archive and workstation talk DICOM over TCP: an association is negotiated, each image goes as a C-STORE of 16 KiB P-DATA PDUs and is acknowledged by a response. Time is about 2.5 RTT + N (size / throughput + RTT) + RTT, with throughput = min(link, 64 KiB window / RTT), so a long-distance link is limited by latency, not bandwidth; lossless JPEG 2000 reduces size by roughly 2-3x.
Checks. (1) The DICOM window formula at its defining points. (2) Measured CT noise SD against 14 sqrt(100/mAs) sqrt(4/thickness) and the 1/sqrt(dose) ratio. (3) Liver region mean against 60 HU. (4) Body width measured with the ruler against the analytic ellipse. (5) Beer-Lambert transmission through 100 mm of water. (6) Liver T1 recovered from two repetition times. (7) Reflection plus transmission equals one. (8) Echo time of a bone interface mapped back to depth. (9) Radon line integral of a disc against the analytic chord. (10) Filtered back-projection of a real slice from its sinogram. (11) DICOM transfer time: closed form against a PDU-by-PDU count.
Simplifications. Phantom tissue is piecewise uniform; CT uses one effective energy (no beam hardening or scatter); MRI ignores B1/B0 inhomogeneity and motion; ultrasound is a 2D ray model without refraction or multiple reflections; the network model has a single association and no packet loss. This is an educational tool, not for diagnosis.