[vtkusers] Re versing Color

KS Jothybasu jothybasu at gmail.com
Fri Jan 22 10:53:43 EST 2010


Sure by the way I had converter 2 of the c++ examples to python how to add
that to wiki?

Slowly ,down the line I will convert all the c++ to python!

Thanks

Jothy

On Fri, Jan 22, 2010 at 3:46 PM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Fri, Jan 22, 2010 at 10:42 AM, circass <circass at gmail.com> wrote:
>
>>
>> I Gonna try to implement that to my code.
>> Thanx,
>> Circass
>>
>>
>> KS Jothybasu wrote:
>> >
>> > In vtkLookupTable. Are you using vtkLookupTable if not here is a part of
>> > the
>> > code which might help you.
>> >
>> > * # Create a greyscale lookup table
>> >     table = vtk.vtkLookupTable()
>> >     table.SetRange(grayscale) # image intensity range
>> >     table.SetValueRange(1,0) # from black to white
>> >     table.SetSaturationRange(0.0, 0.0) # no color saturation
>> >     table.SetRampToSCurve()
>> >     table.SetNumberOfTableValues(402)
>> >     table.Build()
>> >
>> >     # Map the image through the lookup table
>> >     color = vtk.vtkImageMapToColors()
>> >     color.SetLookupTable(table)
>> >     color.SetInputConnection(reslice.GetOutputPort())
>> >
>> >     # Display the image
>> >     actor = vtk.vtkImageActor()
>> >     actor.SetInput(color.GetOutput())
>> > *
>> > Jothy
>> >
>> > On Fri, Jan 22, 2010 at 3:36 PM, circass <circass at gmail.com> wrote:
>> >
>> >>
>> >> Where should i use that function ?
>> >> is there a specific filter or what ?
>> >>
>> >> Thanx
>> >> Circass
>> >>
>> >>
>> >> KS Jothybasu wrote:
>> >> >
>> >> > Could you please try SetValueRange(1,0).
>> >> >
>> >> > Regards
>> >> >
>> >> > Jothy
>> >> >
>> >> > On Fri, Jan 22, 2010 at 2:06 PM, circass <circass at gmail.com> wrote:
>> >> >
>> >> >>
>> >> >> I think Alessandro understood me wrong, so i m trying to explain
>> what
>> >> i
>> >> >> want
>> >> >> more clearly.
>> >> >>
>> >> >> I have dicom files that i read with itk and vtk.
>> >> >>
>> >> >> my images are already greyscale, i want to change the blacks with
>> >> whites
>> >> >> and
>> >> >> vice versa.
>> >> >>
>> >> >> Thanx.
>> >> >> Circass
>> >> >> --
>> >> >> View this message in context:
>> >> >> http://old.nabble.com/Reversing-Color-tp27272638p27273652.html
>> >> >> Sent from the VTK - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >> _______________________________________________
>> >> >> 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
>> >> >>
>> >> >> Follow this link to subscribe/unsubscribe:
>> >> >> http://www.vtk.org/mailman/listinfo/vtkusers
>> >> >>
>> >> >
>> >> > _______________________________________________
>> >> > 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
>> >> >
>> >> > Follow this link to subscribe/unsubscribe:
>> >> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://old.nabble.com/Reversing-Color-tp27272638p27275052.html
>> >> Sent from the VTK - Users mailing list archive at Nabble.com.
>> >>
>> >> _______________________________________________
>> >> 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
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.vtk.org/mailman/listinfo/vtkusers
>> >>
>> >
>> > _______________________________________________
>> > 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
>> >
>> > Follow this link to subscribe/unsubscribe:
>>
>>
> Jothy,
>
> I don't see an example about vtkImageMapToColors on the wiki. Care to add
> one :) ?
>
> Thanks,
>
> David
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100122/e8586c2b/attachment.htm>


More information about the vtkusers mailing list