<br><font size=2 face="Courier New">Help</font>
<br>
<br><font size=2 face="Courier New">I've spent enough hours trying to stop
VtkOutputWindow from popping up with this error:</font>
<br>
<br><font size=2 color=#000080 face="Courier New">ERROR: In ..\..\vtk\Filtering\vtkStreamingDemandDrivenPipeline.cxx,
line 628</font>
<br><font size=2 color=#000080 face="Courier New">vtkStreamingDemandDrivenPipeline
(061A8E28): The update extent specified in the information for output port
0 on algorithm vtkTrivialProducer(061AE298) is 0 31 0 31 0 31, which is
outside the whole extent 0 32 0 27 0 9.</font>
<br>
<br><font size=2 face="Courier New">Our volume rendering is working fine!
&nbsp;But this error message won't go away. &nbsp;Our data is loaded into
a vtkRectilinearGrid (any resolution - 32x27x9 is just one of many possibilities).
&nbsp;To do volume rendering we create a 32x32x32 vtkImageData grid and
resample the vtkRectilinearGrid data using vtkProbeFilter (see code below).
&nbsp;Like I said, everything works great. &nbsp;The volume rendering appears
and behaves very well. &nbsp;The only problem is that this error message
pops up with the VtkOutputWindow. &nbsp;I looks like the vtkImageData object
(32x32x32) has inherited the &quot;whole extent&quot; of the original vtkRectilinearGrid
(33x28x10)? &nbsp;This doesn't make sense.... somebody please help....</font>
<br>
<br>
<br><font size=2 face="Courier New">Note: &nbsp;Code is in Visual Basic
(We are using Andrew Dolgert's &quot;.NET Wrappers for VTK 5&quot; - works
great!)</font>
<br>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Private</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">Sub</font><font size=2 face="Courier New">
LoadVolumeActor()</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Create
a rectilinear grid (any resolution and spacing in X, Y, and Z)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim
</font><font size=2 face="Courier New">vtkGrid3D</font><font size=2 color=blue face="Courier New">
as </font><font size=2 face="Courier New">vtk.vtkRectilinearGrid</font><font size=2 color=blue face="sans-serif">
= </font><font size=2 color=blue face="Courier New">Me</font><font size=2 face="Courier New">.LoadRectilinearGrid()</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Create
the image data grid</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
ImageGrid </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkImageData</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
nx </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">Integer</font><font size=2 face="Courier New">
= 32</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ImageGrid.SetDimensions(nx,
nx, nx)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ImageGrid.SetOrigin(m_sngGridMinX,
m_sngGridMinY, m_sngGridMinZ)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ImageGrid.SetSpacing((m_sngGridMaxX
- m_sngGridMinX) / (nx - 1), _</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(m_sngGridMaxY
- m_sngGridMinY) / (nx - 1), _</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(m_sngGridMaxZ
- m_sngGridMinZ) / (nx - 1))</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Use
probe filter to get scalar values for image data grid</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
Probe </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkProbeFilter</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; Probe.SetInput(ImageGrid)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; Probe.SetSource(m_vtkGrid3D)</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Convert
the image data grid scalars from float to unsigned character</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
ScalarMin, ScalarMax </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">Double</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Me</font><font size=2 face="Courier New">.GetScalarMinMax(vtkGrid3D,
ScalarMin, ScalarMax)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
Shift </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">Double</font><font size=2 face="Courier New">
= -ScalarMin</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
Scale </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">Double</font><font size=2 face="Courier New">
= 255.0 / (ScalarMax - ScalarMin)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
ShiftScale </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkImageShiftScale</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ShiftScale.SetShift(Shift)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ShiftScale.SetScale(Scale)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ShiftScale.SetOutputScalarTypeToUnsignedChar()</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; ShiftScale.SetInput(Probe.GetImageDataOutput)</font>
<br>
<br><font size=2 color=#008000 face="Courier New">&nbsp; &nbsp; &nbsp;
&nbsp; 'Volume function</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
VolumeFunction </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkVolumeRayCastMIPFunction</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeFunction.SetMaximizeMethodToScalarValue()
&nbsp;</font><font size=2 color=#008000 face="Courier New">'Default method</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'VolumeFunction.SetMaximizeMethodToOpacity()
&nbsp; &nbsp; 'Alternate method</font>
<br>
<br><font size=2 color=#008000 face="Courier New">&nbsp; &nbsp; &nbsp;
&nbsp; 'Volume mapper</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
VolumeMapper </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkVolumeRayCastMapper</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeMapper.SetVolumeRayCastFunction(VolumeFunction)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeMapper.SetSampleDistance((m_sngGridMaxX
- m_sngGridMinX) / ((nx - 1) * 3))</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeMapper.SetInput(ShiftScale.GetOutput)</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Opacity
transfer function</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
OpacityTransferFunction </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkPiecewiseFunction</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; OpacityTransferFunction.AddPoint(0.0,
0.7)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; OpacityTransferFunction.AddPoint(255.0,
0.7)</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Volume
property</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
VolumeProperty </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkVolumeProperty</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'VolumeProperty.SetInterpolationTypeToNearest()
&nbsp; 'Default - faster, course image</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeProperty.SetInterpolationTypeToLinear()
&nbsp; </font><font size=2 color=#008000 face="Courier New">'Smoother -
slower, smooth image</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeProperty.SetScalarOpacity(OpacityTransferFunction)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; VolumeProperty.SetColor(</font><font size=2 color=blue face="Courier New">Me</font><font size=2 face="Courier New">.CreateLookupTable(ActorIndex,
SetLutOptions.NewLUT, Shift, Scale))</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=#008000 face="Courier New">'Volume
actor</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">Dim</font><font size=2 face="Courier New">
Volume </font><font size=2 color=blue face="Courier New">As</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">New</font><font size=2 face="Courier New">
vtk.vtkVolume</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; Volume.SetMapper(VolumeMapper)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; Volume.SetProperty(VolumeProperty)</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; m_vtkRen1.AddVolume(Volume)</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; m_vtkRenWin.Render()</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; </font><font size=2 color=blue face="Courier New">End</font><font size=2 face="Courier New">
</font><font size=2 color=blue face="Courier New">Sub</font>
<br><font size=2 face="sans-serif"><br>
Steve Koch<br>
Applications Developer<br>
<br>
Trinity Consultants, Inc.<br>
skoch@trinityconsultants.com<br>
phone: 972-661-8881 x1332<br>
fax: +214-615-7425<br>
breeze-software.com</font>
<pre>_________________________________________________________________________

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you
Received this in error, please contact the sender and delete the material 
from any computer.
_________________________________________________________________________