[Paraview] Reader has Filters Disabled`

Brian C. Panneton (CONTR) brian.c.panneton.ctr at us.army.mil
Tue May 10 09:47:24 EDT 2011


Ah, adding those lines corrected the problem. Thank you so much.

Brian Panneton

Yumin Yuan wrote:
> Try to add these to the end of MyReaderPanel::accept()
>
>     this->proxy()->UpdateVTKObjects();
>     this->proxy()->UpdatePropertyInformation();
>
>     superclassOfMyReaderPanel::accept();
>
>
> On Tue, May 10, 2011 at 9:11 AM, Brian C. Panneton (CONTR)
> <brian.c.panneton.ctr at us.army.mil> wrote:
>   
>> Yes, by selecting a different source, the filter menu is enabled. When I go
>> back to my reader the filters are again disabled. So I feel like something
>> is not being set correctly when I press accept().  Or maybe it has something
>> to do with the fact that the data hierarchy is Multi-block Dataset ->
>> Unstructured Grid?
>>
>> My accept looks as such:
>>
>> [code]
>> void
>> MyReaderPanel::accept()
>> {
>>   vtkSMStringVectorProperty* lb = dynamic_cast<vtkSMStringVectorProperty*>(
>>       this->proxy()->GetProperty("lbSelection"));
>>
>>   lb->SetNumberOfElements(this->widgets.lbSelection->count()*2);
>>   for(int i = 1; i < this->widgets.lbSelection->count()+1; i++)
>>   {
>>       lb->SetElement(2*i-2,
>> this->widgets.lbSelection->item(i-1)->text().toStdString().c_str());
>>
>>       if(this->widgets.lbSelection->item(i-1)->checkState() == Qt::Checked)
>>       {
>>           lb->SetElement(2*i-1, "1");
>>       }
>>       else
>>       {
>>           lb->SetElement(2*i-1, "0");
>>       }
>>   }
>>
>>   this->proxy()->UpdateProperty("lbSelection", 1);
>>   vtkSMStringVectorProperty* lb2 = dynamic_cast<vtkSMStringVectorProperty*>(
>>       this->proxy()->GetProperty("lbSelection"));
>> }
>> [/code]
>>
>> Utkarsh Ayachit wrote:
>>     
>>> Try selecting something else in the pipeline browser and then select
>>> the filter again. Does that seem to update the menus correctly?
>>>
>>> Utkarsh
>>>
>>> On Mon, May 9, 2011 at 5:20 PM, Brian C. Panneton (CONTR)
>>> <brian.c.panneton.ctr at us.army.mil> wrote:
>>>
>>>       
>>>> Everything in the information tab does look correct. (Sorry I forgot to
>>>> mention that I switched from PolyData to UnstructuredGrid earlier).
>>>> Basically everything works as it should, but I don't have the option to
>>>> use
>>>> the filters on the data.
>>>>
>>>> With:
>>>>
>>>> Type: Unstructured Grid
>>>> Num Cells: 159
>>>> Num Points: 159
>>>>
>>>> I figured I would have at least a few filters. Or after I selected a few
>>>> points some filters would show up.
>>>>
>>>> Utkarsh Ayachit wrote:
>>>>
>>>>         
>>>>> But you're saying the information tab doesn't show the data
>>>>> information correctly, right? That implies that some essential
>>>>> "notification" is missing. Hard to say which one without looking at
>>>>> the code, however.
>>>>>
>>>>> Utkarsh
>>>>>
>>>>> On Mon, May 9, 2011 at 3:38 PM, Brian C. Panneton (CONTR)
>>>>> <brian.c.panneton.ctr at us.army.mil> wrote:
>>>>>
>>>>>
>>>>>           
>>>>>> The custom accept is on a custom panel. The custom accept just makes
>>>>>> sure
>>>>>> the GUI selections are sent to the vtkobjects. When apply is pressed on
>>>>>> the
>>>>>> panel, the data gets updated and plotted on the 3d graph (Vertices will
>>>>>> be
>>>>>> updated based on time). Thus I believe the GUI is being updated as it
>>>>>> should. I can press the play button and watch everything move as it
>>>>>> should.
>>>>>> However, I am never able to filter any of the data even if I select
>>>>>> points.
>>>>>>
>>>>>> Utkarsh Ayachit wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> "Custom accept"? What's that? And yes, if you are doing some funky
>>>>>>> stuff to update the reader, it could explain why the GUI never
>>>>>>> realizes that the reader has been updated.
>>>>>>>
>>>>>>> On Mon, May 9, 2011 at 1:27 PM, Brian C. Panneton (CONTR)
>>>>>>> <brian.c.panneton.ctr at us.army.mil> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>>> Once I hit apply, I see Data Hierarchy: Multi-block Dataset -> 0:
>>>>>>>> Unstructured Grid, 1: NA
>>>>>>>> with Unstructed Grid selected Statistics shows:
>>>>>>>> Type: Unstructured Grid
>>>>>>>> Num Cells: 159
>>>>>>>> Num Points: 159
>>>>>>>> Memory: 0.011mb
>>>>>>>>
>>>>>>>> My reader does have a custom accept. Could that be the issue?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Brian Panneton
>>>>>>>>
>>>>>>>> Utkarsh Ayachit wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> Did you hit "Apply"? What does the Information tab say?
>>>>>>>>>
>>>>>>>>> Utkarsh
>>>>>>>>>
>>>>>>>>> On Mon, May 9, 2011 at 12:41 PM, Brian C. Panneton (CONTR)
>>>>>>>>> <brian.c.panneton.ctr at us.army.mil> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>>>> I have created a reader which makes a vtkMultiBlockDataSet
>>>>>>>>>> containing
>>>>>>>>>> a
>>>>>>>>>> vtkPolyData. It reads in 100 some points and plots lines between
>>>>>>>>>> them.
>>>>>>>>>> After
>>>>>>>>>> I read them in, I don't have the option to use any filters on the
>>>>>>>>>> data.
>>>>>>>>>> Any
>>>>>>>>>> idea why this is disabled? Could it be related to the data having
>>>>>>>>>> time
>>>>>>>>>> steps?
>>>>>>>>>>
>>>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>                 
>>>>>>             
>>>>         
>> _______________________________________________
>> 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
>>
>>     
>
>
>
>   



More information about the ParaView mailing list