Hey Rich! I recommend reading in the data directly with the CSV reader.
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. >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. 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. hth David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Mar 21, 2016 at 4:58 PM, Cook, Rich <[email protected]> wrote: > Hi, > 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: > > ellipsoids = open(filename, 'r').read() > for ellipse in ellipsoids: > sphere1 = Sphere() > renderView1 = GetActiveViewOrCreate('RenderView') > sphere1Display = Show(sphere1, renderView1) > transform1 = Transform(Input=sphere1) > transform1.Transform = 'Transform' > transform1.Transform.Translate = [0.0, 2.0, 0.0] > transform1.Transform.Rotate = [0.0, 65.0, 76.0] > transform1.Transform.Scale = [1.0, 2.0, 1.0] > transform1Display = Show(transform1, renderView1) > > > 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. > > Thanks. > > -- > ✐Richard Cook > ✇ Lawrence Livermore National Laboratory > Bldg-453 Rm-4024, Mail Stop L-557 > 7000 East Avenue, Livermore, CA, 94550, USA > ☎ (office) (925) 423-9605 > ☎ (fax) (925) 423-6961 > --- > Information Management & Graphics Grp., Services & Development Div., > Integrated Computing & Communications Dept. > (opinions expressed herein are mine and not those of LLNL) > > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
