[vtkusers] Thresholding with Transparency
David Gobbi
dgobbi at atamai.com
Tue Nov 29 12:13:59 EST 2005
Hi Ben,
If you want transparency, you need to use a filter that will add an
alpha component to your data. The vtkImageThreshold filter won't do that.
It might seem counterintuitive, but the best way to apply a transparency
threshold to your data (assuming that it is greyscale data and not RGB)
is with vtkImageMapToColors. Just create a vtkLookupTable that keeps
the same grey value for all pixels, but which sets the alpha value of
all pixels that are below threshold to zero. Color mapping is a very
efficient operation so this should work well with real-time video.
- David
Ben Wilde wrote:
> Hello,
>
> I am very, very new to VTK, and I'm trying to do some video processing
> that I don't imagine should be too complicated.
>
> I have some video data that I would like to apply a threshold to, in
> which only the image above the threshold appears, and the
> non-thresholded sections are transparent.
>
> I am using am using video.getOutput to turn my video into an image. I
> have looked at using vtkImageThreshold, but I can't figure out how to
> make the thresholded parts of the image transparent. Am I missing
> something easy? If not, does anybody have suggestions on how to proceed?
>
> I apologize if this is too easy or if I misused any terminology.
> Again, I'm am about as much of a beginner as you can be.
>
> Thank you,
> Ben
>
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list