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

Daniel Kruber ich_daniel at habmalnefrage.de
Tue Feb 14 08:10:50 EST 2012


Thanks for your hint, Jothy.

Thus it is feasible, but I would like to solve it in two-dimensional. That said, I would like to see these contours usually always in the lower left corner and can not move with the mouse.
Of course you can also prevent latter.

Are there any other options to produce contour lines (like MPRs)?

Daniel



> Datum: Tue, 14 Feb 2012 10:30:18 +0000
> Von: Jothybasu Selvaraj <jothybasu at gmail.com>
> An: Daniel Kruber <ich_daniel at habmalnefrage.de>
> CC: vtkusers at vtk.org
> Betreff: Re: [vtkusers] Contour lines of 3D objects (vtkPolyData)

> Instead of using vtkActor2D use vtkActor with vtkPolyDataMapper and use
> SetPosition and RotateX,Y&Z to get the correct view.
> 
> Or use a vtkTransform with vtkActor.
> 
> Jothy
> 
> On Tue, Feb 14, 2012 at 10:01 AM, Daniel Kruber
> <ich_daniel at habmalnefrage.de
> > wrote:
> 
> > 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/
> >
> > _______________________________________________
> > 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 VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
> 
> 
> -- 
> Jothy

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://www.gmx.net/de/go/freephone/


-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://www.gmx.net/de/go/freephone/



More information about the vtkusers mailing list