[Paraview] vtkSMIntVectorProperty number of elements
papa ndéné NDIAYE
pnwireframe at gmail.com
Fri Jul 8 07:21:04 EDT 2011
Great thanks JB,
that fits well
2011/7/8 Biddiscombe, John A. <biddisco at cscs.ch>
> *this snippet may help you *
>
> * *
>
> * QList<QVariant> blocks;*****
>
> * vtkPVCompositeDataInformation *pvcdi = out->GetDataInformation()->
> GetCompositeDataInformation();*****
>
> * QList<QVariant> blocks;*****
>
> * int N = pvcdi->GetNumberOfChildren();*****
>
> * for (int i=0; i<N; i++) {*****
>
> * if (...) blocks.append(i+1);*****
>
> * }*****
>
> * pqSMAdaptor::setMultipleElementProperty(*****
>
> * this-> Pipeline->GetProperty("BlockIndices"), blocks); *****
>
> * this->Pipeline->UpdateProperty("BlockIndices");*****
>
> ** **
>
> assuming you’re inside a pqSomething class and have access to all the usual
> pqSMAdaptor stuff. From raw servermanager stuff it’d look different****
>
> ** **
>
> JB****
>
> ** **
>
> *From:* paraview-bounces at paraview.org [mailto:
> paraview-bounces at paraview.org] *On Behalf Of *papa ndéné NDIAYE
> *Sent:* 08 July 2011 12:20
> *To:* paraview at paraview.org
> *Subject:* [Paraview] vtkSMIntVectorProperty number of elements****
>
> ** **
>
> Hi, all
> I have built a Toolbar plugin in paraview with a button that applies
> extractblock filter to a multiblock dataset
> so as to get all the blocks seperately in different objects in the pipeline
> browser.
>
> I achieve getting the number of blocks from the selected multiblock but I
> don't know how to set the block indice
> of an extract block filter after having it buit.
>
> *
> vtkSMProperty* property= [the pqPipelineSource resulting from
> createFilter]->GetProperty("BlockIndices");
>
> vtkSMIntVectorProperty * indices=
> vtkSMIntVectorProperty::SafeDownCast(property);
>
> *but *"indices->GetNumberOfElements();" *returns 0 while the
> compositeTreeWidget displays the blocks' hierarchy.
>
> how can I modify a vtkSMProperty within the code?
>
> thanks in advance!****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110708/6be37373/attachment.htm>
More information about the ParaView
mailing list