[Paraview] PV4.1, Custom Dock Widget: How to automatically add a glyph3d filter after loading data ?

Florian Hoffmann florian.hoffmann at inutech.de
Tue Sep 16 11:26:48 EDT 2014


I have the file there as well but nevertheless during compilation of the Plugin it cannot be found.
Do you have any idea why this might be the case ?


Thanks.

Florian


Mit freundlichen Grüßen
--
Dr.-Ing. Florian Hoffmann
inuTech GmbH                   Phone    : +49-(0)911-323843-22
Fuerther Strasse 212         Fax        : +49-(0)911-323843-43
90429 Nuernberg               E-Mai l   : florian.hoffmann at inutech.de
Germany                            Internet  : http://www.inutech.de

inuTech GmbH
Sitz / Registered Office: Nuernberg
Handelsregister / Companies' Register: AG Nürnberg HRB Nr. 19026
Geschäftsführer / Managing Director: Frank Vogel

*****************************************************************
DIFFPACK - THE NEW GENERATION OF SIMULATION-SOFTWARE!

Go to http://www.diffpack.com to read the details
*****************************************************************

Am 16.09.2014 um 14:43 schrieb Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:

> It's under "ParaVIewCore/ServerManager/Rendering/" in the ParaVIew source[1]
> 
> Utkarsh
> 
> [1] https://github.com/Kitware/ParaView/blob/master/ParaViewCore/ServerManager/Rendering/vtkSMParaViewPipelineControllerWithRendering.h
> 
> On Tue, Sep 16, 2014 at 8:11 AM, Florian Hoffmann
> <florian.hoffmann at inutech.de> wrote:
>> Dear Utkarsh,
>> 
>> thank you very much for your fast reply and the provided example.
>> I compiled PV4.2RC2 from source and just tried to compile your example.
>> Nevertheless I receive a compilation error complaining that the file
>> 
>> vtkSMParaViewPipelineControllerWithRendering.h
>> 
>> cannot be found.
>> Where is this file supposed to be residing ?
>> 
>> Thank you.
>> 
>> Best regards,
>> 
>> Florian
>> 
>> 
>> 
>> Am 15.09.2014 um 17:16 schrieb Utkarsh Ayachit
>> <utkarsh.ayachit at kitware.com>:
>> 
>> Attached is an example based on ParaView 4.2-RC1. As it shows, you
>> cannot directly use VTK objects to create visualization pipelines in
>> ParaView. While this can surely be done with 4.1 or earlier, I'd
>> suggest basing off 4.2, if possible since it simplified a lot of this
>> initialization.
>> 
>> Utkarsh
>> 
>> On Mon, Sep 15, 2014 at 10:23 AM, Florian Hoffmann
>> <florian.hoffmann at inutech.de> wrote:
>> 
>> I would like to automatically add a glyph filter and render the correctly
>> scaled spheres after the user has opened a file in my custom dock widget.
>> I created a DockWidget using the example in /examples/Plugins/DockWidget.
>> When pressing a button a specific file is being opened for the user by the
>> following calls:
>> 
>> void on_button_clicked()
>> {
>>       QString xdmfFile = "C:\\..\\unknown_case.xdmf";
>> 
>>   QStringList visuFiles;
>> 
>>   visuFiles.append(xdmfFile);
>> 
>>   pqPipelineSource* pqPlinesource =
>> pqLoadDataReaction::loadData(visuFiles);
>> 
>>   pqPlinesource->updatePipeline();
>> 
>>  // TODO:
>>  // add spherical glyph for loaded polyData
>>  // scale spherical glyphs by a scalar attribute/property
>>  // render glyphs
>> 
>> }
>> 
>> I would like to include that the code automatically adds spherical glyphs
>> and renders them for the data just loaded.
>> 
>> I tried the following code but I am not sure if it works
>> 
>>               vtkSMProxy *myProxy = pqPlinesource->getProxy();
>> 
>>       vtkObjectBase *myObject = myProxy->GetClientSideObject();
>> 
>>       vtkAlgorithm *myvtkAlgo = vtkAlgorithm::SafeDownCast(myObject);
>> 
>>       vtkGlyph3D *myspheres =  vtkGlyph3D::New();
>> 
>>       myspheres->SetSourceConnection(myvtkAlgo->GetOutputPort());
>> 
>> 
>> 
>> In case this is supposed to work, how can I now update the pipeline and
>> render the spheres using C++ PV core functionality ? (The user should also
>> see the result in the pipeline browser dock of the GUI).
>> 
>> In case my approach is totally wrong, what would be the right way of
>> handling this situation ?
>> 
>> Thank you.
>> 
>> Best regards,
>> 
>> Florian
>> 
>> _______________________________________________
>> 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://public.kitware.com/mailman/listinfo/paraview
>> 
>> <DockWidget.tar.gz>
>> 
>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140916/5e207f91/attachment-0001.html>


More information about the ParaView mailing list