[Paraview] Write a reader plugin

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Feb 7 13:35:37 EST 2011


You are correct, but to be handled by filters downstream in typical
VTK pipeline. In ParaView, we currently have the limitation that once
you hit the first apply, the default representation will ask for full
dataset from the input. There are several new approaches  that are
currently being developed (cc-ing Dave) such as streaming to address
this issue.

Utkarsh

On Mon, Feb 7, 2011 at 1:31 PM, Dr. X <xunlei at renci.org> wrote:
> Hi Utkarsh,
> Then what is the purpose of RequestInformation()? I thought it is designed
> for handling large data set where the metadata can be extracted before
> loading the entire data set.
> Best,
> x
>
> On 2/7/2011 1:29 PM, Utkarsh Ayachit wrote:
>>
>> Adriano,
>>
>> I don't believe the two are related. The "Information Tab" is not
>> directly related to the information produced by the filter in
>> "RequestInformation". The "Information tab" can be thought of as
>> information from the dataset generated by the filter. Now the data is
>> generated only after RequestData(), hence until RequestData() most
>> information on the information-tab is empty.
>>
>> Utkarsh
>>
>> On Mon, Feb 7, 2011 at 10:34 AM, Adriano Gagliardi<agagliardi at ara.co.uk>
>>  wrote:
>>>
>>> Utkarsh,
>>>
>>> I believe some time ago I asked something similar regarding the having
>>> the
>>> reader making a call to RequestInformation before actually hitting the
>>> Apply
>>> button. Paul (Edwards) mentioned modifying the vtkGet/SetMacro to do this
>>> automatically. I tried it briefly and I got something to compile, but it
>>> didn't work and crashed out with segmentation fault.
>>>
>>> Is it possible, in both cases, to achieve this by modifying some of the
>>> lower-level vtk code?
>>>
>>> Regards,
>>>
>>> Adriano
>>>
>>> ===================================
>>>
>>> Adriano Gagliardi MEng PhD
>>> Business Sector Leader
>>> Computational Aerodynamics
>>> Aircraft Research Association Ltd.
>>> Manton Lane
>>> Bedford
>>>
>>> Tel: 01234 32 4644
>>> E-mail: agagliardi at ara.co.uk
>>> Url: www.ara.co.uk
>>> -----Original Message-----
>>> From: paraview-bounces at paraview.org
>>> [mailto:paraview-bounces at paraview.org]
>>> On Behalf Of Utkarsh Ayachit
>>> Sent: 07 February 2011 14:50
>>> To: Xunlei Wu
>>> Cc: paraview at paraview.org
>>> Subject: Re: [Paraview] Write a reader plugin
>>>
>>> Xunlei,
>>>
>>> Are you expecting to see the extents setup correctly before hitting the
>>> Apply button the first time? That indeed won't be the case. You'll have
>>> to
>>> hit apply and let the actual data-reading happen before the information
>>> will
>>> be shown on the "information tab".
>>>
>>> Utkarsh
>>>
>>> On Sat, Feb 5, 2011 at 5:46 PM, Xunlei Wu<xunlei at renci.org>  wrote:
>>>>
>>>> Hi David and All,
>>>>
>>>> I still have trouble seeing any updates in ParaView (ParaView Git built
>>>
>>> from source with VS2008 and Qt 4.6.3 on Windows 7 64bit) after loading a
>>> GRIB2 file. For simiplicity, I have created a skeleton version of my
>>> GRIB2
>>> reader. I have only implemented RequestInformation() with some fabricated
>>> WHOLE_EXTENT() data. I have successfully built such reader as a plugin
>>> .dll
>>> (Windows) and loaded it into ParaView through Tool ->  Manage Plugins.
>>> After
>>> you load a grib2 file also attached, RequestInformation() is called and
>>> WHOLE_EXTENT() has been updated. However, I do not see such change in
>>> "Object Inspector" ->  "Information" panel.
>>>>
>>>> I am not sure what I did wrong. And is there anything special I need to
>>>> do
>>>
>>> when build ParaView from source? FYI, "BUILD_SHARED_LIB" is on.
>>>>
>>>> Would you please help me? Thank you very much.
>>>>
>>>> Best,
>>>> x
>>>>
>>>> -----Original Message-----
>>>> From: Xunlei Wu
>>>> Sent: Friday, January 21, 2011 12:10 PM
>>>> To: David Doria
>>>> Cc: paraview at paraview.org
>>>> Subject: RE: Write a reader plugin
>>>>
>>>> Hi All,
>>>> Do you have any suggestions? Thanks a lot.
>>>> Best,
>>>> xunlei
>>>>
>>>> -----Original Message-----
>>>> From: Xunlei Wu
>>>> Sent: Saturday, January 15, 2011 5:44 PM
>>>> To: 'David Doria'
>>>> Cc: 'paraview at paraview.org'
>>>> Subject: Write a reader plugin
>>>>
>>>> Hi David and all,
>>>> I am writing a reader plugin for ParaView. A test program without the
>>>> VTK wrapping approves that I can get all the header (metadata) and
>>>> grid data correctly. However, when I following the examples posted in
>>>> http://www.vtk.org/Wiki/ParaView/Examples/Plugins/Reader
>>>> http://www.kitware.com/products/html/WritingAParaViewReaderPlug-in.htm
>>>> l
>>>> and vtkStructuredGridReader.h/.cxx
>>>>
>>>> I got confused. Shall I subclass vtkStructuredGridAlgorithm or
>>>
>>> vtkStructuredGridReader? What are the differences? With minor differences
>>> in
>>> the code, i.e. defining char* FileName, I have both scenarios built fine.
>>>>
>>>> Let's say, we are subclassing vtkStructuredGridAlgorithm for now on.
>>>> After I populate values as the following
>>>>
>>>> int vtkGRIB2Reader::RequestInformation(vtkInformation*
>>>> vtkNotUsed(request),
>>>> vtkInformationVector** vtkNotUsed(inputVector),
>>>> vtkInformationVector *outputVector) {
>>>>        ...
>>>>        vtkInformation* outInfo =
>>>> outputVector->GetInformationObject(0);
>>>>
>>>>        outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),
>>>> ext, 6);
>>>>        outInfo->Set(vtkDataObject::SPACING(),  this->Spacing, 3);
>>>>        outInfo->Set(vtkDataObject::ORIGIN(),   this->Origin, 3);
>>>>
>>>>        return 1;
>>>> }
>>>>
>>>> In ParaView Object Inspector / Information widget, I did not see any
>>>
>>> update in all the fields except Statistics / Type: Structured
>>> (Curvilinear)
>>> Grid. Would you please help me? Did I populate outInof in the wrong
>>> place?
>>> Thanks a lot.
>>>>
>>>> Best,
>>>> xunlei
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>> http://paraview.org/Wiki/ParaView
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>>
>>> **********************************************************************
>>> This email contains information that is private and confidential and is
>>> intended only for the addressee.
>>> If you are not the intended recipient please delete it and notify us
>>> immediately by e-mailing the sender.
>>> Note: All email sent to or from this address may be accessed by someone
>>> other than the recipient, for
>>> system management and security reasons.
>>> Aircraft Research Association Ltd.  Registered in England, Registration
>>> No 503668 Registered Office:
>>> Manton Lane, Bedford MK41 7PF England VAT No GB 196351245
>>>
>>> **********************************************************************
>>>
>
>


More information about the ParaView mailing list