[vtkusers] Re versing Color
circass
circass at gmail.com
Fri Jan 22 10:42:35 EST 2010
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:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
View this message in context: http://old.nabble.com/Reversing-Color-tp27272638p27275153.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list