<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dear Utkarsh,<br>
    <br>
    Thanks. That did help.<br>
    So I am having now:<br>
    <br>
    <span style=" color:#c0c0c0;"> </span>...<br>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">v<span style=" color:#800080;">tkSMPropertyHelper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">glyph</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Source"</span><span style=" color:#000000;">).</span><span style=" color:#000000;">Set</span><span style=" color:#000000;">(</span><span style=" color:#000000;">getSphereSource</span><span style=" color:#000000;">(</span><span style=" color:#000000;">glyph</span><span style=" color:#000000;">));</span></pre>
    <pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"scalar"</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">0</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"vector"</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">1</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"vector_comp"</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">2</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"off"</span><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">3</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">vtkSMPropertyHelper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">glyph</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"ScaleMode"</span><span style=" color:#000000;">,</span><span style=" color:#808000;">true</span><span style=" color:#000000;">).</span><span style=" color:#000000;">Set</span><span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">);</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">vtkSMPropertyHelper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">glyph</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"ScaleFactor"</span><span style=" color:#000000;">,</span><span style=" color:#808000;">true</span><span style=" color:#000000;">).</span><span style=" color:#000000;">Set</span><span style=" color:#000000;">(</span><span style=" color:#000080;">1.0</span><span style=" color:#000000;">);</span></pre>
    <pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">0</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">or</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">1:</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">1=using</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">vector</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">property</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">for</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">orientation</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">vtkSMPropertyHelper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">glyph</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Orient"</span><span style=" color:#000000;">,</span><span style=" color:#808000;">true</span><span style=" color:#000000;">).</span><span style=" color:#000000;">Set</span><span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">);</span></pre>
    <pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"All</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">Points"</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">0</span></pre>
    <pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">vtkSMPropertyHelper</span><span style=" color:#000000;">(</span><span style=" color:#000000;">glyph</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"GlyphMode"</span><span style=" color:#000000;">,</span><span style=" color:#808000;">true</span><span style=" color:#000000;">).</span><span style=" color:#000000;">Set</span><span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">);</span></pre>
    <br>
    All of the above work, except the ScaleFactor setter. The scale
    factor is odd anyway: in the GUI a value of 1.8 appears by default
    (even though according to the doc it should be 1.0) . Any clue ?<br>
    <br>
    Last question: How do I gain access to the
    GlyphSource(=SphereSource) object in order to use the
    .SetRadius(1.0) function on it ?<br>
    It is not clear to me whether it needs to be accessed through a
    vtkSMPropertyHelper or through a proxy ?<br>
    <br>
    <br>
    Thanks<br>
    <br>
    Florian<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 17.09.2014 um 14:29 schrieb Utkarsh
      Ayachit:<br>
    </div>
    <blockquote
cite="mid:CADHSJjC_N-sZjxAH=i82SNxoqd8jc6wtuJ_3A9-g04pNBCJu0Q@mail.gmail.com"
      type="cite">
      <pre wrap="">Click on the "?" button on the ParaView UI with the filter active.
That'll take you a page that will list all such "properties" available
on the filter. Additionally, you can look at these xml files[1].
Locate the proxy using the group/name and then you'll have the details
for properties on it.

Utkarsh

[1] <a class="moz-txt-link-freetext" href="https://github.com/Kitware/ParaView/tree/master/ParaViewCore/ServerManager/SMApplication/Resources">https://github.com/Kitware/ParaView/tree/master/ParaViewCore/ServerManager/SMApplication/Resources</a>


On Wed, Sep 17, 2014 at 5:22 AM, Florian Hoffmann
<a class="moz-txt-link-rfc2396E" href="mailto:florian.hoffmann@inutech.de"><florian.hoffmann@inutech.de></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Dear Utkarsh,

thanks a lot. I made a small mistake during cmake configuration. It works
fine.

Question: Where can I find the "keywords" for

vtkSMPropertyHelper(...)

For example you used:

 vtkSMPropertyHelper(cylinder, "Resolution").Set(18);


I would like to setup the glyph's settings in a similar fashion. For
example:

// your code
...

// Create and initialize the glyph filter

vtkSMSourceProxy* glyph =
vtkSMSourceProxy::SafeDownCast(pxm->NewProxy("filters", "Glyph"));

