<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2919.6307" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi vtk users,</FONT></DIV>
<DIV><FONT size=2>I've been trying to render a vtkStructuredPoints data. The
scalars in that data set have a constant value of 100 (just for testing). When I
render the data set, I get interlaced black and white planes. The code I'm using
to render the data is attached. Can anyone tell me what I'm doing wrong.
</FONT></DIV>
<DIV><FONT size=2>I'm using the latest official release of VTK (3.12) with VC++
version 6.0.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>**If it is related: </FONT></DIV>
<DIV><FONT size=2>The data dimensions (100X100X100).</FONT></DIV>
<DIV><FONT size=2>My VGA card is Elsa Gloria II Pro with 64MB.</FONT></DIV>
<DIV><FONT size=2>I'm using Windows NT on a Dell workstation with 733Mhz
processor and 512 MB RDRAM.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Thanks,</FONT></DIV>
<DIV><FONT size=2>Asad</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>{Here is where I create the structured data set and fill it
with the constant 100.}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>vtkPiecewiseFunction *oTFun =
vtkPiecewiseFunction::New();<BR> // Get Opacity segments and add
them.<BR> oTFun->AddSegment(0,1.0,255,1.0);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> // Create a transfer function mapping scalar value to
color (grey)<BR> vtkPiecewiseFunction *cTFun =
vtkPiecewiseFunction::New();<BR> // Get Color segments and add
them.<BR> cTFun->AddSegment(0, 0.0, 255,
1.0);<BR> <BR> // Create a property for the volume and
set the transfer functions.<BR> vtkVolumeProperty *volumeProperty =
vtkVolumeProperty::New();<BR> volumeProperty->SetColor(cTFun);<BR> volumeProperty->SetScalarOpacity(oTFun);<BR> volumeProperty->SetInterpolationTypeToLinear();<BR> volumeProperty->ShadeOn();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> // Create a ray function - this is a compositing
ray function<BR> vtkVolumeRayCastCompositeFunction
*compositeFunction =
<BR> vtkVolumeRayCastCompositeFunction::New();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> // Create the volume mapper and set the ray
function and scalar input<BR> vtkVolumeRayCastMapper *volumeMapper =
vtkVolumeRayCastMapper::New();<BR> volumeMapper->SetInput(StructuredPoints);
// StructuredPoints is my test vtkStructuredPoints data
set.<BR> volumeMapper->SetVolumeRayCastFunction(compositeFunction);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> // Create the volume and set the mapper and
property<BR> vtkVolume *volume =
vtkVolume::New();<BR> volume->SetMapper(volumeMapper);<BR> volume->SetProperty(volumeProperty);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // Add this volume to the renderer and get a
closer look<BR>
renderer->AddVolume(volume);</FONT></DIV></BODY></HTML>