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