controller->PreInitializeProxy(glyph);
vtkSMPropertyHelper(glyph, "Input").Set(cylinder);
vtkSMPropertyHelper(glyph, "Source").Set(getSphereSource(glyph));


// what I would like to add to the glyph's settings
vtkSMPropertyHelper(glyph, "Scale Factor").Set(1.0);
vtkSMPropertyHelper(glyph, "Scale Mode").Set(scalar);
vtkSMPropertyHelper(glyph, "Masking").Set(All_points);
...

cylinder->UpdateVTKObjects();
...


For example I tried "ScaleFactor" and "Scale Factor" but they do not seem to
work.

what are the data types for the .Set() functions ? For example in the case
of Masking ? Where can I find the C++ masking options and its data type to
be used with vtkSMPropertyHelper ? Or do you suggest another way of
accessing these properties ?

Thank you very much.

Florian



Am 16.09.2014 um 17:55 schrieb Utkarsh Ayachit:

Not entirely sure why. I just built that same with ParaVIew git/master
and it built fine for me. What OS is this? Can you attach
CMakeCache.txt from ParaView build as well as the plugin build?

Utkarsh

On Tue, Sep 16, 2014 at 11:26 AM, Florian Hoffmann
<a class="moz-txt-link-rfc2396E" href="mailto:florian.hoffmann@inutech.de"><florian.hoffmann@inutech.de></a> wrote:

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   : <a class="moz-txt-link-abbreviated" href="mailto:florian.hoffmann@inutech.de">florian.hoffmann@inutech.de</a>
Germany                            Internet  : <a class="moz-txt-link-freetext" href="http://www.inutech.de">http://www.inutech.de</a>

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 <a class="moz-txt-link-freetext" href="http://www.diffpack.com">http://www.diffpack.com</a> to read the details
*****************************************************************

Am 16.09.2014 um 14:43 schrieb Utkarsh Ayachit
<a class="moz-txt-link-rfc2396E" href="mailto:utkarsh.ayachit@kitware.com"><utkarsh.ayachit@kitware.com></a>:

It's under "ParaVIewCore/ServerManager/Rendering/" in the ParaVIew source[1]

Utkarsh

[1]
<a class="moz-txt-link-freetext" href="https://github.com/Kitware/ParaView/blob/master/ParaViewCore/ServerManager/Rendering/vtkSMParaViewPipelineControllerWithRendering.h">https://github.com/Kitware/ParaView/blob/master/ParaViewCore/ServerManager/Rendering/vtkSMParaViewPipelineControllerWithRendering.h</a>

On Tue, Sep 16, 2014 at 8:11 AM, Florian Hoffmann
<a class="moz-txt-link-rfc2396E" href="mailto:florian.hoffmann@inutech.de"><florian.hoffmann@inutech.de></a> 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
<a class="moz-txt-link-rfc2396E" href="mailto:utkarsh.ayachit@kitware.com"><utkarsh.ayachit@kitware.com></a>:

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
<a class="moz-txt-link-rfc2396E" href="mailto:florian.hoffmann@inutech.de"><florian.hoffmann@inutech.de></a> 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 <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at:
<a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/paraview">http://public.kitware.com/mailman/listinfo/paraview</a>

<DockWidget.tar.gz>





--
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  : <a class="moz-txt-link-abbreviated" href="mailto:florian.hoffmann@inutech.de">florian.hoffmann@inutech.de</a>
Germany                 Internet : <a class="moz-txt-link-freetext" href="http://www.inutech.de">http://www.inutech.de</a>

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 <a class="moz-txt-link-freetext" href="http://www.diffpack.com">http://www.diffpack.com</a> to read the details
*****************************************************************
</pre>
      </blockquote>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
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  : <a class="moz-txt-link-abbreviated" href="mailto:florian.hoffmann@inutech.de">florian.hoffmann@inutech.de</a>
Germany                 Internet : <a class="moz-txt-link-freetext" href="http://www.inutech.de">http://www.inutech.de</a>

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 <a class="moz-txt-link-freetext" href="http://www.diffpack.com">http://www.diffpack.com</a> to read the details
*****************************************************************
</pre>
  </body>
</html>