<p style="margin: 0px; padding: 0px;">Hi,</p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;">i want to implement polygon selection on images under "slice" representation (because switching to "surface" representation is RAM consuming).</p><p style="margin: 0px; padding: 0px;">I'm able to catch polygon point draw on interface using <i>selectedCustomPolygon </i>signal of <i>pqRenderViewSelectionReaction.</i></p><p style="margin: 0px; padding: 0px;">I'm able to select the id of image points contained in the polygon.</p><p style="margin: 0px; padding: 0px;">I have two problems:</p><p style="margin: 0px; padding: 0px;">1) I don't understand the correct way to create selection (vtkSelection) object starting from ids:</p><p style="margin: 0px; padding: 0px;"><br></p><p><i> vtkSmartPointer<vtkSelectionNode> selectionNode = vtkSmartPointer<vtkSelectionNode>::New();</i></p><p><i>  selectionNode->SetFieldType(vtkSelectionNode::POINT);</i></p><p><i>  selectionNode->SetContentType(vtkSelectionNode::INDICES);</i></p><p style="margin: 0px; padding: 0px;"><i>  selectionNode->GetProperties()->Set(vtkSelectionNode::PROCESS_ID(),????);</i></p><p style="margin: 0px; padding: 0px;"><i> selectionNode->GetProperties()->Set(vtkSelectionNode::SOURCE(), ????);</i></p><p style="margin: 0px; padding: 0px;"><i>  selectionNode->SetSelectionList(ids);</i></p><p style="margin: 0px; padding: 0px;"><br></p><p><i>  vtkSmartPointer<vtkSelection> selection = vtkSmartPointer<vtkSelection>::New();</i></p><p><i></i></p><p><i>  selection->AddNode(selectionNode);</i></p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;">how can I get PROCESS_ID and SOURCE key?<i> </i></p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;">2) I don't know how to make the selection available  (set as second input) to "ExtractSelection" filter. I try with:</p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;"><i>pqActiveObjects* actObj = &pqActiveObjects::instance();</i></p><p><i>vtkSMProxy *sourceSel = vtkSMSelectionHelper::NewSelectionSourceFromSelection(actObj->activeServer()->session(), selection, true);</i></p><p style="margin: 0px; padding: 0px;"><i>vtkSMSourceProxy::SafeDownCast(actObj->activeSource()->getProxy())->SetSelectionInput(0,(vtkSMSourceProxy*)sourceSel,1);</i></p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;">but nothing happens i.e. after selection and "<i>ExtractSelection</i>" invokation the widget "<i>Copied Selection</i>" remains empty.</p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;">Thanks,</p><p style="margin: 0px; padding: 0px;">Best Regards,</p><p style="margin: 0px; padding: 0px;">Vincenzo</p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;"><br></p><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"> </div>