DOC PREVIEW
OSU CS 553 - Directly Visualizing Volume Data

This preview shows page 1-2-14-15-30-31 out of 31 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 31 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Directly Visualizing Volume DataMike Baileyjb@ t t [email protected] State Universitymjb – May 14, 2013Oregon State UniversityComputer GraphicsVolume Data: A DefinitionA volume is a 3D discretely sampled data set where the size of the voxels yphave been expanded to occupy the space to the neighboring voxels.mjb – May 14, 2013Oregon State UniversityComputer GraphicsWhy Do We Care About Volume Visualization?• Medical: CAT, MRI, 3D ultrasound• Science and engineering: CFD, stress, thermal, molecular• Volumes are normally very difficult to comprehendmjb – May 14, 2013Oregon State UniversityComputer GraphicsUnderstanding Volume Data Usually Involves a CompromisePoint CloudsAll values everywhere, hard to see very muchdistracting artifactsPoint CloudsInterpolated-colors cutting planesvery much, distracting artifactsAll values in a single planeContours cutting planeIsosurfacesDiscrete values in a single planeA single value everywheregyBecause of these compromises, these are all considered to be indirect ways to visualize volume datamjb – May 14, 2013Oregon State UniversityComputer GraphicsDirect Volume RenderingComposite the colors and alphas of the voxelsA Volume Element, orvoxelmjb – May 14, 2013Oregon State UniversityComputer Graphicsor voxelTransfer FunctionColorsFrequency Histogram Opacityg(usually a log scale)OSU vxTransfer Function Sculpting Windowmjb – May 14, 2013Oregon State UniversityComputer GraphicsVoxel CompositingCCColdnew).1('Recall this color blending equation from the OpenGL Transparency notes:oldnewIn “Voxel World”, things work the same way:ColdCnew, αmjb – May 14, 2013Oregon State UniversityComputer GraphicsC’TMIN = 0.TMAX 100R,G,B = (0.,1.,1.)Voxel Compositing ExampleTMAX = 100.The color transfer function is a Black-Red-Yellow-White heated object scale, mapping a l l f 0 t Bl k d 100 t WhitT = 33.33scalar value of 0. to Black, and 100. to White.The opacity transfer function is a linear ramp so that the opacity is 1. (opaque) when T = 100. and 0(t t) h T 0R,G,B = (?,?,?)0. (transparent) when T = 0.You are compositing back-to-front through the volume. At this moment, the running values of RGB are (0., 1., 1.) . The next voxel you encounter has a T u g a ues o G a e(0,,)e e t o e you e cou te as avalue of 33.331. What is the color of just this voxel?j2. What is the opacity of just this voxel?3. What will the new running RGB values be when you are done compositing this voxel with the old running RGB values?mjb – May 14, 2013Oregon State UniversityComputer GraphicsWhat is the color of just this voxel?What is the opacity of just this voxel?What will the new running RGB values be when you are done compositing this voxel with the old running RGB values?mjb – May 14, 2013Oregon State UniversityComputer GraphicsCropping the Volume based on Data Valuemjb – May 14, 2013Oregon State UniversityComputer GraphicsCropping the Volume based on Spatial Locationmjb – May 14, 2013Oregon State UniversityComputer Graphics“Magic Lens” to Selectively Look InsideVolume DataVolume DataDisplay PtDisplay PtParameters #1Parameters #2One Displaymjb – May 14, 2013Oregon State UniversityComputer GraphicsLightingdS dS dSmjb – May 14, 2013Oregon State UniversityComputer Graphics(,,)dS dS dSnSdx dy dzVolume Rendering with Parallel Texture PlanesYXZZunsigned char TextureXY[NZ][NX][NY][4];unsigned char TextureYZ[NX][NY][NZ][4];unsigned char TextureXZ[NY][NX][NZ][4];“NY slices of an NX by NZ RGBA texture"mjb – May 14, 2013Oregon State UniversityComputer Graphics“NZ slices of an NX by NY RGBA exture"“NX slices of an NY by NZ RGBA texture"In a callback that is called whenever the opacity transfer function changes:… )from elseu want to view 5.*r + .5 );5.*g + .5 );5.*b + .5 );5.*alpha + .5 );side is set omewhere siten the range youned char) ( 255ned char) ( 255ned char) ( 255ned char) ( 255Zssoty at this voxelng color compos++ ); y++ )< NZ; zz++ )on to fill:US )-zz;ar value is not in;[y][z].r;[y][z].g;[y][z].b;Alpha;y][x][0] = (unsigy][x][1] = (unsigy][x][2] = (unsigy][x][3] = (unsigd )ha; // opacit, b; // runnin= 0; x < NX; x+ty = 0; y < NY;g = b = 0.; int zz = 0; zz</ which directiontz;f( Zside == PLUz = zz;elsez = ( NZ-1 ) -f( … this scalar = g = b = 0.alpha = 0.;elser = Nodes[x][g = Nodes[x]b = Nodes[x]alpha = MaxATextureXY[zz][yTextureXY[zz][yTextureXY[zz][yTextureXY[zz][ymjb – May 14, 2013Oregon State UniversityComputer GraphicsvoidFillXY( void{float alphfloat r, g,for( int x {for( int{r = for({//inifeif{}e{}TTTT}}}}glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );In Display( ), I:int filter = GL_NEAREST;if( Bilinear )filter = GL_LINEAR;elsefilter GL NEARESTfilter = GL_NEAREST;glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter );glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter );glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );glEnable( GL TEXTURE 2D );glEnable( GL_TEXTURE_2D );glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );glEnable( GL_BLEND );ShlbliblMjDetermineVisibility( );float z0, dz;if( Major == Z ){if(Zside== PLUS )Sets the global variables Major, Xside, Yside, and Zsideif( Zside== PLUS ){z0 = -1.; // back-to-frontdz = 2. / (float)( NZ - 1 );}elsemjb – May 14, 2013Oregon State UniversityComputer Graphicselse{z0 = 1.; // front-to-backdz = -2. / (float)( NZ - 1 );}In Display( ), II:x= 1., y= 1., s=1., t=1.x=-1., y= 1., s=0., t=1.x=-1., y=-1., s=0., t=0.x= 1., y=-1., s=1., t=0.glBegin( GL_QUADS );for( z = 0; z < NZ; z++, zcoord += dz ){glTexImage2D( GL_TEXTURE_2D, 0, 4, NX, NY, 0, GL_RGBA, GL_UNSIGNED_BYTE, &TextureXY[z][0][0][0] );glTe Coord2f( 0 f 0 f )glTexCoord2f( 0.f, 0.f );glVertex3f( -1.f, -1.f, zcoord );glTexCoord2f( 1.f, 0.f );glVertex3f( 1.f, -1.f, zcoord );glTexCoord2f( 1.f, 1.f );glVertex3f( 1.f, 1.f, zcoord );glTexCoord2f( 0.f, 1.f );glVertex3f( -1.f, 1.f, zcoord );mjb – May 14, 2013Oregon State UniversityComputer Graphics}glEnd( );} // if( Major == Z )Human Embryomjb – May 14, 2013Oregon State UniversityComputer GraphicsGeophysicsmjb – May 14, 2013Oregon State UniversityComputer GraphicsVolume Interaction: The Visible Humanmjb – May 14, 2013Oregon State UniversityComputer GraphicsInteractive Volume Visualization forComputational Fluid DynamicsComputational Fluid Dynamicsmjb – May 14, 2013Oregon State


View Full Document

OSU CS 553 - Directly Visualizing Volume Data

Download Directly Visualizing Volume Data
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Directly Visualizing Volume Data and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Directly Visualizing Volume Data 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?