Re: [Paraview] Collaboration between "Python Shell" and "Programmable Source Python Script"

2013-05-13 Thread Hal Canary
The only other idea I have is to load the information directly from the programmable source. I once wrote a programmable source that queried an external process to populate data arrays. On May 13, 2013, at 4:30 AM, Сергей Дмитриев wrote: > Sorry, but that is not what I want to see. Your metho

Re: [Paraview] Collaboration between "Python Shell" and "Programmable Source Python Script"

2013-05-12 Thread Hal Canary
On 05/12/2013 07:43 AM, Сергей Дмитриев wrote: Hello. I make the following data from the "Python Shell" in "Programmable Source" In the "Python Shell" I write the following: src=ProgrammableSource() src.add_attribute('MyArray',[1,2,3]) Show() In the ProgrammableSource Script I write th

Re: [Paraview] Newbie question on Python Programmable Filters

2012-09-04 Thread Hal Canary
On 09/04/2012 02:20 PM, Frank Horowitz wrote: x = inputs[0].PointData['Scalars_'] I thought one needs to convert a vtkarray to a numpy array with x = numpy.array(inputs[0].PointData['Scalars_']) before doing anything with it. ___ Powered by

Re: [Paraview] Paraview binary format

2012-08-17 Thread Hal Canary
The legacy VTK formats are agnostic with respect to endinaness, which is one reason why I almost never use the binary versions of them. If you can't link to VTK and use vtkXMLImageDataWriter, as David suggested, then another option is to write a small C++ or Python program to convert from lega

Re: [Paraview] Integrate a scalar over a volume

2012-08-16 Thread Hal Canary
On 08/15/2012 07:10 PM, Jean Hertzberg wrote: I am trying to integrate a scalar over a 3D volume. I was surprised to find that the Integrate Variables filter does not do this; when integrating a scalar variable of 1 over a cube of size 1 X 1 X 1, Integrate Variables returns the value of 6. The do

Re: [Paraview] Loading binary file with header

2012-08-13 Thread Hal Canary
On 08/13/2012 11:23 AM, james.wal...@diamond.ac.uk wrote: I am trying to a binary file which has: dimensions: 200 x 200 x 478 80 byte header 8bit grey-scale color I have been trying to use the Raw (binary) Files reader with various parameters, but I am been unsuccessful in displaying the object

Re: [Paraview] Copy sources repeatedly with Programmable Filter

2012-08-13 Thread Hal Canary
On 08/11/2012 08:48 PM, Magician wrote: What I want to do is: 1. Read or generate one source (Box, Sphere, or other PolyData) 2. Copying it repeatedly (hundreds of copies, along both x and y axes) Have you tried the Glyph With Custom Source? http://cs.unc.edu/~hal/images/glyph-with-cust

Re: [Paraview] Copy sources repeatedly with Programmable Filter

2012-08-11 Thread Hal Canary
On 08/11/2012 09:16 AM, Magician wrote: I'm trying to copy vtkPolyData sources with Programmable Filter. My latest code is here: > input = self.GetPolyDataInput() > output = self.GetPolyDataOutput() > points = vtk.vtkPoints() > for i in range(0, input.GetNumberOfPoints()): > point_i = input.

Re: [Paraview] Opening Tiff file in ParaView (by converting to raw)

2012-08-10 Thread Hal Canary
On 08/09/2012 04:24 AM, james.wal...@diamond.ac.uk wrote: I am trying to open some Tiff (.tif) files in ParaView, which contain an image sequence. I have converted the Tiff files to .raw format (using ImageJ) and opened them in ParaView using the "Raw (binary) Files" reader. But I am unable displ

Re: [Paraview] Opening Tiff file in ParaView (by converting to raw)

2012-08-09 Thread Hal Canary
On 08/09/2012 04:24 AM, james.wal...@diamond.ac.uk wrote: I am trying to open some Tiff (.tif) files in ParaView, which contain an image sequence. I have converted the Tiff files to .raw format (using ImageJ) and opened them in ParaView using the "Raw (binary) Files" reader. But I am unable displ

Re: [Paraview] Calculation of eigenvalues of velocity tensors

