Re: [Paraview] had to make up a value for selection: what am I doing wrong?
Great, in that case, I shall commit the fix to CVS sometime today. Utkarsh Takuya OSHIMA wrote: Hi Utkarsh, Thanks a lot, it did fix the issue! Takuya Takuya OSHIMA, Ph.D. Faculty of Engineering, Niigata University 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN From: Utkarsh Ayachit [EMAIL PROTECTED] Subject: Re: [Paraview] had to make up a value for selection: what am I doing wrong? Date: Thu, 04 Sep 2008 15:01:33 -0400 Takuya, Can you try the attached patch and see if that fixes the issue? Now the pqSMAdaptor tries to obtain the array status from the information property is not available in the property itself. Utkarsh Takuya OSHIMA wrote: Hi Utkarsh, I had another look into the issue again, and concluded that it's a bug in ParaView. The tracker ID is #7583. The main problem was indeed in the removal of the this-Internal-Property-ResetToDefault() call. Before the removal the ResetToDefault() call subsequently executed vtkSMArraySelectionDomain::SetDefaultValues() which copies the contents of associated information property to the StringVectorProperty. However with the removal now there's nothing which links the information property and the StringVector property, despite the server-client downlink (client/server stream-information helper-information property-array selection domain-string vector property) worked properly until the update of ArraySelectionDomain which interfaces the two properties. Hence the StringDomain of the newly added array name is found in pqSMAdaptor::getSelectionProperty(vtkSMProperty*, unsigned int) while the corresponding StringVectorProperty is not, which led to the had to make up a value for selection text output. I think the fix intended by the removal of ResetToDefault() must be done elsewhere. For clarification, I attached a pseudo reader plugin to demonstrate the problem. Just build as a usual plugin, load into ParaView, and try reading any stub file with the *.pseudo extension. After clicking Apply, you'll see the had to make up... message every time you move the timestep back and forth. Takuya OSHIMA, Ph.D. Faculty of Engineering, Niigata University 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN From: Utkarsh Ayachit [EMAIL PROTECTED] Subject: Re: [Paraview] had to make up a value for selection: what am I doing wrong? Date: Mon, 04 Aug 2008 07:51:01 -0400 Mark, Thanks for the investigation. Let me take a look at it. Problem is indeed due to arrays appearing. Utkarsh Olesen, Mark wrote: Taking Takuya's hint, I reverted to revision 1.6 of Qt/Components/pqSignalAdaptorSelectionTreeWidget.cxx and it did indeed stop the multitude of had to make up a value that were cluttering up my message window. The problem arises in my cases when the number of entries in a vtkDataArraySelection changes - eg, new fields or mesh parts appear or disappear between time-steps. Perhaps this hint might help in localizing the problem. /mark -Original Message- From: [EMAIL PROTECTED] [mailto:paraview- [EMAIL PROTECTED] On Behalf Of Takuya OSHIMA Sent: Tuesday, July 29, 2008 3:12 PM To: paraview@paraview.org Subject: Re: [Paraview] had to make up a value for selection: what am I doing wrong? Hi ParaView developers, As I got no answer so far from the list, I did some digging with a debugger. As a result it's looking more like a bug in ParaView, but I'm not confident yet. So far what I found are threefold: 1. If I revert the following modification to pqSignalAdaptorSelectionTreeWidget.cxx on 2008-07-02 Index: pqSignalAdaptorSelectionTreeWidget.cxx === RCS file: /cvsroot/ParaView3/ParaView3/Qt/Components/pqSignalAdaptorSelectionTre eWidget.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -r1.6 -r1.7 187,188c187,190 this-Internal-Property-ResetToDefault(); --- // Domain changes should not change the property values. This is overriding // the value loaded from state files etc. // this-Internal-Property-ResetToDefault(); , the had to make up a value message disappeared and reader worked as expected. This coincides with my thought that the problem started at around a month ago. 2. After doing AddArray() to the selection object in the reader, ParaView does seem to recognize the newly added item, since in void vtkSMArraySelectionInformationHelper::UpdateProperty( vtkIdType connectionId, int serverIds, vtkClientServerID objectId, vtkSMProperty* prop) numArrays turned out to have the expected number of arrays, and the results of GetArgument() were precisely expected values. I could confirm the new item is added to prop (the last argument in the function prototype above) through SetElement(). The address prop pointed to was 0x078c5b38 in the tracked case. 3. However, when void pqSignalAdaptorSelectionTreeWidget::domainChanged() was executed later, the address this-Internal-Property pointed to was 0x078cd688, which was different from what prop
Re: [Paraview] Strange behaviour with large datasets
Dear Ken, Wow that sounds ideal. Can't wait! :oD Cheers, Nat. -Original Message- From: Moreland, Kenneth [mailto:[EMAIL PROTECTED] Sent: 05 September 2008 16:44 To: Nathanael Inkson Cc: paraview@paraview.org Subject: Re: Strange behaviour with large datasets There is no such filter in ParaView 3.2, but in the current CVS and the soon-to-be-released ParaView 3.4 there is a filter called Merge Blocks that will merge all the blocks into a single unstructured grid. -Ken On 9/4/08 2:54 AM, Nathanael Inkson [EMAIL PROTECTED] wrote: Dear Ken, Is there a simple way I can combine multi-block data into one dataset? This is really what I need to be able to do in order to process all my info through one filter. If not could you recommend where in the paraview code structure I can loop over all my multi-block data to create data new fields or copy cells to return a new data set? Thanks, From Nat. ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] casting vtkPointData* to double*
Note that ParaView does not really use the active scalars, so there is a good chance that you will be unpleasantly surprised when you don't get the array you expect. ParaView uses a newer convention of vtkAlgorithm to specify input arrays: the vtkAlgorithm::SelectInputScalars() method. The SelectInputScalars method has a 5 argument signature which I won't get into, but can be set through the server manager with a StringVectorProperty that has an ArrayListDomain assigned to it. The XML for defining this property looks something like this. StringVectorProperty name=SelectInputScalars command=SetInputArrayToProcess number_of_elements=5 element_types=0 0 0 0 2 animateable=0 label=Contour By ArrayListDomain name=array_list attribute_type=Scalars RequiredProperties Property name=Input function=Input/ /RequiredProperties /ArrayListDomain Documentation Doing something with this array... /Documentation /StringVectorProperty See the ParaView guide for more information on these tags. From within your filter, you can use the vtkAlgorithm::GetInputArrayToProcess method to get the selected array from the input. vtkDataArary *input_array = this-GetInputArrayToProcess(0, input); By the way, I notice that you are using the old-style filter convention of overriding Execute and calling GetInput and GetOutput on yourself. New filters should really override RequestData and get the inputs and outputs from the inputVector and outputVector arguments, respectively. The data objects have convenience methods to get the data objects from the information vectors. vtkStructuredGrid *input = vtkStructuredGrid::GetData(inputVector[0]); vtkStructuredGrid *output = vtkStructuredGrid::GetData(outputVector); -Ken On 9/4/08 6:57 AM, David E DeMarle [EMAIL PROTECTED] wrote: vtkPointData is a collection of arrays (for example temperature, density, velocity), each of which may have multiple components (for example VEL_X, VEL_Y, VEL_Z) and multiple tuples (the temperature at the first point, the temperature at the second point, ..., the temperature at the millionth point). vtkPointData::GetScalars() will give you access to the currently active scalar array. You will then have to get access to the raw pointer or use element indexing (both of which are descibed in the vtkDataArray documentation) to do element wise arithmetic. Lastly, you may want to look at the calculator filter. cheers, Dave DeMarle On Thu, Sep 4, 2008 at 3:23 AM, Natalie Happenhofer [EMAIL PROTECTED] wrote: Hi! I´m writing a filter and I want to perform arithmetic operations, i.e. += with the scalar data associated to each point of my grid. So I get the Point Data from the input file: void vtkHorizontalAverage::Execute() {vtkStructuredGrid *input = this-GetInput(); vtkStructuredGrid *output = this-GetOutput(); vtkPointData *inPtr = input-GetPointData(); vtkPointData *outPtr = output-GetPointData(); ... here and now I want to apply the += operator, but I have no idea how to cast my vtkPointData - object, since I do not really know where to fit the cast operator in, to the vtkPointData class or to the vtkDataArray.. I could also use a reinterpretcast, but I´m not sure if the format of the data in vtkPointData is double or float.. So, any help would be apreciated! thx, NH Express yourself instantly with MSN Messenger! MSN Messenger ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Read one exodus file among many
Try scrolling down to the bottom of the object inspector panel and modify the filename pattern properties. I usually find it easiest to just set the start and end indices. -Ken On 9/5/08 12:49 PM, Scott, W Alan [EMAIL PROTECTED] wrote: If I have an 8 exodus file dataset, how do I only read in one of these files? Is the only way to copy this file to a temp directory? Even if I try to open one file, they all are loaded in. Thanks, Alan ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] custom filter?
Where can I find the file can.ex2 to try? I dont see it on the page. -- Dominik On Friday 05 September 2008 08:41:14 pm Moreland, Kenneth wrote: I suspect the problems you are having with transient data is the same bug reported in issue #7586. http://www.paraview.org/Bug/view.php?id=7586 -Ken On 9/4/08 9:25 AM, Dominik Szczerba [EMAIL PROTECTED] wrote: Thanks for the detailed explanation. This does not seem ti work for transient datasets (it does the job for a given timestep only). In addition, display properties can not be stored (opacity, active color scalars etc). Or did I overlook something? Or do I need a more recent CVS? (mine is early August) Thanks a lot, Dominik On Thursday 04 September 2008 03:35:54 pm Utkarsh Ayachit wrote: Custom filter mechanism is designed to be used to combine a sub-pipeline into a single filter (or source) (with all the a paramter settings for each of the individual filters/sources) exposing a subset of the parameters to the user. Eg. Here's my pipeline: Sphere - Shrink -- Extract Edges Suppose we want to combine the Shrink--ExtractEdges into a new custom filter ShrunkEdges. * Select the Shrink and the Extract Edges filter in the pipeline browser (use Ctrl key for multiple selections). * With the two filters selected, go to Tools menu and choose Create Custom Filter * The Create Custom Filter wizard will show up. * First give our filter a new name. This name must be unique and if conflicting an error message will be shown. We are calling this one ShrunkEdges (step1.png). Then click Next. * We now choose what are the inputs to the custom filter that the user can set. By default, paraView will find the first filter in the sub-pipeline (in this case Shrink) and expose it's Input property as the input to this custom filter. Since that's exactly what we want here (step2.png), click Next. * Next we need to choose the outputs from this filter. By default, paraview will choose the last filter in the subpipeline (in this case 'ExtractEdges'. Let's say we want this custom filter to have two outputs, the output after the shrink stage as well as the one after extracting edges. ExtractEdges is already exposed as an output, we now expose the shrink filter as well. Select the Shrink in the left-side tree. It's output ports will be shown the Output Port combo. Choose the output port (relevant if the filter itself had more than 1 output ports), the assign it some unique name, say ShrunkOutput then press + to add it to the exposed outputs list (step3.png). Click Next. * Next we expose the subset of parameters on this custom filter that the user can change at run-time. Let's say we want to allow the user to change the Shrink Factor on the shrink filter. Select the Shrink filter in the tree and then select the property to expose in the Property combo, assign it some name (or use the default) and the hit + to expose it (step4.png). Once all required properties are exposed, click Finish to create a definition for the custom filter. The Custom Filter Manager will popup showing the newly defined custom filter. The manager is also available under the Tools menu. It can be used to remove/export/import custom filters. Close this dialog. Now to instantiate our new custom filter, simply look under the Filters|Alphabetical menu, we see our new ShrunkEdges filter. Now you can create it simply as if it were a normal filter. Same is true with sources, if no input property is exposed, it's treated as a source and is available under Sources menu. Utkarsh Dominik Szczerba wrote: I have a complicated layout of filters on the left panel. How do I go about saving them as a filter in PV CVS? (saving state does not work for transient, fixing number current time steps). I tried 'create a custom filter' but it is not comprehensive. I clicked around and ended up nowhere. Any hints are appreciated. PS. I dd not find anything on wiki, and can again no longer find a search link to ML archives. best regards -- Dominik Szczerba, Ph.D. Computational Physics Group Foundation for Research on Information Technologies in Society http://www.itis.ethz.ch ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview -- Dominik Szczerba, Ph.D. Computational Physics Group Foundation for Research on Information Technologies in Society http://www.itis.ethz.ch ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] custom filter?
It is part of the ParaView test data. You can get it from the ParaView download web page. -Ken On 9/5/08 2:24 PM, Dominik Szczerba [EMAIL PROTECTED] wrote: Where can I find the file can.ex2 to try? I dont see it on the page. -- Dominik On Friday 05 September 2008 08:41:14 pm Moreland, Kenneth wrote: I suspect the problems you are having with transient data is the same bug reported in issue #7586. http://www.paraview.org/Bug/view.php?id=7586 -Ken On 9/4/08 9:25 AM, Dominik Szczerba [EMAIL PROTECTED] wrote: Thanks for the detailed explanation. This does not seem ti work for transient datasets (it does the job for a given timestep only). In addition, display properties can not be stored (opacity, active color scalars etc). Or did I overlook something? Or do I need a more recent CVS? (mine is early August) Thanks a lot, Dominik On Thursday 04 September 2008 03:35:54 pm Utkarsh Ayachit wrote: Custom filter mechanism is designed to be used to combine a sub-pipeline into a single filter (or source) (with all the a paramter settings for each of the individual filters/sources) exposing a subset of the parameters to the user. Eg. Here's my pipeline: Sphere - Shrink -- Extract Edges Suppose we want to combine the Shrink--ExtractEdges into a new custom filter ShrunkEdges. * Select the Shrink and the Extract Edges filter in the pipeline browser (use Ctrl key for multiple selections). * With the two filters selected, go to Tools menu and choose Create Custom Filter * The Create Custom Filter wizard will show up. * First give our filter a new name. This name must be unique and if conflicting an error message will be shown. We are calling this one ShrunkEdges (step1.png). Then click Next. * We now choose what are the inputs to the custom filter that the user can set. By default, paraView will find the first filter in the sub-pipeline (in this case Shrink) and expose it's Input property as the input to this custom filter. Since that's exactly what we want here (step2.png), click Next. * Next we need to choose the outputs from this filter. By default, paraview will choose the last filter in the subpipeline (in this case 'ExtractEdges'. Let's say we want this custom filter to have two outputs, the output after the shrink stage as well as the one after extracting edges. ExtractEdges is already exposed as an output, we now expose the shrink filter as well. Select the Shrink in the left-side tree. It's output ports will be shown the Output Port combo. Choose the output port (relevant if the filter itself had more than 1 output ports), the assign it some unique name, say ShrunkOutput then press + to add it to the exposed outputs list (step3.png). Click Next. * Next we expose the subset of parameters on this custom filter that the user can change at run-time. Let's say we want to allow the user to change the Shrink Factor on the shrink filter. Select the Shrink filter in the tree and then select the property to expose in the Property combo, assign it some name (or use the default) and the hit + to expose it (step4.png). Once all required properties are exposed, click Finish to create a definition for the custom filter. The Custom Filter Manager will popup showing the newly defined custom filter. The manager is also available under the Tools menu. It can be used to remove/export/import custom filters. Close this dialog. Now to instantiate our new custom filter, simply look under the Filters|Alphabetical menu, we see our new ShrunkEdges filter. Now you can create it simply as if it were a normal filter. Same is true with sources, if no input property is exposed, it's treated as a source and is available under Sources menu. Utkarsh Dominik Szczerba wrote: I have a complicated layout of filters on the left panel. How do I go about saving them as a filter in PV CVS? (saving state does not work for transient, fixing number current time steps). I tried 'create a custom filter' but it is not comprehensive. I clicked around and ended up nowhere. Any hints are appreciated. PS. I dd not find anything on wiki, and can again no longer find a search link to ML archives. best regards -- Dominik Szczerba, Ph.D. Computational Physics Group Foundation for Research on Information Technologies in Society http://www.itis.ethz.ch ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview -- Dominik Szczerba, Ph.D. Computational Physics Group Foundation for Research on Information Technologies in Society http://www.itis.ethz.ch ___ ParaView mailing list ParaView@paraview.org http://www.paraview.org/mailman/listinfo/paraview