volumetric image visualization
play

Volumetric Image Visualization Alexandre Xavier Falc ao LIDS - - PowerPoint PPT Presentation

Volumetric Image Visualization Alexandre Xavier Falc ao LIDS - Institute of Computing - UNICAMP afalcao@ic.unicamp.br Alexandre Xavier Falc ao MO815 - Volumetric Image Visualization Introduction Transparency is a valuable resource to


  1. Volumetric Image Visualization Alexandre Xavier Falc˜ ao LIDS - Institute of Computing - UNICAMP afalcao@ic.unicamp.br Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  2. Introduction Transparency is a valuable resource to view the location of one object inside the other. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  3. Introduction Transparency is a valuable resource to view the location of one object inside the other. This lecture covers object transparency in the surface rendering algorithm. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  4. Ray casting with transparency Let 0 ≤ o i .α ≤ 1 be the opacjty of object o i and p ′ i , i = 1 , 2 , . . . , k , be the first intersection points of a viewing ray and 1 ≤ k ≤ c distinct objects of the scene. We will assume that refraction does not change the direction of the ray. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  5. Ray casting with transparency Let 0 ≤ o i .α ≤ 1 be the opacjty of object o i and p ′ i , i = 1 , 2 , . . . , k , be the first intersection points of a viewing ray and 1 ≤ k ≤ c distinct objects of the scene. We will assume that refraction does not change the direction of the ray. Being the first intersection points for each object guarantees that they are visible surfaces — i.e., 0 < � o i . n ( p ′ i ) , − n ′ � ≤ 1, 1 ≤ i ≤ k —, depending on the transparencies of their occluding objects o j , 1 ≤ j < i , only. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  6. Ray casting with transparency Let r ( p ′ i ) be the reflection of the light source at each point p ′ i , i = 1 , 2 , . . . , k , as computed by the Phong’s model. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  7. Ray casting with transparency Let r ( p ′ i ) be the reflection of the light source at each point p ′ i , i = 1 , 2 , . . . , k , as computed by the Phong’s model. Due to color reflectance, c ( p ′ i ) = r ( p ′ i ) × o i . r , where o i . r = ( o i . R , o i . G , o i . B ), is the reflected light by object o i . Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  8. Ray casting with transparency Let r ( p ′ i ) be the reflection of the light source at each point p ′ i , i = 1 , 2 , . . . , k , as computed by the Phong’s model. Due to color reflectance, c ( p ′ i ) = r ( p ′ i ) × o i . r , where o i . r = ( o i . R , o i . G , o i . B ), is the reflected light by object o i . Due to opacity, only a portion o 1 .α × c ( p ′ 1 ) returns to the observer from o 1 , a portion (1 − o 1 .α ) × o 2 .α × c ( p ′ 2 ) returns from o 2 , and so on, such that the light reflected towards the observer is: k � � � Π i − 1 c ( p ′ 1 , p ′ 2 , . . . , p ′ j =1 (1 − o j .α ) × o i .α × c ( p ′ k ) = i ) i =1 Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  9. Ray casting with transparency Let r ( p ′ i ) be the reflection of the light source at each point p ′ i , i = 1 , 2 , . . . , k , as computed by the Phong’s model. Due to color reflectance, c ( p ′ i ) = r ( p ′ i ) × o i . r , where o i . r = ( o i . R , o i . G , o i . B ), is the reflected light by object o i . Due to opacity, only a portion o 1 .α × c ( p ′ 1 ) returns to the observer from o 1 , a portion (1 − o 1 .α ) × o 2 .α × c ( p ′ 2 ) returns from o 2 , and so on, such that the light reflected towards the observer is: k � � � Π i − 1 c ( p ′ 1 , p ′ 2 , . . . , p ′ j =1 (1 − o j .α ) × o i .α × c ( p ′ k ) = i ) i =1 For the rendition ˆ J = ( D J , J ), J ( p ) ← c ( p ′ 1 , p ′ 2 , . . . , p ′ k ). Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  10. Graphical context The graphical context gc may then store. Transformations φ − 1 and φ − 1 r . Phong parameters k a , k s , k d , n s , H , d min , d max . The scene ˆ I = ( D I , I ) and its object label image ˆ L ( D I , L ), such that L ( p ) = i , i = 1 , 2 , . . . , c , when p ∈ D I belongs to one of the c objects, or L ( p ) = 0 otherwise. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  11. Graphical context look-up table n [ i ] with pre-computed normal vectors. A normal index map N with the address N ( p ) = i of the normal vector in n [ i ] for each boundary voxel p ∈ D I , or nil when p is not a boundary voxel. A table with the visual attributes for each object o i , i = 1 , 2 , . . . , c , color o i . r = ( o i . R , o i . G , o i . B ), where o i . X ∈ [0 , 1], opacity 0 < o i .α ≤ 1, and visibility o i . v ∈ { 0 , 1 } . Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  12. Surface rendering algorithm with opacities Input : Graphical context gc , and viewing angles α and β . Output: Rendition ˆ J = ( D J , J ). 1 n ′ ← φ − 1 r ( n ), where n = (0 , 0 , 1 , 0). 2 For each p ∈ D J do p 0 ← φ − 1 ( p ). 3 Find P = { p 1 , p n } by solving � p 0 + λ n ′ − f . c , f . n � = 0 4 for each face f ∈ F of the scene, whenever they exist. if P � = ∅ then 5 6 J ( p ) ← ComputeColorAlongRay( gc , P ). Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  13. Surface rendering algorithm with opacities ComputeColorAlongRay( gc , P ) is the DDA algorithm modified to compute the Phong’s model with opacities along a viewing ray. k � � � Π i − 1 c ( p ′ 1 , p ′ 2 , . . . , p ′ × o i .α × c ( p ′ k ) = j =1 (1 − o j .α ) i ) i =1 Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  14. Surface rendering algorithm with opacities ComputeColorAlongRay( gc , P ) is the DDA algorithm modified to compute the Phong’s model with opacities along a viewing ray. k � � � Π i − 1 c ( p ′ 1 , p ′ 2 , . . . , p ′ × o i .α × c ( p ′ k ) = j =1 (1 − o j .α ) i ) i =1 � � Π i − 1 The accumulated transparency j =1 (1 − o j .α ) can be stored in a variable t , initially set to 1 and used for early ray termination. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  15. Surface rendering algorithm with opacities A surface point flag f s ∈ { 0 , 1 } to stop the adjacency search that avoids missing a boundary voxel along the ray. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  16. Surface rendering algorithm with opacities A surface point flag f s ∈ { 0 , 1 } to stop the adjacency search that avoids missing a boundary voxel along the ray. Object flags o i . f ∈ { 0 , 1 } , i = 1 , 2 , . . . , c , to avoid projecting more than one boundary voxel of a same object. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  17. Surface rendering algorithm with opacities A surface point flag f s ∈ { 0 , 1 } to stop the adjacency search that avoids missing a boundary voxel along the ray. Object flags o i . f ∈ { 0 , 1 } , i = 1 , 2 , . . . , c , to avoid projecting more than one boundary voxel of a same object. The total color c t = c ( p ′ 1 , p ′ 2 , . . . , p ′ k ) along the ray. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  18. Computing color along a viewing ray 1 If p 1 = p n then set n ← 1. 2 Else 3 Set D x ← x p n − x p 1 , D y ← y p n − y p 1 , D z ← z p n − z p 1 . 4 If | D x | ≥ | D y | and | D x | ≥ | D z | then Set n ← | D x | + 1, d x ← sign ( D x ), d y ← d x D y 5 D x , and d z ← d x D z D x . 6 Else If | D y | ≥ | D x | and | D y | ≥ | D z | then 7 Set n ← | D y | + 1, d y ← sign ( D y ), d x ← d y D x 8 D y , and d z ← d y D z D y . 9 Else Set n ← | D z | + 1, d z ← sign ( D z ), d x ← d z D x 10 D z , and d y ← d z D y D z . Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  19. Computing color along a viewing ray 11 Set k ← 1, t ← 1 . 0, o i . f ← 0, i = 1 , 2 , . . . , c , p ′ ← ( x p 1 , y p 1 , z p 1 ), and c t ← (0 , 0 , 0). 12 While k ≤ n and t > ǫ , do Set p ′ ← ( ⌈ x p ′ ⌉ , ⌈ y p ′ ⌉ , ⌈ z p ′ ⌉ ) and f s ← 0. 13 For each q ∈ A 1 ( p ′ ) and while f s = 0, do 14 15 If N ( q ) � = nil and o L ( q ) . f = 0 then 16 Set f s ← 1. 17 If o L ( q ) . v = 1 and o L ( q ) .α > 0, do 18 c t ← c t + t × o L ( q ) .α × r ( q ) × o L ( q ) . r . 19 t ← t × (1 − o L ( q ) .α ) and o L ( q ) . f ← 1. Set p ′ ← ( x p ′ , y p ′ , z p ′ ) + ( d x , d y , d z ) 20 21 return c t . Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

  20. Result Note that the rendition might change the original color of the objects. Alexandre Xavier Falc˜ ao MO815 - Volumetric Image Visualization

Recommend


More recommend