2012-08-06 Thread Hal Canary
On 08/06/2012 10:27 AM, Janusz Michalik wrote: Hi Hal. I'm trying to use this filter that you attached but I get errors. This is what I'm doing and I'm not sure what is wrong: 1) Take the GradientOfUnstructuredData in the Paraview filters which gives me the velocity tensor with components numbe

Re: [Paraview] injecting objects from python

2012-06-19 Thread Hal Canary
On 06/19/2012 07:24 AM, Gertjan van Zwieten wrote: Hi Hal, thanks for your quick reply and the example code. That's very helpful. I do have these remaining questions that perhaps you could help me with: * In your experience, is a programmable source a suitable place to call a potentially l

Re: [Paraview] injecting objects from python

2012-06-19 Thread Hal Canary
On 06/19/2012 06:10 AM, Gertjan van Zwieten wrote: [...] So my question is simply if it is possible to inject objects from python into an already running or separately spawned paraview instance? If so, any pointers in that direction (an example script?) would of course be enormously helpful. I

[Paraview] ProgrammableSource script executed multiple times on Render()

2012-06-04 Thread Hal Canary
).Visibility = 1 Render() It prints out once when I turn on visibility and two more times when I Render(). How can I keep the script from running more than once? Thanks! -- Hal Canary ___ Powered by www.kitware.com Visit other Kitware open-sourc

Re: [Paraview] advice on saving outputs

2012-05-20 Thread Hal Canary
ing step. This separates the tasks of producing data and converting it to VTK format. -- Hal Canary ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages o

Re: [Paraview] points shape

2012-05-10 Thread Hal Canary
On 05/10/2012 12:35 PM, Dinesh Kumar wrote: > Is there a way to change shape of points in data representation from > squares to circles? I know I can change the size. Use a glyph filter, then set the glyph type to 2D glyph, and then set the glyph type to filled circle. _

[Paraview] setting the Glyph filter' SetScaleFactor value in a macro

2012-04-17 Thread Hal Canary
MaskPoints=0, Vectors=['POINTS', vector2], Scalars=['POINTS', scalar2], GlyphTransform="Transform2", GlyphType="Arrow", Orient=1 ) arrowGlyph.SetScaleFactor = 0.01

Re: [Paraview] PVPython: paraview.vtk not the same as vtk

2012-04-02 Thread Hal Canary
On 04/02/2012 04:45 PM, Pat Marion wrote: You can import paraview.vtk.io to access the xml writer. Thanks! import paraview.vtk.io writer = paraview.vtk.io.vtkXMLImageDataWriter() worked perfectly. No need to install VTK when I already have ParaView! -- Hal Canary http

[Paraview] PVPython: paraview.vtk not the same as vtk

2012-04-02 Thread Hal Canary
## Unfortunately, this tends to fail because paraview.vtk.vtkXMLImageDataWriter does not exist. The only way I can get this to work is to install both VTK and ParaView and mix calls to the paraview.vtk the vtk modules. This seems redundant. Is there a better way? Thanks, -- Hal Canary _

Re: [Paraview] Getting the axis-aligned bounding box of an object with Python

2012-03-03 Thread Hal Canary
On 3/3/2012 3:00 PM, Olumide wrote: > Hi - > > Would someone kindly tell me how to compute the axis-aligned bounding > box of an object with Python. > > Thanks, > > - Olumide (xmin,xmax,ymin,ymax,zmin,zmax) = GetActiveSource().GetDataInformation().GetBounds() _

Re: [Paraview] Bug with MaskPoints + GaussianSplatter pipeline/

2012-02-08 Thread Hal Canary
On 2/8/2012 10:09 AM, Hal Canary wrote: > Attached is a .xml plugin for a Gaussian Splatter filter class that uses > VTK's vtkGaussianSplatter class. Ignore this part of my email. I hadn't realized that 3.12 already has this exposed as the Gaussian Resampling filter. It was

[Paraview] Exposing VTK Texture Transforms within ParaView

2011-12-08 Thread Hal Canary
ion) to the Animation View. I've made even less progress on this front. Thanks! Hal Canary [1] http://www.vtk.org/Wiki/ParaView/Plugin_HowTo ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/