<div><div class="gmail_quote">On Fri, Jan 22, 2010 at 10:42 AM, circass <span dir="ltr">&lt;<a href="mailto:circass@gmail.com">circass@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I Gonna try to implement that to my code.<br>
<div><div></div><div class="h5">Thanx,<br>
Circass<br>
<br>
<br>
KS Jothybasu wrote:<br>
&gt;<br>
&gt; In vtkLookupTable. Are you using vtkLookupTable if not here is a part of<br>
&gt; the<br>
&gt; code which might help you.<br>
&gt;<br>
&gt; * # Create a greyscale lookup table<br>
&gt;     table = vtk.vtkLookupTable()<br>
&gt;     table.SetRange(grayscale) # image intensity range<br>
&gt;     table.SetValueRange(1,0) # from black to white<br>
&gt;     table.SetSaturationRange(0.0, 0.0) # no color saturation<br>
&gt;     table.SetRampToSCurve()<br>
&gt;     table.SetNumberOfTableValues(402)<br>
&gt;     table.Build()<br>
&gt;<br>
&gt;     # Map the image through the lookup table<br>
&gt;     color = vtk.vtkImageMapToColors()<br>
&gt;     color.SetLookupTable(table)<br>
&gt;     color.SetInputConnection(reslice.GetOutputPort())<br>
&gt;<br>
&gt;     # Display the image<br>
&gt;     actor = vtk.vtkImageActor()<br>
&gt;     actor.SetInput(color.GetOutput())<br>
&gt; *<br>
&gt; Jothy<br>
&gt;<br>
&gt; On Fri, Jan 22, 2010 at 3:36 PM, circass &lt;<a href="mailto:circass@gmail.com">circass@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Where should i use that function ?<br>
&gt;&gt; is there a specific filter or what ?<br>
&gt;&gt;<br>
&gt;&gt; Thanx<br>
&gt;&gt; Circass<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; KS Jothybasu wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Could you please try SetValueRange(1,0).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Regards<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Jothy<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Fri, Jan 22, 2010 at 2:06 PM, circass &lt;<a href="mailto:circass@gmail.com">circass@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I think Alessandro understood me wrong, so i m trying to explain what<br>
&gt;&gt; i<br>
&gt;&gt; &gt;&gt; want<br>
&gt;&gt; &gt;&gt; more clearly.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I have dicom files that i read with itk and vtk.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; my images are already greyscale, i want to change the blacks with<br>
&gt;&gt; whites<br>
&gt;&gt; &gt;&gt; and<br>
&gt;&gt; &gt;&gt; vice versa.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanx.<br>
&gt;&gt; &gt;&gt; Circass<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; View this message in context:<br>
&gt;&gt; &gt;&gt; <a href="http://old.nabble.com/Reversing-Color-tp27272638p27273652.html" target="_blank">http://old.nabble.com/Reversing-Color-tp27272638p27273652.html</a><br>
&gt;&gt; &gt;&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://old.nabble.com/Reversing-Color-tp27272638p27275052.html" target="_blank">http://old.nabble.com/Reversing-Color-tp27272638p27275052.html</a><br>
&gt;&gt; Sent from the VTK - Users mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
</div><div class="h5"><br></div></div></blockquote><div><br></div><div>Jothy,</div><div><br></div><div>I don&#39;t see an example about vtkImageMapToColors on the wiki. Care to add one :) ?</div><div><br clear="all">Thanks,<br>
<br></div><div>David</div></div></div>