<div dir="ltr"><div><div><div>Hi Chris,<br><br></div>This looks like a lighting issue. The representation sets its ambient color to full white. Setting the ambient coefficient to 0.0 seems to produce expected results.<br>boxRep.GetOutlineProperty().SetAmbient(0.0)<br><br></div>Thanks<br></div>Sujin<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 3:06 PM, Chris Harris <span dir="ltr"><<a href="mailto:chris.harris@kitware.com" target="_blank">chris.harris@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We are using vtkBoxRepresentation in tomviz to perform cropping. The outline color defaults to white, which is not so good for a white background! So we are trying to set it to an off white (0.8, 0.8, 0.8) However, the value gets rendered as white? What am I missing? Here is the python code to recreate this issue<div><br></div><div><div>import vtk</div><div><br></div><div>ren = vtk.vtkRenderer()</div><div>ren.SetBackground(1,1,1)</div><div><br></div><div>renWin = vtk.vtkRenderWindow()</div><div>renWin.AddRenderer(ren)</div><div><br></div><div>iren = vtk.vtkRenderWindowInteractor(<wbr>)</div><div>iren.SetRenderWindow(renWin)</div><div><br></div><div>boxRep = vtk.vtkBoxRepresentation()</div><div>boxRep.SetPlaceFactor(1.0)</div><div>boxRep.HandlesOn()</div><div>boxRep.GetOutlineProperty().<wbr>SetColor(0.8, 0.8, 0.8)</div><div><br></div><div>boxWidget = vtk.vtkBoxWidget2()</div><div>boxWidget.SetInteractor(iren)</div><div>boxWidget.SetRepresentation(<wbr>boxRep)</div><div>boxWidget.SetPriority(1)</div><div>boxWidget.On()</div><div><br></div><div>iren.Initialize()</div><div>renWin.Render()</div><div>iren.Start()</div></div><div><br></div><div><br></div><div>Thanks, </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chris</div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
<br></blockquote></div><br></div>