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

Mingcheng Chen linyufly at gmail.com
Wed Mar 12 23:59:24 EDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140312/407fb46b/attachment-0002.html>


More information about the vtk-developers mailing list