[vtkusers] mixing vtkImageActor with solidly rendered vtkPolyData
dean.inglis at camris.ca
dean.inglis at camris.ca
Mon Jun 4 15:46:52 EDT 2007
Hi Mathieu,
yes, I use vtkImageViewer2. I am wondering:
if SetResolveCoincidentTopologyToPolygonOffset
is activated, then both the vtkOpenGLPolyDataMapper
and the vtkOpenGLImageActor do this:
#ifdef GL_VERSION_1_1
double f, u;
glEnable(GL_POLYGON_OFFSET_FILL);
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(f,u);
glPolygonOffset(f,u);
#endif
So, are both mappers just shifing the image actor
and the actor rendering the polygon the same amount,
(or shifting the image actor in front of the
polygon actor) thereby negating the desired effect?
If so, would it be useful/desirable to be able to
turn off shifting at the individual actor level?
Dean
> Subject: Re: [vtkusers] mixing vtkImageActor with solidly rendered
> vtkPolyData
>
> I don't know why you only see your wireframe actors.
> Are you using a vtkImageViewer2?
>
> The following is taken from vtkImageViewer2 documentation:
> <http://www.vtk.org/doc/nightly/html/classvtkImageViewer2.html>
>
> "This can be used to annotate an image with a PolyData of "edges" or or
> highlight sections of an image or display a 3D isosurface with a slice
> from the volume, etc. Any portions of your geometry that are in front of
> the displayed slice will be visible; any portions of your geometry that
> are behind the displayed slice will be obscured."
>
> Does PolyData of "edges" mean that filled polydata won't be displayed
> properly?
>
> Mathieu
>
> >Hi Mathieu,
> >
> >thanks for your quick reply!
> >Yes, the polydata are all on the same layer as the image.
> >I would like to know why the contour lines show since they are
> >also in the same plane as the image (and the polygon)
> >but the polygon will not? The polygon actor is only
> >visible when rendered in wireframe mode.
> >
> >Dean
> >
> >> Subject: Re: [vtkusers] mixing vtkImageActor with solidly rendered
> >> vtkPolyData
> >>
> >> Hi,
> >>
> >> Is the polydata on the same layer as the image? I mean,
> >> if the image origin is (originX, originY, originZ), the
> >> polydata origin should be closer to the camera in the
> >> direction of projection to make sure it is always visible.
> >> Otherwise it may appear or not if they are defined at the same
> >> position.
> >>
> >> I usually define an epsilon value to the polydata to put in
> >> front of an image. If my image is at (originX, originZ, 0), I put my
> >polydata
> >> position as (posX, posY, epsilon).
> >>
> >> Hope it will help...
> >>
> >> Thanx.
> >>
> >> MAthieu
> >>
> >> --
> >> > >
> >> >in a renderer I have a vtkImageActor (ivar of vtkImageViewer2)
> >> >showing a slice of a 3D image. On top of that are
> >> >two vtkActors rendering 2D contours (vtkPolyData lines) from a
> >> >segmentation and
> >> >another actor rendering a 2D filled segmentation region (
> >> >vtkPolyData solid polygon). When I scroll through the slices,
> >> >each slice's contour lines and polygonal region are
> >> >updated. I can see the lines but the polygons appear
> >> >briefly and then disappear. If I hide the vtkImageActor,
> >> >the polygons are clearly there. If I set the polygon actor
> >> >to render as a wireframe, the region is correctly shown as a triangulated
> >> >polygon whether or not the image actor is visible or not.
> >> >If I toggle between wireframe and solid when the image actor
> >> >is visible, the solid polygon will not display: only the wireframe
> >> >representation will. SetCoincidentTopologyToPolygonOffset has no
> >> >effect. How can I mix vtkImageActor with solidly rendered vtkPolyData?
> >> >
> >> >Dean
> >> >
> >> >_______________________________________________
> >> >This is the private VTK discussion list.
> >> >Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/
> >> >VTK_FAQ
> >> >Follow this link to subscribe/unsubscribe:
> >> >http://www.vtk.org/mailman/listinfo/vtkusers
> >> >
> >>
> >>
> >>
> >>
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/
> >VTK_FAQ
> >Follow this link to subscribe/unsubscribe:
> >http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
>
More information about the vtkusers
mailing list