<br><font size=2 face="Courier New">Help</font><font size=3> <br>
</font>
<br><font size=2 face="Courier New">The following error pops up when I
use vtkProbeFilter to create a vtkImageData grid from a vtkRectilinear
grid:<br>
</font><font size=2 color=#000080 face="Courier New"><br>
ERROR: In ..\..\vtk\Filtering\vtkStreamingDemandDrivenPipeline.cxx, line
628</font><font size=3> </font><font size=2 color=#000080 face="Courier New"><br>
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><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
Volume rendering of the resulting vtkImageData is working fine! &nbsp;But
this error message won't go away. &nbsp;In this case, a 33x28x10 vtkRectilinearGrid
is the &quot;Source&quot; and a 32x32x32 vtkImageData grid is the &quot;Input&quot;
to the vtkProbeFilter (see code below). &nbsp;Like I said, everything works
great. &nbsp;The scalar values are generated correctly from the vtkProbeFilter.
&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. &nbsp;Is there a better (i.e. more correct) way to
create a volume rendering of Rectilinear Grid data? &nbsp;Can I turn off
the VtkOutputWindow as a temporary fix? &nbsp;Somebody please help....</font><font size=3>
I'm going crazy on this one.<br>
<br>
</font><font size=2 face="Courier New"><br>
Note: &nbsp;Code is in Visual Basic (We are using Andrew Dolgert's &quot;.NET
Wrappers for VTK 5&quot; - works great!)</font><font size=3> <br>
<br>
</font><font size=2 face="Courier New"><br>
 &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><font size=3> <br>
</font><font size=2 face="Courier New"><br>
 &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><font size=3>
</font><font size=2 face="Courier New"><br>
 &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><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#008000 face="Courier New">'Create
the image data grid</font><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ImageGrid.SetDimensions(nx, nx, nx)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ImageGrid.SetOrigin(m_sngGridMinX, m_sngGridMinY,
m_sngGridMinZ)</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ImageGrid.SetSpacing((m_sngGridMaxX - m_sngGridMinX)
/ (nx - 1), _</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; (m_sngGridMaxY - m_sngGridMinY) / (nx - 1),
_</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; (m_sngGridMaxZ - m_sngGridMinZ) / (nx - 1))</font><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
 &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><font size=3>
</font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;Probe.SetInput(ImageGrid)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;Probe.SetSource(m_vtkGrid3D)</font><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
 &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><font size=3>
</font><font size=2 face="Courier New"><br>
 &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><font size=3>
</font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ShiftScale.SetShift(Shift)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ShiftScale.SetScale(Scale)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ShiftScale.SetOutputScalarTypeToUnsignedChar()</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;ShiftScale.SetInput(Probe.GetImageDataOutput)</font><font size=3>
<br>
</font><font size=2 color=#008000 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;'Volume function</font><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;VolumeFunction.SetMaximizeMethodToScalarValue()
&nbsp;</font><font size=2 color=#008000 face="Courier New">'Default method</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#008000 face="Courier New">'VolumeFunction.SetMaximizeMethodToOpacity()
&nbsp; &nbsp; 'Alternate method</font><font size=3> <br>
</font><font size=2 color=#008000 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;'Volume mapper</font><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;VolumeMapper.SetVolumeRayCastFunction(VolumeFunction)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;VolumeMapper.SetSampleDistance((m_sngGridMaxX
- m_sngGridMinX) / ((nx - 1) * 3))</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;VolumeMapper.SetInput(ShiftScale.GetOutput)</font><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#008000 face="Courier New">'Opacity
transfer function</font><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;OpacityTransferFunction.AddPoint(0.0, 0.7)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;OpacityTransferFunction.AddPoint(255.0, 0.7)</font><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#008000 face="Courier New">'Volume
property</font><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#008000 face="Courier New">'VolumeProperty.SetInterpolationTypeToNearest()
&nbsp; 'Default - faster, course image</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;VolumeProperty.SetInterpolationTypeToLinear()
&nbsp; </font><font size=2 color=#008000 face="Courier New">'Smoother -
slower, smooth image</font><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;VolumeProperty.SetScalarOpacity(OpacityTransferFunction)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &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><font size=3> <br>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#008000 face="Courier New">'Volume
actor</font><font size=3> </font><font size=2 face="Courier New"><br>
 &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><font size=3> </font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;Volume.SetMapper(VolumeMapper)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;Volume.SetProperty(VolumeProperty)</font><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;m_vtkRen1.AddVolume(Volume)</font><font size=3>
</font><font size=2 face="Courier New"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;m_vtkRenWin.Render()</font><font size=3> <br>
</font><font size=2 face="Courier New"><br>
 &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><font size=3>
</font><font size=2 face="sans-serif"><br>
<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><font size=3> </font>
<br><font size=3><tt>_________________________________________________________________________<br>
<br>
The information transmitted is intended only for the person or entity to<br>
which it is addressed and may contain confidential and/or privileged<br>
material. &nbsp;Any review, retransmission, dissemination or other use
of, or<br>
taking of any action in reliance upon, this information by persons or<br>
entities other than the intended recipient is prohibited. &nbsp; If you<br>
Received this in error, please contact the sender and delete the material
<br>
from any computer.<br>
_________________________________________________________________________<br>
</tt></font><font size=2><tt>_______________________________________________<br>
This is the private VTK discussion list. <br>
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.vtk.org/mailman/listinfo/vtkusers<br>
</tt></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.
_________________________________________________________________________