[vtkusers] Selected cells not visible

-Daniel- ich_daniel at habmalnefrage.de
Mon Feb 11 12:14:11 EST 2013


Hello vtk-users,

I use vtkExtractVisibleCells to select cells from a polydata.
My selection found more than one node, but it isn't visible. 


*Java-Code:*/
vtkPolyData poly = (vtkPolyData) getObjects().get(0).getPolydata();
poly.Update();

vtkHardwareSelector selector = new vtkHardwareSelector();
selector.SetRenderer(getView_volume().GetRenderer());
			
int[] temp = rect4PolySelection;	// int[4]

selector.SetArea(temp[0], temp[2], temp[1], temp[3]);
					
vtkSelection selection = selector.Select();
System.out.println("nodes: "+selection.GetNumberOfNodes() );
					
vtkExtractSelection extractSelection = new vtkExtractSelection();
extractSelection.SetInput(0, poly);
extractSelection.SetInput(1, selection);
extractSelection.Update();
				
vtkDataSetMapper mapper = new vtkDataSetMapper();
mapper.SetInputConnection(extractSelection.GetOutputPort());
					
vtkActor actor = new vtkActor();
actor.SetMapper(mapper);
actor.GetProperty().SetColor(0.1, 0, 0.8);
					
getView_volume().GetRenderer().AddActor(actor);/


What's wrong? Can someone help me?




--
View this message in context: http://vtk.1045678.n5.nabble.com/Selected-cells-not-visible-tp5718419.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list