<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Siming Bayer</b> <span dir="ltr"><<a href="mailto:siming.bayer@gmail.com">siming.bayer@gmail.com</a>></span><br>Date: 2017-09-27 15:42 GMT+02:00<br>Subject: Re: [vtkusers] Paraview Error while reading .vts file<br>To: Cory Quammen <<a href="mailto:cory.quammen@kitware.com">cory.quammen@kitware.com</a>><br><br><br><div dir="ltr"><div>I used the vtkProbeFilter to interpolate the value on the edges of a volumetric mesh onto a image volume with dimension of 256x256x256. And save the output of vtkProbeFilter to a .vts file use the following code:</div><div><br></div><div><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkImageData</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">> volume = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkImageData</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">>:<wbr>:New();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> volume</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">DeepCopy(reader</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetOu<wbr>tput());</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2">//find the cell centers, store as polydata<br></font></font></font></p></div><div><p><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkPoints</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">> probePoints = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkPoints</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">>::<wbr>New();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">double</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> center[3] = { 0,0,0 };</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">for</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> (</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkIdType</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> cellId = 0; cellId < volume</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetNumberOfCells(); ++cellId)</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
<p> {</p>
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">double</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> pcoords[3] = { 0,0,0 };</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">double</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> *weights = </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">new d</font></font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">ouble</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">[volume</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetMaxCellSize(<wbr>)];</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkCell</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">* cell = volume</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetCell(cellId);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">int</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> subId = cell->GetParametricCenter(<wbr>pcoords);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
<p> cell->EvaluateLocation(subId, pcoords, center, weights);</p>
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> probePoints</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">InsertNextPoint(<wbr>center[0], center[1], center[2]);</font></font></p><p><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2">
</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> }
</font></font></font></font></font></font></p><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkPolyData</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">> probePolyData = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkPolyData</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">>::<wbr>New();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> probePolyData</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetPoints(<wbr>probePoints);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2">//read the .vtu mesh file as untructured grid</font></font></font></p><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2">
</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"></font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkXMLUnstruct<wbr>uredGridReader</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">> meshReader = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkXMLUnstruct<wbr>uredGridReader</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">>::New();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> meshReader</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetFileName(</font></font><font color="#808080" face="Consolas" size="2"><font color="#808080" face="Consolas" size="2"><font color="#808080" face="Consolas" size="2">argv</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">[<wbr>2]);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> meshReader</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">Update();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkUnstructuredGrid</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">* ugrid = meshReader</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetOutput();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> std::cout </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2">"Interpolating...."</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> std::endl;</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2">//Probe filter</font></font></font></p><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2"><font color="#008000" face="Consolas" size="2">
</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"></font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkProbeFilter</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><wbr>> probe = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkProbeFilter</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><wbr>>::New();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetValidPointMaskArrayN<wbr>ame(</font></font><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2">"mesh"</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetSourceData(ugrid);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetInputData(<wbr>probePolyData);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">Update();</font></font></p></div><div><font color="#008000" face="Consolas">//save the output of probefileter as .vtu file</font><br></div><div><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkStructuredG<wbr>rid</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">> sgrid = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkStructuredG<wbr>rid</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">>::New();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> sgrid</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetDimensions(256, 256, 256);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> sgrid</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetPoints(probePoints);</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">unsigned</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">int</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> numberOfArrays = probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetOutput()-><wbr>GetPointData()-><wbr>GetNumberOfArrays();</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> std::cout </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2">"Copying arrays:"</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> std::endl;</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">for</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> (</font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">unsigned</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2"><font color="#0000ff" face="Consolas" size="2">int</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> i = 0; i < numberOfArrays; i++)</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
<p> {</p>
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> std::cout </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2">"\t"</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetOutput()-><wbr>GetPointData()->GetArray(i)-><wbr>GetName() </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> std::endl;</font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
</font></font><p><font face="Consolas" size="2"><font face="Consolas" size="2"> sgrid</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetCellData()-><wbr>AddArray(probe</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">GetOutput()-><wbr>GetPointData()->GetArray(i));</font></font></p><p><font face="Consolas">}<br></font></p><font face="Consolas"></font><p><font face="Consolas"><font face="Consolas" size="2"><font face="Consolas" size="2"> std::cout </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2">"Writing .vts output"</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><<</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"> std::endl;<font face="Consolas" size="2"><font face="Consolas" size="2"><br></font></font></font></font></font></p><p><font face="Consolas" size="2"><font face="Consolas" size="2"> </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkXMLStructur<wbr>edGridWriter</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">> sWriter = </font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkSmartPointer</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2"><</font></font><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2"><font color="#2b91af" face="Consolas" size="2">vtkXMLStructur<wbr>edGridWriter</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">>::New();<font face="Consolas" size="2"><font face="Consolas" size="2"><br></font></font></font></font></p><p><font face="Consolas" size="2"><font face="Consolas" size="2"> sWriter</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetFileName(</font></font><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2"><font color="#a31515" face="Consolas" size="2">"test.<wbr>vts"</font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">);<font face="Consolas" size="2"><font face="Consolas" size="2"><br></font></font></font></font></p><p><font face="Consolas" size="2"><font face="Consolas" size="2"> sWriter</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">SetInputData(sgrid);<font face="Consolas" size="2"><font face="Consolas" size="2"><br></font></font></font></font></p><p><font face="Consolas" size="2"><font face="Consolas" size="2"> sWriter</font></font><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2"><font color="#008080" face="Consolas" size="2">-></font></font></font><font face="Consolas" size="2"><font face="Consolas" size="2">Write();<span><br></span></font></font></p><font face="Consolas" size="2"><font face="Consolas" size="2">
<p> }</p><p><br></p><p>Maybe something wrong here?</p><p><br></p><p>best,</p><p>Siming</p></font></font></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-09-27 15:29 GMT+02:00 Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">[Moving this discussion over to the ParaView list serve as it has to<br>
do with ParaView.]<br>
<br>
Unfortunately, there's not enough information in the header file. What<br>
wrote this .vts file?<br>
<br>
Thanks,<br>
Cory<br>
<div class="m_-2116359768920947453HOEnZb"><div class="m_-2116359768920947453h5"><br>
On Wed, Sep 27, 2017 at 9:25 AM, Siming Bayer <<a href="mailto:siming.bayer@gmail.com" target="_blank">siming.bayer@gmail.com</a>> wrote:<br>
> Yes,<br>
><br>
> the whole file is quite large. The header part is the following:<br>
><br>
> <?xml version="1.0"?><br>
> <VTKFile type="StructuredGrid" version="0.1" byte_order="LittleEndian"<br>
> header_type="UInt32" compressor="vtkZLibDataCompres<wbr>sor"><br>
> <StructuredGrid WholeExtent="0 255 0 255 0 255"><br>
> <Piece Extent="0 255 0 255 0 255"<br>
>><br>
> <PointData><br>
> </PointData><br>
> <CellData><br>
> <DataArray type="Float64" Name="velocity" NumberOfComponents="3"<br>
> format="appended" RangeMin="0" RangeMax="0"<br>
> offset="0" /><br>
> <DataArray type="Float64" Name="position" NumberOfComponents="3"<br>
> format="appended" RangeMin="0" RangeMax="0"<br>
> offset="906832" /><br>
> <DataArray type="Float64" Name="rest_position"<br>
> NumberOfComponents="3" format="appended" RangeMin="0"<br>
> RangeMax="0" offset="1813664" /><br>
> <DataArray type="Int8" Name="mesh" format="appended" RangeMin="0"<br>
> RangeMax="0" offset="2720496" /><br>
> </CellData><br>
> <Points><br>
> <DataArray type="Float32" Name="Points" NumberOfComponents="3"<br>
> format="appended" RangeMin="0.86602540378" RangeMax="440.80693053"<br>
> offset="2758320" /><br>
> </Points><br>
> </Piece><br>
> </StructuredGrid><br>
> <AppendedData encoding="base64"><br>
><br>
> _.............................<wbr>..............................<wbr>............(here<br>
> is the data)<br>
> </AppendedData><br>
> </VTKFile><br>
><br>
> Thank you!<br>
><br>
> best,<br>
> Siming<br>
><br>
> 2017-09-27 15:21 GMT+02:00 Cory Quammen <<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>>:<br>
>><br>
>> On Wed, Sep 27, 2017 at 8:50 AM, Siming Bayer <<a href="mailto:siming.bayer@gmail.com" target="_blank">siming.bayer@gmail.com</a>><br>
>> wrote:<br>
>> > Dear all,<br>
>> ><br>
>> > I got the following error while reading a .vts file with ParaView:<br>
>> ><br>
>> ><br>
>> ><br>
>> > ERROR: In<br>
>> ><br>
>> > C:\bbd\7cc78367\build\superbui<wbr>ld\paraview\src\VTK\IO\XML\vtk<wbr>XMLStructuredDataReader.cxx,<br>
>> > line 360<br>
>> ><br>
>> > vtkXMLStructuredGridReader (000000000B791F40): Error reading extent 0<br>
>> > 255 0<br>
>> > 255 0 255 from piece 0<br>
>> ><br>
>> ><br>
>> > What does it mean? What could be the reason?<br>
>> ><br>
>><br>
>> Perhaps there is something wrong with the file. Can you share it, or<br>
>> ideally a smaller data set that exhibits the same problem?<br>
>><br>
>> Thanks,<br>
>> Cory<br>
>><br>
>> ><br>
>> ><br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank" rel="noreferrer">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank" rel="noreferrer">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" rel="noreferrer">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
>> ><br>
>> > Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank" rel="noreferrer">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank" rel="noreferrer">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Cory Quammen<br>
>> Staff R&D Engineer<br>
>> Kitware, Inc.<br>
><br>
><br>
<br>
<br>
<br>
--<br>
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<br>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>