You are on page 1of 56

Medical Image Visualization in 3D

Abhishek Mitra Ph.D in Medical Imaging

3D Imaging Technique

Scan & Step scanning

Reconstruction

Helical Scanning

Data preparation
 3D volume data are represented by a finite number of cross sectional slices (a stack of images)  On each volume element (voxel), stores a data value  For simplicity sake, we assume that the dataset is a regular 3D grid, and each grid point has a data value.

0.3 0.7 2 1

1.5

0.5 2.8

Surface Rendering

Iso value = 80

Iso value = 200

Surface Rendering: Cont.

0.3 0.7 2 1

1.5

0.5 2.8

Surface Rendering: Cont.

Surface Rendering: Cont.

0.3 0.7 2 1

1.5

0.5 2.8

Iso value = 80

Iso value = 200

Volume Rendering

Volume Rendering

 Trace rays from eye instead  Start from the image and follow the ray until ray finds (or fails to find) a light source

This is what most people mean by ray casting .

Ray Tracing & Ray Casting


Physical World :
Photons shoot out from light sources, reflect off surfaces and into the eye. Problem : Only small fraction reaches the eye (or image plane). Difficult to simulate.

Alternative way to simulate :


Reverse the process! Trace the path backwards i.e from the eye (or pixels) back to the light sources.

Shadow Test
 Check against other objects to see if point is shadowed  Cast shadow ray from surface point to light  If shadow ray hits opaque object, no contribution
Eye

Shadowing Object

Recursive ray tracing


Contribution From Primary Ray

(0.5,1.0, 0.5)

Eye

Recursive ray tracing


Contribution From Secondary Ray
L
(0.8,0.8, 0.0)

V2
(0.5,1.0, 0.5)

V1
Eye

Recursive ray tracing


Final Pixel Color
+ =

(0.8,0.8,0.0)

V2
(0.5,1.0,0.5)

V1
Eye

Eye

Shadowing Object

Basic Illumination / Shading Technique

 An illumination model in computer graphics


also called a lighting model or a shading model used to calculate the color of an illuminated position on the surface of an object

 An illumination model computes the lighting effects for a surface using the various optical properties
-Degree of transparency, color reflectance, surface texture

 The reflection (phong illumination) model describes the way incident light reflects from an opaque surface
-Diffuse, ambient, specular reflections -Simple approximation of actual physical models

Shading
- Use a phong Illumination/Shadding model - It simulates rough and shiny surfaces For each Sample evaluate color :

I = Iambdiff + I diffused + I specular

Ambient Light

I = Iambdiff + I diffused + I specular


 It simulates the indirect lighting in a scene,

 Multiple reflection of nearby (light-reflecting) objects yields a uniform illumination, which is constant for an object

Eye

Light

Diffuse Light

I = Iambdiff + I diffused + I specular


 It simulates direct lighting on a rough surface  Incident light is scattered with equal intensity in all directions  Viewer independent, depend on light vector and surface normal  Paper, rough wood, brick, etc...

L N V

Specular Light

I = Iambdiff + I diffused + I specular


 It simulates direct lighting on a smooth surface  Perfect reflector (mirror) reflects all lights to the direction where angle of reflection is identical to the angle of incidence  Depend on both light vector and view direction  Plastic, metal, polished wood, etc...

L N V R

Shading: Phong Illumination Model

I = Iambdiff + I diffused + I specular

Direct Volume Rendering Technique


Volume Rendering Operation
Preparing Gradient Computation Classification Shading Image Compositing

Data preparation
 3D volume data are represented by a finite number of cross sectional slices (a stack of images)  On each volume element (voxel), stores a data value  For simplicity sake, we assume that the dataset is a regular 3D grid, and each grid point has a data value.
Preparing Gradient Computation Classification Shading Image Compositing
0.7 2 0.3 1 0.5 2.8 1.5

Preparing Gradient Computation Classification Shading Image Compositing

Why compute the gradient ?


 Gradient of densities provides information on surface:
- Density changes at surface boundaries: change also appears in their gradient - Presence of surface is qualified by magnitude of gradient - Gradient vector will be used as surface normal in the shading process - Gradient vectors norm is used in classification

Eye R

Gradients computation: Central Difference


0.3 1.5 1 0.5 2 2.8

Preparing
0.7

Gradient Computation Classification Shading Image Compositing

To find the normal at point P:  Consider the six adjacent data points.  Let the value at the next point along the x axis be denoted as fx+1.  Similar notation for the other five points.  Then, the normal at point P is N = (fx+1-fx-1,fy+1-fy-1,fz+1-fz-1).

Classification goal
Preparing Gradient Computation Classification Shading Image Compositing - Make sense of a given data set - Group voxels of same substance - Assign color/opacity value that guides visualization - Color Transfer Function-> Maps data to a given color - Opacity Trans. Fn.-> Maps data to a given opacity f(xi) C(xi), a(xi)

Translucent surface

Color Transfer Function


Preparing Gradient Computation Classification Shading Image Compositing

The color transfer function allows to make a simple classification or segmentation

21.05

27.05

24.03

20.05

Opacity Transfer Function


 Classification assigns to each voxel an opacity av

Preparing Gradient Computation Classification Shading Image Compositing

 Opacity describes how transparent a voxels is: - av=1: completely opaque, cant see through - av=0; transparent, no impact on rendered picture  By controlling the opacity, we can: - Show surfaces by setting opacity to 0 or 1 - Show both exterior and interior regions by grading opacity from 0 to 1  Region of interest: high opaicity (more opaque) Rest: translucent or transparent  For example, if the value for bone is around 0.4, and the value for skin is around 0.1, the user may use the following opacity map to see the bone through translucent skin

f(xi)

C(xi), a(xi)

Opacity Transfer Function


Opacity 1.0 Bone: Opaque 0.1 0.4 1.0 Volume Data Opacity 1.0 Tissue: Opaque 0.1 0.4 Volume Data Opacity 1.0 Bone: Opaque Tissue: Semi transparent Volume 0.1 0.4 Data

Skull + Skin

Shading
Apply light to volume Phong lighting model will give the light reflected to the viewer at any point in volume if we know the local normal

  

Imagine an isosurface shell through each data point surface normal is provided by gradient vector Thus we can get color reflected at each data point Preparing
Light not attenuated in passage to voxel

Gradient Computation Classification Shading Image Compositing

Eye R
Light attenuated in passage from voxel

Compositing
For every pixel in output image Treat volume as a translucent object shoot ray into volume at least one per pixel at evenly spaced ray locations, obtain color and opacity by interpolation Accumulate color and opacities of voxels from back to front Stop when ray exits grid or reaches full opacity

Preparing Gradient Computation Classification Shading Image Compositing

Compositing- Illustration
Cout ! Cin (1  E )  C E

E out ! E in (1  E )  E

color Eye

Volume Rendering: Summary


Preparing Gradient Computation Classification Shading Compositing Opacity 1.0 Bone: Opaque Tissue: Semi transparent Volume 0.1 0.4 Data

Eye R

You might also like