[vtkusers] black contour instead of colors after vtkcutter

Simon Drouin drouin.simon at gmail.com
Fri May 13 11:13:22 EDT 2016


Make sure lighting in off and ambient is set to 1 in the vtkProp3D that
renders the contour.

assuming the output of the vtkCutter goes into a vtkPolyDataMapper which in
turn is connected to a vtkActor or vtkProp3D:

vtkProp3D * contourProp;
contourProp->GetProperty()->LightingOff();
contourProp->GetProperty()->SetAmbient(1.0);

On Thu, May 12, 2016 at 5:54 AM, Cristina Oyarzun via vtkusers <
vtkusers at vtk.org> wrote:

> Hello,
>
> I am rendering a surface (vtkpolydata) using a vtkcolortransferfunction to
> map its scalar values to RGB colors (just red, yellow and green). That
> works without problem.
>
> I have a different render window where I show 2D slices of a volume as I
> move a slider.
>
> While I traverse the volume I want to show in addition to the 2D slices
> the cut of the surface that correspond to that 2D slices in that render
> window. I use vtkcutter and a plane at the position of the current 2D slice
> to do this. I see the 2D contour of the surface that correspond to that 2D
> slice but the colors are not correct. I do get some colors in some slices,
> but in some other slices I just get a black contour.
>
> Does someone have an idea of why do I not get the same colors in the 3D
> surface and after the cut?
>
> Thank you very much!
>
> Cristina
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160513/8145dd97/attachment.html>


More information about the vtkusers mailing list