<div dir="ltr">Hey Rich!<div><br></div><div>I recommend reading in the data directly with the CSV reader.</div><div><br></div><div>Then apply the table to points filter to convert the data from a table to a point set. In the T2P filter you specify which columns are x,y,z and which are normal arrays.</div><div><br></div><div>From there you can apply the glyph filter to scale and orient the ellipsoids. Getting the scaling right may take a bit more work (a calculator filter, preferably the numpy version) to get the orientation angles into a 3 component wide vector array that the glyph filter knows how to work with.</div><div><br></div><div>Doing it this way will be much more efficient since ParaView prefers few proxies(think actors) with many elements over many proxies each with few elements. It will be more efficient still if you use GL2 and the point gaussian representation, which will do the transform on the GPU.</div><div><br></div><div>hth</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Mon, Mar 21, 2016 at 4:58 PM, Cook, Rich <span dir="ltr"><<a href="mailto:cook47@llnl.gov" target="_blank">cook47@llnl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
Hi,
<div>I have a user that supplies me with a text file of ellipsoids specified by location, rotation, and axis, from which I plan to create Spheres modified by the Transform operator to make ellipsoids. I can write a function that basically does this:
</div>
<div><br>
</div>
<div>ellipsoids = open(filename, 'r').read()</div>
<div>for ellipse in ellipsoids:</div>
<div><span style="white-space:pre-wrap"></span>sphere1 = Sphere()</div>
<div><span style="white-space:pre-wrap"></span>renderView1 = GetActiveViewOrCreate('RenderView')<br>
<span style="white-space:pre-wrap"></span>sphere1Display = Show(sphere1, renderView1)<br>
<span style="white-space:pre-wrap"></span>transform1 = Transform(Input=sphere1)<br>
<span style="white-space:pre-wrap"></span>transform1.Transform = 'Transform'<br>
<span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>transform1.Transform.Translate = [0.0, 2.0, 0.0]<br>
<span style="white-space:pre-wrap"></span>transform1.Transform.Rotate = [0.0, 65.0, 76.0]<br>
<span style="white-space:pre-wrap"></span>transform1.Transform.Scale = [1.0, 2.0, 1.0]<br>
<span style="white-space:pre-wrap"></span>transform1Display = Show(transform1, renderView1)<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>My question is, how can I use this approach to provide her a macro in the GUI somehow to read her file and populate her scene with ellipsoids? I hope this question is clear enough. </div>
<div><br>
</div>
<div>Thanks. </div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>
<div><span style="border-collapse:separate;font-size:13px;border-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div>-- </div>
<div>✐Richard Cook </div>
<div>✇ Lawrence Livermore National Laboratory</div>
<div>Bldg-453 Rm-4024, Mail Stop L-557 </div>
<div>7000 East Avenue, Livermore, CA, 94550, USA</div>
<div>☎ (office) <a href="tel:%28925%29%20423-9605" value="+19254239605" target="_blank">(925) 423-9605</a> </div>
<div>☎ (fax) <a href="tel:%28925%29%20423-6961" value="+19254236961" target="_blank">(925) 423-6961</a></div>
<div>---</div>
<div>Information Management & Graphics Grp., Services & Development Div., Integrated Computing & Communications Dept.</div>
<div>(opinions expressed herein are mine and not those of LLNL)</div>
<br>
</span></span></span></span></span></span></span><br>
</span></div>
<br>
</div>
</font></span></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>