<div dir="ltr">Ahmad,<div><br></div><div>Please keep replies on the mailing list. Responses are inlined.<br><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 16, 2018 at 9:25 AM, Ahmad . <span dir="ltr"><<a href="mailto:super_achie@hotmail.com" target="_blank">super_achie@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_7920355776676259017divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">Hi Cory,</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">Thanks for your reply.</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">I am trying to implement your suggestion of extending the vtkGlyph3D with this additional "scaling by normals".</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">The idea seems quite straightforward. I was just wondering how to incorporate this new class in my C++ pipeline.</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">Currently I create the glyph, and set its properties, like this:</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap"></p>
<div>vtkSmartPointer<<wbr>vtkSMSourceProxy> glyph;</div>
<div>Â Â Â Â glyph.TakeReference(<wbr>vtkSMSourceProxy::<wbr>SafeDownCast(</div>
<div>Â Â Â Â Â Â session_manager_->NewProxy("<wbr>filters", "Glyph")));</div>
<div>Â Â Â Â controller_-><wbr>PreInitializeProxy(glyph);</div>
<div><br>
</div>
<div>Â Â Â Â vtkSMPropertyHelper(glyph, "Input").Set(producer);</div>
<div>Â Â Â Â vtkSMPropertyHelper(glyph, "Source").Set(<wbr>GetCylinderSource(glyph));</div>
<div>Â Â Â Â vtkSMPropertyHelper(glyph, "ScaleMode", true).Set(0);</div>
<div>Â Â Â Â vtkSMPropertyHelper(glyph, "ScaleFactor", true).Set(1.0);</div>
<div>Â Â Â Â vtkSMPropertyHelper(glyph, "GlyphMode", true).Set(0);</div>
<div><br>
</div>
<div>As you can see I am not directly working with vtkGlyph3D or vtkPVGlyphFilter classes, but I am using the vtkSMPropertyHelper to take care of the boilerplate code.</div>
<div><br></div></div></div></blockquote><div> </div><div>Right. Unfortunately, implementing my suggestion would require creating a subclass of vtkPVGlyphFilter and importing that with a ParaView plugin. See the ParaView Howto on how to add a filter to ParaView. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_7920355776676259017divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"><div>
</div>
<p style="white-space:pre-wrap"></p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">After I created a new class that has this extra scaling option, how would I go about using this in such a pipeline? Do I need to 'register' my "<span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">ModifiedGlyph</span>"
to the filter proxies to be able to do something like `NewProxy("filters", "ModifiedGlyph")`?</p></div></div></blockquote><div><br></div><div>Yes, that should do it. Your modified glyph class will be available once you've imported the ParaView plugin mentioned above. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_7920355776676259017divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"><p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">
</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap">A quick question about setting the active normals. Is there an existing way to do this, or would I need to do this myself? I would like to do this the same way one would set the "Scalars":</p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap"><br>
</p>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
vtkSMPropertyHelper(glyph, "Normals")</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
      .SetInputArrayToProcess(<wbr>vtkDataObject::POINT, "ScalingArray");</div></div></div></blockquote><div><br></div><div>I think that should work.</div><div><br></div><div>Best,</div><div>Cory</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_7920355776676259017divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
