[vtk-developers] My own filter has problem connecting with vtkXMLRectilinearGridWriter

Mingcheng Chen linyufly at gmail.com
Thu Mar 13 12:29:28 EDT 2014


Hi David,

I just fixed the problem. When I checked the e-mail, that is exactly what
you predicted.

Yes, I read vtkRectilinearGridReader, which works well with the XML writer,
and found it implements RequestInformation() where it
provides vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(). After I added
that line, it works!

Thanks a lot!

Best regards,
Mingcheng Chen
March 13th, 2014


On Thu, Mar 13, 2014 at 10:05 AM, David E DeMarle
<dave.demarle at kitware.com>wrote:

> 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.
>
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Wed, Mar 12, 2014 at 11:59 PM, Mingcheng Chen <linyufly at gmail.com>wrote:
>
>> Hi David,
>>
>> After trying vtk-6.1. The problem still exists.
>>
>> My filter inherits from vtkRectilinearGridAlgorithm since its output is
>> vtkRectilinearGridAlgorithm. And I only override the following two methods.
>>
>>  virtual int FillInputPortInformation(int, vtkInformation *);
>> virtual int RequestData(vtkInformation *request, vtkInformationVector
>> **inputVector, vtkInformationVector *outputVector);
>>
>> 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).
>>
>> Is there any method I should override?
>>
>> Thanks!
>>
>> Best regards,
>> Mingcheng Chen
>> March 12th, 2014
>>
>>
>> On Wed, Mar 12, 2014 at 8:26 AM, David E DeMarle <
>> dave.demarle at kitware.com> wrote:
>>
>>> 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.
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>>
>>> On Tue, Mar 11, 2014 at 10:37 PM, Mingcheng Chen <linyufly at gmail.com>wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I wrote a filter lcsFlowMap, whose output is a vtkRectilinearGrid
>>>> object. I use VTK-5.0.
>>>>
>>>> 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.
>>>>
>>>> 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.
>>>>
>>>> Could anybody please shed some light on that?
>>>>
>>>> Thanks!
>>>>
>>>> Best regards,
>>>> Mingcheng Chen
>>>> March 11th, 2014
>>>>
>>>> --
>>>> Research Assistant in Graphics Group
>>>> University of Illinois at Urbana-Champaign
>>>> http://mingchengchen.org
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Research Assistant in Graphics Group
>> University of Illinois at Urbana-Champaign
>> http://mingchengchen.org
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>>
>>
>


-- 
Research Assistant in Graphics Group
University of Illinois at Urbana-Champaign
http://mingchengchen.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140313/3e362687/attachment-0002.html>


More information about the vtk-developers mailing list