Livia, The IDs list passed to IDSelectionSource takes processorID and point/cell ID pairs. Your IDs was set to [0, 1], which means "select point 1 from processor 0". To select points 0, 1, and 2, for example, set your IDs setting to [0, 0, 0, 1, 0, 2].
See the data descriptor for IDs at [1]. HTH, Cory [1] http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.IDSelectionSource.html On Thu, Oct 15, 2015 at 5:31 AM, <[email protected]> wrote: > Hi, > > I would like to use the ExtractSelection filter by providing an ID List, > as hinted in the doc > http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.ExtractSelection.html?highlight=extractselection#paraview.simple.ExtractSelection > > > > What is the correct syntax? First I tried : > > > > e = ExtractSelection(Sphere1, [1,2]) > > Traceback (most recent call last): > > File "<console>", line 1, in <module> > > File "R:\ParaView > 4.4.0\lib\paraview-4.4\site-packages\paraview\simple.py", line 1520, in > CreateObject > > raise RuntimeError, "Expecting a proxy as input." > > RuntimeError: Expecting a proxy as input. > > > > > > Then I tried: > > > > >>> selection = paraview.simple.IDSelectionSource(ContainingCells=0, > FieldType = "POINT", IDs = [0,1]) > > >>> e = ExtractSelection(Sphere1, Selection = selection) > > >>> e.UpdatePipeline() > > >>> e.GetDataInformation().GetNumberOfPoints() > > 1L > > #I expected 2 points > > > > and then, when I tried to visualize the result, I got: > > > > ERROR: In > C:\bbd\b51c3c7f\source-paraview\ParaViewCore\ServerManager\Rendering\vtkSMParaViewPipelineControllerWithRendering.cxx, > line 542 > > vtkSMParaViewPipelineControllerWithRendering (000000000C747260): Data > cannot be shown in the defaulted render view!! > > > > Thanks > > Livia > > > > Livia Barazzetti > Ph.D. Student - Medical Image Analysis > Institute for Surgical Technology and Biomechanics > University of Bern > Stauffacherstrasse 78 > CH-3014 Bern > Tel +41 31 631 59 48 > http://www.istb.unibe.ch > > > > _______________________________________________ > 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 > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/paraview > > -- Cory Quammen R&D Engineer Kitware, Inc.
_______________________________________________ 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