Looking forward to your reply.</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
Best,</div>
<div style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">
Ahmad</div>
<p style="white-space:pre-wrap"></p>
<p style="margin-top:0px;margin-bottom:0px;white-space:pre-wrap"></p>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div id="gmail-m_7920355776676259017divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Van:</b> Cory Quammen <<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>><br>
<b>Verzonden:</b> dinsdag 9 januari 2018 15:30<br>
<b>Aan:</b> Ahmad .<br>
<b>CC:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Onderwerp:</b> Re: [Paraview] Scaling cylinder glyph's radius and height individually</font>
<div>Â </div>
</div>
<div class="gmail-m_7920355776676259017BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="gmail-m_7920355776676259017PlainText"><span class="gmail-">Hi Ahmad,<br>
<br>
Alas, reading the code of vtkGlyph3D, you cannot orient by a vector<br>
array different from the vector array used to do the scaling using the<br>
functionality in ParaView. You would have to modify either<br>
vtkPVGlyphFilter or its parent class vtkGlyph3D, to do this, and<br>
expose the new VTK class through a ParaView plugin [1]. A simple<br>
modification would be to add a ScaleMode, say VTK_SCALE_BY_NORMAL, to<br>
vtkGlyph3D, and then set the active normals in your data set to the<br>
vector by which you wish to scale. Then the "vectors" property could<br>
control the orientation and the active normals would control the<br>
scale. That's kind of kludgey, but it would be a fairly fast<br>
modification to make.<br>
<br>
HTH,<br>
Cory<br>
<br>
[1] <a href="https://www.paraview.org/Wiki/ParaView/Plugin_HowTo" id="gmail-m_7920355776676259017LPlnk323158" target="_blank">
https://www.paraview.org/Wiki/<wbr>ParaView/Plugin_HowTo</a>
</span><div id="gmail-m_7920355776676259017LPBorder_GT_15160951573260.901176841319673" style="margin-bottom:20px;overflow:auto;width:100%;text-indent:0px">
<table id="gmail-m_7920355776676259017LPContainer_15160951573190.5653148388305569" cellspacing="0" style="width:90%;background-color:rgb(255,255,255);overflow:auto;padding-top:20px;padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);border-bottom:1px dotted rgb(200,200,200)">
<tbody>
<tr valign="top">
<td id="gmail-m_7920355776676259017TextCell_15160951573220.45662686634328775" colspan="2" style="vertical-align:top;padding:0px;display:table-cell">
<div id="gmail-m_7920355776676259017LPRemovePreviewContainer_15160951573220.4686750673534035"></div>
<div id="gmail-m_7920355776676259017LPTitle_15160951573220.5144081708274486" style="color:rgb(0,120,215);font-weight:400;font-size:21px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;line-height:21px">
<a id="gmail-m_7920355776676259017LPUrlAnchor_15160951573230.7049794622686174" href="https://www.paraview.org/Wiki/ParaView/Plugin_HowTo" style="text-decoration:none" target="_blank">ParaView/Plugin HowTo - KitwarePublic</a></div>
<div id="gmail-m_7920355776676259017LPMetadata_15160951573240.3186150027799246" style="margin:10px 0px 16px;color:rgb(102,102,102);font-weight:400;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:14px">
<a href="http://www.paraview.org" target="_blank">www.paraview.org</a></div>
<div id="gmail-m_7920355776676259017LPDescription_15160951573250.502059859586724" style="display:block;color:rgb(102,102,102);font-weight:400;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:20px;max-height:100px;overflow:hidden">
Introduction. ParaView comes with plethora of functionality bundled in: several readers, multitude of filters, quite a few different types of views etc.</div>
</td>
</tr>
</tbody>
</table>
</div><div><div class="gmail-h5">
<br>
<br>
<br>
<br>
On Tue, Jan 9, 2018 at 7:43 AM, Ahmad . <<a href="mailto:super_achie@hotmail.com" target="_blank">super_achie@hotmail.com</a>> wrote:<br>
> Just want to add that a programmatic (C++) solution is preferred rather than<br>
> using the GUI<br>
><br>
><br>
> I have a C++ pipeline where I can set the properties of the cylinder glyph<br>
> with vtkSMPropertyHelper.<br>
><br>
> I have looked in filters.xml under vtkPVGlyphFilter source proxy (file<br>
> located in<br>
> <paraview_home>/ParaViewCore/<wbr>ServerManager/SMApplication/<wbr>Resources) to see<br>
> what my options are, but there is only one "SetInputArrayToProcess" that<br>
> takes a vector attribute as input; nothing about a vector specifically for<br>
> orientation..<br>
><br>
> Suggestions on how to handle this issue, are very welcome; other approaches<br>
> than mine as well!<br>
><br>
> ______________________________<wbr>__<br>
> Van: Ahmad . <<a href="mailto:super_achie@hotmail.com" target="_blank">super_achie@hotmail.com</a>><br>
> Verzonden: maandag 8 januari 2018 20:52<br>
> Aan: <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
> Onderwerp: Re: Scaling cylinder glyph's radius and height individually<br>
><br>
><br>
> Following up on my own question, I found out that if I scale by "Vector<br>
> Components" it is possible to change the length of the cylinders with the<br>
> second vector index, and the radius with the first and third. I need to<br>
> rearrange my attribute data as such: [radius_x, length, radius_z]. If I keep<br>
> radius_x == radius_z, then the cylinder will not deform, and the cross<br>
> section stays a perfect circle. See the image in the attachment please.<br>
><br>
><br>
> BUT the problem here is that "vector components" also affects the<br>
> orientation of my cylindrical glyphs. I can turn this off in the properties<br>
> menu, but I need to orient my cylinders based on another vector attribute<br>
> data...<br>
><br>
><br>
> I feel I'm getting somewhere, but if someone could give me an idea on how to<br>
> now orient my glyphs with another vector data than the one I use now for<br>
> scaling, that would be much appreciated!<br>
><br>
><br>
> Best,<br>
> Ahmad<br>
><br>
> ______________________________<wbr>__<br>
> Van: Ahmad . <<a href="mailto:super_achie@hotmail.com" target="_blank">super_achie@hotmail.com</a>><br>
> Verzonden: maandag 8 januari 2018 18:01<br>
> Aan: <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
> Onderwerp: Scaling cylinder glyph's radius and height individually<br>
><br>
><br>
> Dear community,<br>
><br>
><br>
> When I try to scale cylindrical glyph objects by a 'Scalar', it scales both<br>
> the radius and height of the glyphs.<br>
><br>
> Is there a way to scale the radius by a Scalar1, and the height be a<br>
> Scalar2?<br>
><br>
><br>
> I have an unstructured grid, and for each point I want to create a cylinder<br>
> that can have an arbitrary radius and height.<br>
><br>
> I thought Glyphs would be the way to go, but I'm kind of stuck with this<br>
> issue.<br>
><br>
><br>
> Any help is much appreciated; or if you can recommend a different way to<br>
> achieve the above-mentioned please let me know!<br>
><br>
><br>
> Best,<br>
><br>
> Ahmad<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" id="gmail-m_7920355776676259017LPlnk262878" target="_blank">
www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" id="gmail-m_7920355776676259017LPlnk410099" target="_blank">
http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" id="gmail-m_7920355776676259017LPlnk495188" target="_blank">
http://paraview.org/Wiki/<wbr>ParaView</a>
</div></div><div id="gmail-m_7920355776676259017LPBorder_GT_15160951864370.8894686904668709" style="margin-bottom:20px;overflow:auto;width:100%;text-indent:0px">
<table id="gmail-m_7920355776676259017LPContainer_15160951864300.1606043362751577" cellspacing="0" style="width:90%;background-color:rgb(255,255,255);overflow:auto;padding-top:20px;padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);border-bottom:1px dotted rgb(200,200,200)">
<tbody>
<tr valign="top">
<td id="gmail-m_7920355776676259017TextCell_15160951864320.09292520964496398" colspan="2" style="vertical-align:top;padding:0px;display:table-cell">
<div id="gmail-m_7920355776676259017LPRemovePreviewContainer_15160951864320.07061334189478541"></div>
<div id="gmail-m_7920355776676259017LPTitle_15160951864320.9156522692452151" style="color:rgb(0,120,215);font-weight:400;font-size:21px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;line-height:21px">
<a id="gmail-m_7920355776676259017LPUrlAnchor_15160951864340.7720278854180929" href="http://paraview.org/Wiki/ParaView" style="text-decoration:none" target="_blank">ParaView - KitwarePublic</a></div>
<div id="gmail-m_7920355776676259017LPMetadata_15160951864340.06410522705288724" style="margin:10px 0px 16px;color:rgb(102,102,102);font-weight:400;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:14px">
<a href="http://paraview.org" target="_blank">paraview.org</a></div>
<div id="gmail-m_7920355776676259017LPDescription_15160951864360.8782541473243133" style="display:block;color:rgb(102,102,102);font-weight:400;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:20px;max-height:100px;overflow:hidden">
ParaView is an open-source, multi-platform application designed to visualize data sets of varying sizes from small to very large. The goals of the ParaView project ...</div>
</td>
</tr>
</tbody>
</table>
</div><span class="gmail-">
<br>
<br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" id="gmail-m_7920355776676259017LPlnk473223" target="_blank">
http://markmail.org/search/?q=<wbr>ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://paraview.org/mailman/listinfo/paraview" id="gmail-m_7920355776676259017LPlnk985531" target="_blank">
https://paraview.org/mailman/<wbr>listinfo/paraview</a>
</span><div id="gmail-m_7920355776676259017LPBorder_GT_15160952164360.747843423935074" style="margin-bottom:20px;overflow:auto;width:100%;text-indent:0px">
<table id="gmail-m_7920355776676259017LPContainer_15160952164280.5526123083289194" cellspacing="0" style="width:90%;background-color:rgb(255,255,255);overflow:auto;padding-top:20px;padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);border-bottom:1px dotted rgb(200,200,200)">
<tbody>
<tr valign="top">
<td id="gmail-m_7920355776676259017TextCell_15160952164310.2350931640911451" colspan="2" style="vertical-align:top;padding:0px;display:table-cell">
<div id="gmail-m_7920355776676259017LPRemovePreviewContainer_15160952164310.130286894287587"></div>
<div id="gmail-m_7920355776676259017LPTitle_15160952164310.471364220416876" style="color:rgb(0,120,215);font-weight:400;font-size:21px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;line-height:21px">
<a id="gmail-m_7920355776676259017LPUrlAnchor_15160952164320.02103582505183299" href="https://paraview.org/mailman/listinfo/paraview" style="text-decoration:none" target="_blank">ParaView Info Page</a></div>
<div id="gmail-m_7920355776676259017LPMetadata_15160952164330.29816928307384605" style="margin:10px 0px 16px;color:rgb(102,102,102);font-weight:400;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:14px">
<a href="http://paraview.org" target="_blank">paraview.org</a></div>
<div id="gmail-m_7920355776676259017LPDescription_15160952164340.46708323655404693" style="display:block;color:rgb(102,102,102);font-weight:400;font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;line-height:20px;max-height:100px;overflow:hidden">
To see the collection of prior postings to the list, visit the ParaView Archives. Using ParaView: To post a message to all the list members, send ...</div>
</td>
</tr>
</tbody>
</table>
</div><span class="gmail-">
<br>
<br>
><br>
<br>
<br>
<br>
-- <br>
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<br>
</span></div>
</span></font></div>
</div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div></div></div>