[vtkusers] Contour lines of 3D objects (vtkPolyData)

Daniel Kruber ich_daniel at habmalnefrage.de
Tue Feb 14 05:01:12 EST 2012


Hi there,

I create contour lines of a 3D object and put this in 3 different vtkCanvas, different in each of three sides. (look at screenshot, right side)
The contour lines are vtkActor2D, which are always displayed correctly from the front. The other two views (side, bottom) are also shown only from the front, so you can see only a simple straight line.

Is it possible to turn this vtkActor2D or similar?


The production of contour lines is done by:

//****
/* 3 different planes for each view (3 total) */
vtkPlane plane...
/*
example: vtkPlane sagPlane = new vtkPlane();
	  sagPlane.SetOrigin(0,0,0);
	  sagPlane.SetNormal(1, 0, 0);
*/

vtkPolyData data...

vtkCutter cutEdges = new vtkCutter(); //Generate cut lines
cutEdges.SetInput(data);
cutEdges.SetCutFunction (plane);
cutEdges.GenerateCutScalarsOn();
cutEdges.SetValue( 0, 0);

vtkCoordinate coord = new vtkCoordinate();
coord.SetCoordinateSystemToViewport();

vtkPolyDataMapper2D contourMapper = new vtkPolyDataMapper2D();
contourMapper.SetInputConnection(cutEdges.GetOutputPort());	
contourMapper.SetTransformCoordinate(coord);
contourMapper.SetLookupTable(lut);
contourMapper.ScalarVisibilityOff();

vtkActor2D contourActor = new vtkActor2D();
contourActor.SetMapper(contourMapper);
//****


Thanks in advance.



-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://www.gmx.net/de/go/freephone/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpr_views.JPG
Type: image/jpeg
Size: 32793 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120214/6000ff63/attachment.jpeg>


More information about the vtkusers mailing list