Re: [Paraview] Sum values of scalar vector
Hi, in a programmable Filter do something like this: import math input = self.GetInputDataObject(0, 0) output = self.GetOutputDataObject(0) COUNT=input.GetNumberOfPoints() pd=input.GetPointData() m=0 v=0 for i in xrange(COUNT): r=pd.GetArray('radius').GetValue(i) v=v+((4.0/3.0)*math.pi*r*r*r) m=m+pd.GetArray('Mass').GetValue(i) outputarray = vtk.vtkStringArray() outputarray.SetName(Text) outputarray.SetNumberOfTuples(1) outputarray.SetValue(0,N=%d\nV=%1.6f m³\nm=%1.6f kg % (COUNT,v,m)) output.GetRowData().AddArray(outputarray) Attention: if you save this to a state-file change the ³ to 3 because it will not be escaped and you can not load the state anymore. best wishes, Christian Am 02.11.2012 21:49, schrieb Scott Ripplinger: I need to sum all the values in a vector of a scalar property. I've struggled understanding the documentation for the python calculator and programmable filter, mainly in how to access the point data that I want to use. Any tips will be appreciated. ___ 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 Follow this link to subscribe/unsubscribe: http://www.paraview.org/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 Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
[Paraview] how to select data for Plot Variables over Time?
Hello, I'm trying to calculate volumes that I'm generating, how they change over time. To get the volume, I do Polydata - Gaussian Resampling - IsoVolume - Integrate Variables, Cell Data, and the results are pretty good. I want to get this data for every timestep, e.g. in a table that I can export and analyze externally. I tried applying Plot Global Variables Over Time when Integrate Variables is selected, but the resulting dataset has 0 for vtkValidPointMask at every timestep. I tried selecting Integrate Variables in these ways: - Integrate Variables filter in the pipeline browser - In Spreadsheet View, going to Integrate Variables - Cell Data and clicking on the row with the volume info (which is the only row) - In 3D view, visualizing integrate variables (it's a point) and doing Select Points On or Select Points through, per this post: http://www.mail-archive.com/paraview@paraview.org/msg05757.html (where it apparently worked) Any advice? Celia ___ 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 Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] ParaView thinks that it does not have a wind blade reader
At this point the changes will have to wait, unfortunately. For the past two weeks I've been involved with a TopoInVis submission so I couldn't get around to it. I'll look at it this weekend. No need to wait for me. On Thu, Nov 1, 2012 at 10:29 AM, Andy Bauer andy.ba...@kitware.com wrote: We're getting ready for a pre-release of PV 4.0 now so we'll need this soon. If we need to update to a newer WindBlade file for the test, we can do that too. You'll have to think though on how to handle backwards compatibility. Andy On Wed, Oct 31, 2012 at 12:37 PM, Sohail Shafii sssha...@ucdavis.eduwrote: Well you probably know already, but I won't be able to make the changes right now. I have a submission due this Friday. The reader still works for newer data sets but fails for the outdated one that you guys use for testing. So the fixes will have to come later. On Fri, Oct 26, 2012 at 2:39 PM, Andy Bauer andy.ba...@kitware.comwrote: This change is only in VTK in gerrit so you need to follow the directions there to check out the code and run the test. The directions are at http://review.source.kitware.com/#/t/1396/ I'm not sure why paraview is crashing though. I'll check on that. andy On Fri, Oct 26, 2012 at 5:06 PM, Sohail Shafii sssha...@ucdavis.eduwrote: Current master version can't launch (MacOS Mountain Lion): paraview(575,0x7fff72e33180) malloc: *** error for object 0x111058450: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Program received signal SIGABRT, Aborted. 0x7fff82432212 in __pthread_kill () (gdb) bt 14 #0 0x7fff82432212 in __pthread_kill () #1 0x7fff87964af4 in pthread_kill () #2 0x7fff879a8dce in abort () #3 0x7fff8797c959 in free () #4 0x7fff5fc0762a in __dyld__ZN4dyldL12registerDOFsERKNSt3__16vectorIN11ImageLoader7DOFInfoENS0_9allocatorIS3_ () #5 0x7fff5fc0f06b in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbbRKNS_10RPathChainE () #6 0x7fff5fc04ce4 in __dyld__ZN4dyld4linkEP11ImageLoaderbRKNS0_10RPathChainE () #7 0x7fff5fc0a81a in __dyld_dlopen () #8 0x7fff8ac96dd8 in dlopen () #9 0x7fff83dcfa10 in gfxInitializeLibrary () #10 0x00011e6014fe in gliInitializeLibrary () #11 0x7fff8a4f63e6 in glcPluginCount () #12 0x7fff8a4f62a8 in glcPluginCount () #13 0x7fff8a4f6091 in glcPluginCount () (More stack frames follow...) Which version of the master works, so that I can debug? Sohail On Wed, Oct 24, 2012 at 10:04 AM, Andy Bauer andy.ba...@kitware.comwrote: A beta version will be released by mid-November. In order for the desired changes to make it in to that, the VTK part that's waiting your changes needs to go in early next week so that I can make the changes to ParaView to enable the WindBlade reader when running in either built-in mode or connecting to a serial server. Andy On Wed, Oct 24, 2012 at 12:13 PM, Sohail Shafii sohailsha...@yahoo.com wrote: Haven't had a chance yet due to a paper. I'll look at it this week. How soon will it be released? Also please respond to my sssha...@ucdavis.edu as this address is not on the paraview list anymore. Sohail -- *From:* Andy Bauer andy.ba...@kitware.com *To:* Sohail Shafii sohailsha...@yahoo.com *Cc:* David E DeMarle dave.dema...@kitware.com; migic...@gmail.com migic...@gmail.com; paraview@paraview.org paraview@paraview.org; Woodring, Jonathan L woodr...@lanl.gov *Sent:* Wednesday, October 24, 2012 8:09 AM *Subject:* Re: [Paraview] ParaView thinks that it does not have a wind blade reader Hi Sohail, Did you get a chance to look at the warnings for the vtkIOGeometryCxx-TestWindBladeReader test for the http://review.source.kitware.com/#/t/1396/ gerrit topic? It's going to need to be fixed pretty soon if it's going to make it into the ParaView 4.0 release. Thanks, Andy On Wed, Oct 3, 2012 at 10:22 PM, Andy Bauer andy.ba...@kitware.comwrote: It's available with git clone git://vtk.org/VTKLargeData.gitVTKLargeData. It's in the Data/WindBladeReader subdirectory there. On Wed, Oct 3, 2012 at 6:27 PM, Sohail Shafii sohailsha...@yahoo.com wrote: Which data set are you using for the test? If it's the single turbine data set with the curvy terrain, I don't have it (I use other data sets) so I can't do a similar test. Let me know where I can download it. Sohail -- *From:* Andy Bauer andy.ba...@kitware.com *To:* David E DeMarle dave.dema...@kitware.com *Cc:* Sohail Shafii sohailsha...@yahoo.com; migic...@gmail.com migic...@gmail.com; paraview@paraview.org paraview@paraview.org; Woodring, Jonathan L woodr...@lanl.gov *Sent:* Wednesday, October 3, 2012 3:16 PM *Subject:* Re: [Paraview] ParaView thinks that it does not have a wind blade reader I finally got around to doing the VTK part of the WindBladeReader work. It's on gerrit at
Re: [Paraview] ParaView thinks that it does not have a wind blade reader
Also I'm removing Jimmy from this list since he may not be working with wind files at this point. Sohail On Sat, Nov 3, 2012 at 1:15 PM, Sohail Shafii sssha...@ucdavis.edu wrote: At this point the changes will have to wait, unfortunately. For the past two weeks I've been involved with a TopoInVis submission so I couldn't get around to it. I'll look at it this weekend. No need to wait for me. On Thu, Nov 1, 2012 at 10:29 AM, Andy Bauer andy.ba...@kitware.comwrote: We're getting ready for a pre-release of PV 4.0 now so we'll need this soon. If we need to update to a newer WindBlade file for the test, we can do that too. You'll have to think though on how to handle backwards compatibility. Andy On Wed, Oct 31, 2012 at 12:37 PM, Sohail Shafii sssha...@ucdavis.eduwrote: Well you probably know already, but I won't be able to make the changes right now. I have a submission due this Friday. The reader still works for newer data sets but fails for the outdated one that you guys use for testing. So the fixes will have to come later. On Fri, Oct 26, 2012 at 2:39 PM, Andy Bauer andy.ba...@kitware.comwrote: This change is only in VTK in gerrit so you need to follow the directions there to check out the code and run the test. The directions are at http://review.source.kitware.com/#/t/1396/ I'm not sure why paraview is crashing though. I'll check on that. andy On Fri, Oct 26, 2012 at 5:06 PM, Sohail Shafii sssha...@ucdavis.eduwrote: Current master version can't launch (MacOS Mountain Lion): paraview(575,0x7fff72e33180) malloc: *** error for object 0x111058450: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Program received signal SIGABRT, Aborted. 0x7fff82432212 in __pthread_kill () (gdb) bt 14 #0 0x7fff82432212 in __pthread_kill () #1 0x7fff87964af4 in pthread_kill () #2 0x7fff879a8dce in abort () #3 0x7fff8797c959 in free () #4 0x7fff5fc0762a in __dyld__ZN4dyldL12registerDOFsERKNSt3__16vectorIN11ImageLoader7DOFInfoENS0_9allocatorIS3_ () #5 0x7fff5fc0f06b in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbbRKNS_10RPathChainE () #6 0x7fff5fc04ce4 in __dyld__ZN4dyld4linkEP11ImageLoaderbRKNS0_10RPathChainE () #7 0x7fff5fc0a81a in __dyld_dlopen () #8 0x7fff8ac96dd8 in dlopen () #9 0x7fff83dcfa10 in gfxInitializeLibrary () #10 0x00011e6014fe in gliInitializeLibrary () #11 0x7fff8a4f63e6 in glcPluginCount () #12 0x7fff8a4f62a8 in glcPluginCount () #13 0x7fff8a4f6091 in glcPluginCount () (More stack frames follow...) Which version of the master works, so that I can debug? Sohail On Wed, Oct 24, 2012 at 10:04 AM, Andy Bauer andy.ba...@kitware.comwrote: A beta version will be released by mid-November. In order for the desired changes to make it in to that, the VTK part that's waiting your changes needs to go in early next week so that I can make the changes to ParaView to enable the WindBlade reader when running in either built-in mode or connecting to a serial server. Andy On Wed, Oct 24, 2012 at 12:13 PM, Sohail Shafii sohailsha...@yahoo.com wrote: Haven't had a chance yet due to a paper. I'll look at it this week. How soon will it be released? Also please respond to my sssha...@ucdavis.edu as this address is not on the paraview list anymore. Sohail -- *From:* Andy Bauer andy.ba...@kitware.com *To:* Sohail Shafii sohailsha...@yahoo.com *Cc:* David E DeMarle dave.dema...@kitware.com; migic...@gmail.com migic...@gmail.com; paraview@paraview.org paraview@paraview.org; Woodring, Jonathan L woodr...@lanl.gov *Sent:* Wednesday, October 24, 2012 8:09 AM *Subject:* Re: [Paraview] ParaView thinks that it does not have a wind blade reader Hi Sohail, Did you get a chance to look at the warnings for the vtkIOGeometryCxx-TestWindBladeReader test for the http://review.source.kitware.com/#/t/1396/ gerrit topic? It's going to need to be fixed pretty soon if it's going to make it into the ParaView 4.0 release. Thanks, Andy On Wed, Oct 3, 2012 at 10:22 PM, Andy Bauer andy.ba...@kitware.comwrote: It's available with git clone git://vtk.org/VTKLargeData.gitVTKLargeData. It's in the Data/WindBladeReader subdirectory there. On Wed, Oct 3, 2012 at 6:27 PM, Sohail Shafii sohailsha...@yahoo.com wrote: Which data set are you using for the test? If it's the single turbine data set with the curvy terrain, I don't have it (I use other data sets) so I can't do a similar test. Let me know where I can download it. Sohail -- *From:* Andy Bauer andy.ba...@kitware.com *To:* David E DeMarle dave.dema...@kitware.com *Cc:* Sohail Shafii sohailsha...@yahoo.com; migic...@gmail.com migic...@gmail.com; paraview@paraview.org paraview@paraview.org; Woodring, Jonathan L woodr...@lanl.gov *Sent:* Wednesday, October 3, 2012 3:16 PM
Re: [Paraview] Problem building from source
Still more problems building... I have python wrapping turned on, and it built fine. But I tried to run a programmable filter that uses vtk.vtkExtractGrid() and it says it doesn't exist in the module. So I looked through the CMakeCache.txt and Module_vtkFiltersGeneral and Module_vtkFiltersExtraction were both set to INTERNAL and OFF. I couldn't figure out how to make them appear, so on a whim I changed them both to ON and reconfigured and regenerated. This made them appear in the ccmake screen. Then I built and no errors. However, vtkExtractGrid() is still not inside the python module vtk. But, in the install tree I have: grep vtkExtractGrid * -R Binary file lib/paraview-3.14/vtkFiltersExtractionPython.so matches Binary file lib/paraview-3.14/libvtkFiltersParallelImaging-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkFiltersExtraction-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersParallelImaging-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersExtractionPython27D-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersExtraction-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkFiltersParallel-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersGeometryPython27D-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkPVVTKExtensionsDefaultPython27D-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkPVVTKExtensionsDefault-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkFiltersGeometryPython27D-pv3.14.so matches Binary file lib/paraview-3.14/libvtkPVVTKExtensionsDefault-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersExtractionCS-pv3.14.so matches Binary file lib/paraview-3.14/libvtkImagingCorePython27D-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkImagingCorePython27D-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersExtractionPython27D-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkPVVTKExtensionsDefaultPython27D-pv3.14.so matches Binary file lib/paraview-3.14/libvtkFiltersExtractionCS-pv3.14.so.1 matches Binary file lib/paraview-3.14/libvtkFiltersParallel-pv3.14.so.1 matches So I don't know why I don't have access to it from pvpython. Any ideas what went wrong? Tim - Original Message - From: Utkarsh Ayachit utkarsh.ayac...@kitware.com To: Tim Gallagher tim.gallag...@gatech.edu Cc: ParaView list paraview@paraview.org Sent: Friday, November 2, 2012 10:41:01 AM Subject: Re: [Paraview] Problem building from source I've updated the CoProcessing WIki. Utkarsh On Fri, Nov 2, 2012 at 10:18 AM, Tim Gallagher tim.gallag...@gatech.edu wrote: Okay, thanks. I was following the directions at: http://paraview.org/Wiki/CoProcessing which do not mention anything about turning off QT-related things. Thanks, Tim From: Utkarsh Ayachit utkarsh.ayac...@kitware.com To: Tim Gallagher tim.gallag...@gatech.edu Cc: ParaView list paraview@paraview.org Sent: Friday, November 2, 2012 10:07:37 AM Subject: Re: [Paraview] Problem building from source Yes, you'll need X if QT is enabled. You'll have to turn off PARAVIEW_BUILD_QT_GUI as well. Note, additionally, you'll need to use OSMesa. Refer to instructions here: http://paraview.org/Wiki/ParaView_And_Mesa_3D Utkarsh On Thu, Nov 1, 2012 at 4:22 PM, Tim Gallagher tim.gallag...@gatech.edu wrote: blockquote Hi, I'm trying to build the code I just pulled on master: git branch * master git describe v3.14.1-2499-g16f07c1 I set VTK_USE_X to OFF: grep USE_X CMakeCache.txt VTK_USE_X:BOOL=OFF but it fails while building with: Linking CXX shared library ../../../lib/ libvtkGUISupportQt-pv3.14.so CMakeFiles/vtkGUISupportQt.dir/QVTKWidget.cxx.o: In function `QVTKWidget::x11_setup_window()': QVTKWidget.cxx:(.text+0xe65): undefined reference to `XGetWindowAttributes' QVTKWidget.cxx:(.text+0xeb9): undefined reference to `XCreateWindow' QVTKWidget.cxx:(.text+0xee7): undefined reference to `XGetWMColormapWindows' QVTKWidget.cxx:(.text+0xf31): undefined reference to `XFree' QVTKWidget.cxx:(.text+0xfdb): undefined reference to `XSetWMColormapWindows' QVTKWidget.cxx:(.text+0xff0): undefined reference to `XFree' QVTKWidget.cxx:(.text+0xff8): undefined reference to `XFlush' collect2: ld returned 1 exit status make[2]: *** [lib/libvtkGUISupportQt-pv3.14.so.1] Error 1 make[1]: *** [VTK/GUISupport/Qt/CMakeFiles/vtkGUISupportQt.dir/all] Error 2 make: *** [all] Error 2 Am I missing something? Why is VTK looking for X if I said not to use it? Does not using X imply QT shouldn't be turned on? If so, should that be enforced in CMake? Thanks, Tim ___ 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 Follow this link to