<div dir="ltr">I would step through vtkXMLRectilinearGridWriter in a debugger and find out where and why it is returning early. vtkRectilinearGridWriter is OK with what your filter provides, but vtkXMLRectilinearGridWriter is not for some unknown reason. My guess is that your filter is not providing some extent information, but that is just a guess.<div>

<br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div>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>
<br><br><div class="gmail_quote">On Wed, Mar 12, 2014 at 11:59 PM, Mingcheng Chen <span dir="ltr"><<a href="mailto:linyufly@gmail.com" target="_blank">linyufly@gmail.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"><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px">Hi David,</span></font><div><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px"><br>


</span></font></div><div><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px">After trying vtk-6.1. The problem still exists.</span></font></div>


<div><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px"><br></span></font></div><div><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px">My filter inherits from vtkRectilinearGridAlgorithm since its output is vtkRectilinearGridAlgorithm. And I only override the following two methods.</span></font></div>


<div><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px"><br></span></font></div><div><font color="#000000" face="Helvetica, Arial, Droid Sans, sans-serif"><span style="font-size:14px;line-height:19.9999942779541px"><div>


<span style="white-space:pre-wrap">     </span>virtual int FillInputPortInformation(int, vtkInformation *);</div><div><span style="white-space:pre-wrap">     </span>virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector);</div>


<div><br></div><div>And I am sure that RequestData is called, and the GetOutput() of my filter object is not empty (at least should have 8000000 cells as my code outputs).</div><div><br></div><div>Is there any method I should override?</div>

<div class="">
<div><br></div><div>Thanks!</div><div><br></div><div>Best regards,</div><div>Mingcheng Chen</div></div><div>March 12th, 2014</div></span></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">

On Wed, Mar 12, 2014 at 8:26 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can you try 5.10 or 6.1? 5.0 is quite old and it was just after some major pipeline work which _potentially_ could have caused things like this tp happen.</div>


<div class="gmail_extra"><br clear="all"><div>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-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div>
<br><br><div class="gmail_quote"><div><div>On Tue, Mar 11, 2014 at 10:37 PM, Mingcheng Chen <span dir="ltr"><<a href="mailto:linyufly@gmail.com" target="_blank">linyufly@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>

<div dir="ltr">Hi everyone,<div><br></div><div>I wrote a filter lcsFlowMap, whose output is a vtkRectilinearGrid object. I use VTK-5.0.</div><div><br></div><div>When I connect the filter object's output to a vtkRectilinearGridWriter object, it works, producing expected output. However, when I connect my filter to a vtkXMLRectilinearGridWriter object, the output seems an empty grid.</div>





<div><br></div><div>I am sure that my RequestData() is called and I produced a non-empty grid, and when I use CopyStructure and CopyAttribute to get a copy of my filter's GetOutput() and use vtkXMLRectilinearGridWriter to write it to a file. It can produce correct result.</div>





<div><br></div><div>Could anybody please shed some light on that?</div><div><br></div><div>Thanks!</div><div><br></div><div>Best regards,</div><div>Mingcheng Chen</div><div>March 11th, 2014 <span><font color="#888888"><br clear="all">




<div><br></div>
-- <br><div dir="ltr"><div>Research Assistant in Graphics Group<br></div>
<div>University of Illinois at Urbana-Champaign</div><div><a href="http://mingchengchen.org" target="_blank">http://mingchengchen.org</a></div></div>
</font></span></div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>
</blockquote></div></div></div><div><div class="h5"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Research Assistant in Graphics Group<br></div>
<div>University of Illinois at Urbana-Champaign</div><div><a href="http://mingchengchen.org" target="_blank">http://mingchengchen.org</a></div></div>
</div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>