[Paraview] how to write boundary (face) data for 3D tetrahedra (cells) in ASCII VTK file for Paraview visualization? separate value for each face
March 14, 2009 Hi, I am not using the VTK software, but I am writing a VTK file to visualize with Paraview. I have one problem--writing data for the face (boundary) of my 3D tetrahedra (cells). Does anyone know how to do this for an unstructured grid in vtk? The cells are 3D tetrahedra. Currently I use CELL_DATA and FIELD type in writing my ASCII file: (each tetrahedra gets 4 values for each of the 4 faces) CELL_DATA 7927 FIELD FieldData 1 Boundary 4 7927 int 0 0 0 2 0 0 0 0 0 1 0 2 0 0 1 0 0 0 0 0 0 3 0 3 etc. I have no idea if Paraview (or the vtk file format) knows which number goes to which face. I'm using the .inp file face numbering system. But when I visualize this in Paraview it doesn't seem to work well. There are surfaces with boundary values higher than 3. Most of the picture is correct, but the tetrahedra (cells) on the corners between boundary groups display wrong values. I found a similar question on Kitwares mailing list 10 years ago but there were no responses I could find. http://public.kitware.com/pipermail/vtkusers/1999-November/052114.html If you can help it would be greatly appreciated. Thanks. Joy, Victor Udoewa Research Fellow CERECAM University of Cape Town http://www.cerecam.uct.ac.za/ __ UNIVERSITY OF CAPE TOWN This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 4500. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity. _ ___ 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] Save camera lcoation
Hi all, Is it possible to save camera locations to be easily accessible form the gui? Rather than having to change the values in adjust camera? Cheers Jon ___ 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] Creating Animation in Paraview by Python scripting
Rouzbeh, I've attached an example script showing how to create a camera animation. This example simply orbits the camera about the focal point. Utkarsh On Tue, Mar 10, 2009 at 12:30 PM, Rouzbeh Maani rma...@win.trlabs.ca wrote: Hello everybody I want to create an animation by Python scripting. I would like to set the position of camera in each frame(e.g. in the animation I want the camera to rotate around the object), but I could not find any example in which the position of the camera can be set in each frame. I would appreciate if anybody could help me. best regards Rouzbeh ___ 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 from paraview.servermanager import * # Initialization to set up some visualization if not ActiveConnection: Connect() cylinder = sources.CylinderSource() view = CreateRenderView() repr = CreateRepresentation(cylinder, view) view.ResetCamera() # Create an animation scene scene = animation.AnimationScene() # Add the view to the scene scene.ViewModules = [view] # Set the number of frame in one loop. scene.NumberOfFrames = 1000 # Create an animation cue for the camera. This represents the track shown in # the Animation View. cue = animation.CameraAnimationCue() cue.AnimatedProxy = view # Add this cue to the scene. scene.Cues = [cue] # Now create keyframes. Let's say we are going to orbit around the object. camera = view.GetActiveCamera() num_of_keyframes = 10 for i in range(0, num_of_keyframes): camera.Azimuth(360.0/num_of_keyframes) keyframe = animation.CameraKeyFrame() # set the value of the key frame to the current camera location. keyframe.KeyTime = i*1.0/num_of_keyframes keyframe.Position = camera.GetPosition() keyframe.FocalPoint = camera.GetFocalPoint() keyframe.ViewUp = camera.GetViewUp() keyframe.ViewAngle = camera.GetViewAngle() cue.KeyFrames.append(keyframe) # Play the animation scene.Play() ___ 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] Rendering a scene from a reader GUI while staying at background?
Hi, I am now trying to add a simple watch a running simulation feature to my reader GUI. It works such that every time a QTimer times out a rescan for new timesteps and the following piece of code are run // set animation time to the last timestep and render the scene QListpqAnimationScene* scenes = app-getServerManagerModel()-findItemspqAnimationScene *(); foreach (pqAnimationScene *scene, scenes) { scene-setAnimationTime(latestTime); } where latestTime is the time value of the last timestep pulled from the reader proxy. The code itself works fine, but what annoys me a lot is that whenever a new time step is detected the ParaView GUI pops up to the foreground in order to render the scene, at least on OS X. I would rather like to keep ParaView as a background task while watching a simulation. So here are my questions: is there any way that I can set the animation time and render the scene like the code above, but while staying at backgound? If yes, how is it possible? Thanks, Takuya Takuya OSHIMA, Ph.D. Faculty of Engineering, Niigata University 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN ___ 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] Better names for 'representations' ?
Hey Guys, That sounds fine. I'll be happy as long as there is a slightly easier / more transparent way of identifying the representation once you know the view and source. Thanks, -Eric On Mar 12, 2009, at 12:48 PM, Berk Geveci wrote: I agree with Utkarsh. Since the user interface hides the representation objects from the user, the appropriate interface for getting representations should take (view, source) as the argument. Views on the other hand should probably be named so that it is easy to match Python names to something in the GUI. -berk On Thu, Mar 12, 2009 at 9:22 AM, Utkarsh Ayachit utkarsh.ayac...@kitware.com wrote: Eric, The request does seem reasonable. However, with the upcoming changes to the python API, it will provide better/nicer ways of locating representations irrespective of their names. So the naming issue would probably be redundant. Utkarsh On Wed, Mar 11, 2009 at 3:12 PM, Eric E. Monson emon...@cs.duke.edu wrote: Hello, I am wondering whether it would be possible or reasonable to have ParaView match the names of proxies in 'sources' and 'representations'? When working from Python, it's easy to get a proxy from 'sources' if you know its name from the pipeline. The name even changes when you edit it in the pipeline. In contrast, 'representations' proxies are named 'DataRepresentation1', 'DataRepresentation2', etc., and to find the proper proxy I always have iterate through the representation proxies and check for a match between the proxy from 'sources' and the representation proxy Input. Since I don't understand much about all the client/server/proxy stuff, I don't know if this is a reasonable request, or if it's difficult for PV to do things internally like change the representation name when the source name is changed. Thanks, -Eric -- Eric E Monson Duke Visualization Technology Group ___ 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 ___ 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] Resample with dataset.
Hi Berk, Thanks for the heads up, I noticed that I was renaming the input as well, but in some ways that's exactly what I want. So if that's the only problem then I think I'll live with it until this other layer appears ! Thanks ! Jacques 2009/3/12 Berk Geveci berk.gev...@kitware.com Unfortunately, this is not the correct way of doing it. You are changing the name of the output array which happens to also be the input array (thanks to CopyAttributes). Changing your input in a filter is a no no in VTK. You have to deep copy the attributes if you want to do this. In the future, I think we will create another level of indirection such that it will be possible to shallow copy the contents of arrays (i.e. the pointer) for the purpose of renaming (and else). -berk On Sun, Mar 8, 2009 at 7:50 AM, Jacques Papper jpap...@ara.co.uk wrote: Hi all, I made a quick modification to the vtkProbeFilter.cxx to pass the input data as well as the interpolated data to the output. This is so I can calculate deltas between two configurations without having to use a python programmable filter. Could you tell me if you think this modification is the right way of doing what I want? (It seems to work, but I'm not absolutely sure this is a correct way of doing things.) // First, copy the input to the output as a starting point output-CopyStructure(input); output-CopyAttributes(input); //JP - copies input data as well vtkPointData* outPD; outPD = output-GetPointData(); // Change name of input data int numArrays = outPD-GetNumberOfArrays(); for(int i = 0 ; i numArrays; ++i){ vtkAbstractArray * absar = outPD-GetAbstractArray(i); absar-SetName(strcat(absar-GetName(),_original)); } Jacques PAPPER Applied CFD Team Leader Tel: +44 (0) 1234 324677 --- This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ___ 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 ___ 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] Resample with dataset.
If you start weird things happening (like filters executing when they shouldn't), don't say I didn't warn you :-) On Fri, Mar 13, 2009 at 3:05 PM, Jacques Papper jacques.pap...@gmail.com wrote: Hi Berk, Thanks for the heads up, I noticed that I was renaming the input as well, but in some ways that's exactly what I want. So if that's the only problem then I think I'll live with it until this other layer appears ! Thanks ! Jacques 2009/3/12 Berk Geveci berk.gev...@kitware.com Unfortunately, this is not the correct way of doing it. You are changing the name of the output array which happens to also be the input array (thanks to CopyAttributes). Changing your input in a filter is a no no in VTK. You have to deep copy the attributes if you want to do this. In the future, I think we will create another level of indirection such that it will be possible to shallow copy the contents of arrays (i.e. the pointer) for the purpose of renaming (and else). -berk On Sun, Mar 8, 2009 at 7:50 AM, Jacques Papper jpap...@ara.co.uk wrote: Hi all, I made a quick modification to the vtkProbeFilter.cxx to pass the input data as well as the interpolated data to the output. This is so I can calculate deltas between two configurations without having to use a python programmable filter. Could you tell me if you think this modification is the right way of doing what I want? (It seems to work, but I'm not absolutely sure this is a correct way of doing things.) // First, copy the input to the output as a starting point output-CopyStructure(input); output-CopyAttributes(input); //JP - copies input data as well vtkPointData* outPD; outPD = output-GetPointData(); // Change name of input data int numArrays = outPD-GetNumberOfArrays(); for(int i = 0 ; i numArrays; ++i){ vtkAbstractArray * absar = outPD-GetAbstractArray(i); absar-SetName(strcat(absar-GetName(),_original)); } Jacques PAPPER Applied CFD Team Leader Tel: +44 (0) 1234 324677 --- This email contains information that is private and confidential and is intended only for the addressee. If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender. Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons. Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245 ___ 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 ___ 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] Feature request
I am not trying to shoot your idea down. I am trying to understand the use case better. My biggest issue is that I always end up editing the display settings when the wrong view is active. I am not sure how to solve that problem. What is the particular problem in your case? You have a large pipeline and you want to quickly get to an object to modify its parameters? What if you could just select the object in the view? -berk On Thu, Mar 12, 2009 at 5:23 PM, Renato Elias rnel...@gmail.com wrote: I see... I have not thought about this possibility. Maybe cloning the object's name in the views that it's owned by. I don't know... I was just willing to suggest a way to make the pipeline's representation more organized and easy to understand when we have mutiple views... Renato. On Thu, Mar 12, 2009 at 5:31 PM, Berk Geveci berk.gev...@kitware.com wrote: OK, how do you decide which object belongs to which view? An object can be shown in more than one view. -berk On Thu, Mar 12, 2009 at 2:16 PM, Renato Elias rnel...@gmail.com wrote: Oops, sorry for not being more clear. I was thinking about grouping by objects itself, not by visibility. In this way we would have something like this: view_1 dataset_1 filter_1.1 filter_1.2 view_2 dataset_2 filter_2.1 filter_2.2 view_3 dataset_3 filter_3.1 filter_3.2 and so on... Regards Renato. On Thu, Mar 12, 2009 at 2:56 PM, Berk Geveci berk.gev...@kitware.com wrote: Can you be more specific? Grouped based on visibility? Is the idea to quickly find the panel of an object you see in a view? -berk On Thu, Mar 12, 2009 at 9:40 AM, Renato Elias rnel...@gmail.com wrote: Just a suggestion: It would be great have the pipeline objects grouped when we have multiple views. Sometimes, when the pipeline is large, it's hard to find what object is in each view just looking for the visibility icon (that small eye). Cheers Renato. p.s.: I forgot the link to the bug/feature request system ___ 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