<div dir="ltr">nvm, already reported here: <a href="https://gitlab.kitware.com/paraview/paraview/issues/17121">https://gitlab.kitware.com/paraview/paraview/issues/17121</a></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Fri, Jan 20, 2017 at 12:09 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Please file a bug report on gitlab.</div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_-2956356853601612447gmail_signature" data-smartmail="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:(518)%20881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Fri, Jan 20, 2017 at 12:08 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
That's a bug in either the OSPRay mapper or the ResampleToImage filter, depending on your point of view. To workaround, put a python programmable filter into the pipeline to annotate the array as being the "Active Scalars".<br><br>In it, choose:<br>Output Data Set Type = "Same as Input" //the default<br>check "Copy Arrays" //not the default<br>for script use :self.GetOutput().GetPointData<wbr>().SetActiveScalars("RTData")</div><div class="gmail_extra"><br clear="all"><div><div class="m_-2956356853601612447m_651862472991129945gmail_signature" data-smartmail="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:(518)%20881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div>
<br><div class="gmail_quote"><div><div class="m_-2956356853601612447h5">On Fri, Jan 20, 2017 at 2:45 AM, Jiahui Luo <span dir="ltr"><<a href="mailto:luo229@gmail.com" target="_blank">luo229@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-2956356853601612447h5">
<div bgcolor="#FFFFFF" text="#000000">
Hi ,<br>
I got an error message when trying to do volume rendering on the
output of the ResampleToImage filter:<br>
<blockquote><font size="-1">ERROR: In
/home/user/apps/paraview5.2.0-<wbr>build/superbuild/paraview/src/<wbr>VTK/Rendering/OSPRay/vtkOSPRay<wbr>VolumeMapperNode.cxx,
line 107<br>
vtkOSPRayVolumeMapperNode (0x68c2ad0): VolumeMapper's Input has
no scalar array!</font><br>
<br>
</blockquote>
Here is how it happened.<br>
First, I added a ProgrammableSource with Output DataSet Type set to
vtkRectilinearGrid and apply something like this,<br>
<br>
<blockquote><font size="-1">import numpy as np<br>
<br>
# Read x,y,z,th from file<br>
<br>
xCoords = vtk.vtkDoubleArray()<br>
for i in x:<br>
xCoords.InsertNextValue(i)<br>
<br>
yCoords = vtk.vtkDoubleArray()<br>
for i in y:<br>
yCoords.InsertNextValue(i)<br>
<br>
zCoords = vtk.vtkDoubleArray()<br>
for i in z:<br>
zCoords.InsertNextValue(i)<br>
<br>
output.SetDimensions(len(x), len(y), len(z))<br>
output.SetXCoordinates(xCoords<wbr>)<br>
output.SetYCoordinates(yCoords<wbr>)<br>
output.SetZCoordinates(zCoords<wbr>)<br>
<br>
thArray = vtk.vtkFloatArray()<br>
thArray.SetName("Temperature")<br>
thArray.SetNumberOfComponents(<wbr>1)<br>
thArray.SetNumberOfTuples(nx*n<wbr>y*nz)<br>
for k in range(nz):<br>
for j in range(ny):<br>
for i in range(nx):<br>
index = i+j*nx+k*ny*nx<br>
thArray.SetValue(index, th[k,j,i])<br>
output.GetCellData().SetScalar<wbr>s(thArray)<br>
return output<br>
</font></blockquote>
Since volume rendering can not be done on rectilinear grid. I added
a ResampleToImage filter on this source.<br>
<br>
Then I could do volume rendering using Ray cast or GPU based, but
not OSPray and the above message popped up.<br>
<br>
How to make this work? Thanks.<br>
<br>
Jiahui Luo<br>
<br>
<br>
<blockquote><br>
<br>
</blockquote>
</div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>