Re: [Paraview] Problems with 'interpolate scalars before mapping' in v3.10
Hello everyone, Perhaps I was a bit unclear in my previous messages. Here are more details about the problem and test case. I use ParaView v3.10.1 release sources, Visual Studio 2008 SP1, Python 2.7, OpenMPI 1.4.3 on Vista SP2. I compiled sources with standard options (just turned on BUILD_SHARED_LIBS, MPI and Python). I derived new class from vtkExporter, vtkMyExporter, and in vtkMyExporter::WriteData() I call code specified down. The problem is in QMessage line, which reports always 0, even when this flag is turned on. Same is happening with most of other parameters. I believe that learning how to decompose composite ptrActor into several actors with vtkPolyDataMapper mapper and vtkPolyData data will solve all other problems (which occur when generating texture from scalars). At the moment, I'm interested only in actors which use vtkCompositePolyDataMapper2 mappers. As input I use disk_out_ref.ex2 with selected H2 (or any other channel) for mapping colors. Does anyone have any idea how this can be done? Btw, this worked perfectly under ParaView v.3.8.1 and with RenderWindow created using VTK 5.4.2 (where I create vtkCompositePolyDataMapper2 and populate it manually). Thank You very much for Your help! Best regards, Nenad. 1) Get interactive renderer 'InteractiveRenderer' from vtkMyExporter::RenderWindow 2) For every actor 'ptrActor' (3D actors only) in InteractiveRenderer do: vtkCompositeDataIterator* actor_iterator; vtkCompositePolyDataMapper2* composite_mapper = NULL; // get actor's mapper vtkMapper* mapper = ptrActor->GetMapper(); if(mapper == NULL) return true; // discard // get mapper's input vtkCompositeDataSet* composite_input_data = dynamic_cast(mapper->GetInputDataObject(0, 0)); if(composite_input_data != NULL) { // get actor's composite mapper composite_mapper = dynamic_cast(mapper); if(composite_mapper == NULL) return false; // in case input data is composite object, get iterator for traversing actor_iterator = composite_input_data->NewIterator(); // initialize iterator for traversing actor_iterator->InitTraversal(); actor_iterator->GoToFirstItem(); } else actor_iterator = NULL; // export all components of input actor for(;;) { vtkSmartPointer actor; // if input data is composite object, create actor with current component as data, otherwise use entire actor (I do this because I need actor with vtkPolyDataMapper and vtkPolyData data for vtkScalarsToColorsPainter) if(actor_iterator != NULL) { // check if there are no more components if(actor_iterator->IsDoneWithTraversal()) break; // get next component vtkDataObject* data_object = actor_iterator->GetCurrentDataObject(); if(dynamic_cast(data_object) != NULL) { // get poly data vtkPolyData* poly_data = dynamic_cast(data_object); // create new temporary poly data mapper vtkSmartPointer poly_data_mapper = vtkSmartPointer::New(); // copy mapper's parameters poly_data_mapper->ShallowCopy(composite_mapper); // set mapper's input poly_data_mapper->SetInput(poly_data); // create new actor actor = vtkSmartPointer::New(); // copy actor parameters actor->ShallowCopy(ptrActor); // set actor's mapper actor->SetMapper(poly_data_mapper); } else { return false; } } else actor = ptrActor; // report some actor's property QMessageBox::about(NULL, "", QString::number(ptrActor->GetMapper()->GetInterpolateScalarsBeforeMapping())); // perform transformation from scalars to texture using vtkScalarsToColorsPainter class // extract data from ptrActor (I use previously generated texture instead of colors / scalars) // write to my custom format // if input is not composite, break the loop if(composite_input_data == NULL) break; // set iterator on next item if(actor_iterator != NULL) actor_iterator->GoToNextItem(); } On Wed, May 4, 2011 at 3:04 PM, Utkarsh Ayachit wrote: > Nenad, > > I am not sure I understand where this code is being put. You say it's > an exporter? Meaning it exports to something like a vrml/x3d file? But > that doesn't seem right since you say you are using the > PolyDataMapper. > > What is this plugin trying to achieve? > > Utkarsh > > On Wed, May 4, 2011 at 8:31 AM, Nenad Vujicic wrote: >> Hello everyone, >> >> I'm having
[Paraview] 3D Glyph Representation Question
I currently have a reader that creates a vtkMultiBlockDataSet with two blocks: one of which is a polydata consisting of vertices and lines. I see the data in a 3D plot as pixels and lines connecting them. To make it more visually appealing, I was looking into views and a saw that they basically just load representations. I now am trying to create a new representation that replaces each of the vertices with a 3d glyph (lets just say a cube for simplicity). Would I be going about this the correct way if I were to derive a new representation from vtkGlyph3DRepresentation, then load that representation in my view? Are there any examples that show something similar to what I am trying to do? Thanks, Brian Panneton ___ 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] 3.10.1 Issues with resizing with OSMesa
Folks, Recently an issue was noticed by some of our users. Evidently, when resizing ParaView client that is connected to a pvserver using OSMesa, the server would hang if there were any text items (such as "Text" source) in the view. I am trying to gauge if any other users have seem similar issues. Utkarsh ___ 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] using vtkInformation in 3.10
Hi Utkarsh, Yes, I had connected the reader or source directly to the filter with no other filters intervening. I have used the keys for a number of things. In addition to passing meta data I also implemented dynamic load balancing in a couple of algorithms by passing vtkObjects. For example the demand loading strategy in our stream tracer expects to receive a reader object in the pipeline information. The reader object also implements a LRU block cache to reduce I/O footprint. We've used a similar strategy to generate seed cell geometry on demand, where our volume source passes a cell generator object downstream in the pipeline information which the stream tracer uses to access any cell in any order (dynamic load balancing part) with a minimum communication and memory footprint. We did that because we ran our of memory when both the source and the stream tracer had a copy of the seed geometry. The use case I'm describing is the generation of topographic maps of the magnetosphere which in the 3D case requires 10's of millions of stream traces and the seed geometry is colored in the mapper output. Dynamic load balancing of the stream tracing provides a nice speed up. The vtkPVPostFilter looks to add nice new features to extracting components form vectors and converting cell to point data and so on. I do see why PV can't copy keys from input to output blindly. But, do you think vtkPVPostFilter could copy the information from input to output as well? It doesn't after all modify the existing arrays or geometry (if I'm reading it right it only adds arrays if they are requested).? Or is there another work around that would get our filters working again? Thanks Burlen On 05/05/2011 05:51 AM, Utkarsh Ayachit wrote: Burlen, Keys are not propagated by pipeline by default. So your approach would only work when there's no other filter between the reader and your filters. With ParaView 3.10, vtkPVPostFilter get inserted always into the pipeline after every algorithm. As a result your keys maybe getting eaten up by the post-filter. What keys are these? Utkarsh On Wed, May 4, 2011 at 10:35 PM, Burlen Loring wrote: Hi All, I have a reader that gets the information object from it's output and adds some keys for downstream filters to use. This recently stopped working with version 3.10. Can anyone shed some light on what might have caused the change in behavior in version 3.10? Was this a deliberate change? Thanks Burlen ___ Powered bywww.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] CoProcessing
Hi Andrey, For 1), you need to pass pvserver a .pvx file on the command line. You can put the pvx filename at the very end of the pvserver command line. The pvx file should contain the hostname or IP address of each pvserver process. So if there will be two pvserver processess running on the machines myserverhost0 and myserverhost1, then the pvx file would look like: When you have this pvx file, the pvserver to send these hostnames to the coprocessor, this allows the coprocessor nodes to know which hosts they should connect to. You also need to make sure that your cpscript.py contains the right hostname for the pvserver root process. So the cpscript would contain: host = "myserverhost0" port = 2 Also, make sure you have the latest commits in the live-data branch on github, because I added a fix related to this pvx file. For 2), the coprocessor code can send any type of dataset to the pvserver, so unstructured grid should be fine. But, if you are doing a data aggregation step on the coprocessor, then that code has only been implemented for vtkPolyData. For example, if you have 1000 simulation procs and 10 pvserver procs, then the coprocessor will need to aggregate all the data from 1000 procs to 10 simulation procs, then those 10 simulation procs will send their data to the 10 pvserver procs. I have new code that allows you to write your own custom aggregation routine. What does your unstructured grid look like? If it is something with homogeneous cell type, like all tetrahedron, then it will be really easy to modify some example code I have to work for your data. Also, I added the ability to open multiple sockets on the pvserver process. So if each of the 10 pvserver procs open 20 sockets, then there will be 200 sockets available to the coprocessor, so then the data only needs to be aggregated from 1000 to 200 procs before sending to pvserver. This code has not made it's way onto github, but I could add it today. Let me know if you would benefit from this. Pat On Thu, May 5, 2011 at 3:28 AM, Andrey Lomtev wrote: > On 26.01.2011 20:50, pat marion wrote: > > Hi, > > I could help you better if you could get a backtrace of the crash. It's > hard to guess where it might be segfaulting. It's possibly an issue with > MPI though. The coprocessor tries to initialize mpi, so if you are running > the regular python program, mpi might not be available. > > Pat > > On Wed, Jan 26, 2011 at 12:45 PM, Andrey Lomtev wrote: > >> On 23.01.2011 23:07, pat marion wrote: >> >> Hi Andrey, >> >> Once you have run through the steps to generate a coprocessing python >> script, described here: >> >> >> http://www.paraview.org/Wiki/CoProcessing#Running_the_CoProcessing_Script_Generator >> >> If you look at the top of the generated script, it will have these >> options: >> >> host = "localhost" >> port = 2 >> >> set_use_network(True) >> set_do_reduce_data(True) >> set_do_writing(False) >> set_use_psets(False) >> set_log_messages(False) >> set_procs_per_partition(32) >> set_final_partition_size(1) >> >> So you just need to edit the two lines with host and port. You can ignore >> the other options, they are set by default to do the standard live-data use >> case. When you generate the coprocessing script, you will add writers to >> the end of your pipeline(s). A writer represents the end of the pipeline, >> the sink. Instead of data flowing into the writer, it will be re-directed >> over the network to the Live Data Source on the pvserver. >> >> If the number of coprocessor nodes is greater than the number of pvserver >> nodes, then the coprocessor will have to aggregate data to a subset its >> nodes that perform the network sends. The aggregation code currently >> expects vtkPolyData and won't work with anything else. >> >> Pat >> >> >> On Sat, Jan 22, 2011 at 5:44 AM, Andrey Lomtev wrote: >> >>> On 12.01.2011 22:24, pat marion wrote: >>> >>> Hi Andrey, >>> >>> When I wrote those slides, the code for the Live Data Source had not yet >>> received approval for public release. The code is now available but has yet >>> to be merged with the paraview main release. You'll have to compile >>> paraview yourself in order to use the Live Data Source. The code can be >>> found in the live-data branch of the git repository git:// >>> github.com/patmarion/ParaView.git >>> >>> Pat >>> >>> On Wed, Jan 12, 2011 at 1:07 PM, Andrey Lomtev >>> wrote: >>> Hello everyone, I'm going to use CoProcessing library. I'm moving step by step as described in SC10_tutorial. I don't understand slide 99. I can't create Live Data Source. It isn't presented in my PV version (3.8.1). How can I add it? Thanks, Andrey. ___ 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 c
Re: [Paraview] Temporal statistics on a specific time range
Stephane I'm not sure of how you would do it currently, but here's what I'd do if I had to do it ... (using c++) Have a look at TemporalShiftScale for an idea. instead of changing the time values, delete all those before X, and those after Y, to give you your time range in the Time Requests. Now any filter operating with the new filter in place, will only see a subset of times available and the statistics filter will do what you want. Load this new filter as a plugin and use it from python, setting the ranges appropriately. It ought to be added to one of the temporal filters, (I have some changes that need to be committed so next time I look at this, I'll add a time range clamper function) JB -Original Message- From: paraview-boun...@paraview.org [mailto:paraview-boun...@paraview.org] On Behalf Of Stéphane Backaert Sent: 05 May 2011 12:33 To: paraview@paraview.org Subject: [Paraview] Temporal statistics on a specific time range Hello, I would like to add something in one of my python scripts to tell temporal statistic filter to not use all time steps... At the moment, I create a directory containing only interesting vti files (vti data set beyond transient time)... not very efficient! Any Idea? Thanks in advance, Best, Stephane ___ 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] using vtkInformation in 3.10
Burlen, Keys are not propagated by pipeline by default. So your approach would only work when there's no other filter between the reader and your filters. With ParaView 3.10, vtkPVPostFilter get inserted always into the pipeline after every algorithm. As a result your keys maybe getting eaten up by the post-filter. What keys are these? Utkarsh On Wed, May 4, 2011 at 10:35 PM, Burlen Loring wrote: > Hi All, > > I have a reader that gets the information object from it's output and adds > some keys for downstream filters to use. This recently stopped working with > version 3.10. Can anyone shed some light on what might have caused the > change in behavior in version 3.10? Was this a deliberate change? > > Thanks > Burlen > > ___ > 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] Cannot change outline color
Yes. That is perfect. Tanks. On Thu, May 5, 2011 at 1:21 PM, Jérôme wrote: > Hi, > If you want to change the representation of outline, you should > plug your source into a Outline filter: it will outputs a cube > representing the bounding box of your data. This cube is a > vtkPolyData for which you can change the representation as you > want (color, but also line width and opacity) > > HTH > Jerome > > 2011/5/5 Hom Nath Gharti : >> It seems that color cannot be changed in Outline representation with >> ParaView 3.10.1. I observe this problem in both Windows and Linux. Or >> could this be a local problem? >> >> Thanks. >> ___ >> 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] Cannot change outline color
Hi, If you want to change the representation of outline, you should plug your source into a Outline filter: it will outputs a cube representing the bounding box of your data. This cube is a vtkPolyData for which you can change the representation as you want (color, but also line width and opacity) HTH Jerome 2011/5/5 Hom Nath Gharti : > It seems that color cannot be changed in Outline representation with > ParaView 3.10.1. I observe this problem in both Windows and Linux. Or > could this be a local problem? > > Thanks. > ___ > 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] Temporal statistics on a specific time range
Hello, I would like to add something in one of my python scripts to tell temporal statistic filter to not use all time steps... At the moment, I create a directory containing only interesting vti files (vti data set beyond transient time)... not very efficient! Any Idea? Thanks in advance, Best, Stephane ___ 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] Cannot change outline color
It seems that color cannot be changed in Outline representation with ParaView 3.10.1. I observe this problem in both Windows and Linux. Or could this be a local problem? Thanks. ___ 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