[vtkusers] How can I overlay a VTK image on a real time captured video (VC++6.0 platform)?

Liang Ma leo at esit.com
Fri Oct 24 14:03:55 EDT 2008


Hi all,

 

I’m new for VTK, so if I made any stupid mistake, please forgive me.

 

The VTK image is a contour of tumor. The real time video is ultrasound image from ultrasound scanner. In fact I want to show the contour of tumor on an ultrasound video stream.  

 

The ultrasound video is captured from a digital box through Directshow. And I draw the video on a static picture box. The VTK image is from a 3D model of tumor and I cut it with vtkcutter to a 2D image. 

 

The three possible solutions I think are as below:

 

(1) Do all the jobs in VTK, and then I need to take the video as a data source in VTK. I think it means I need to redo the video capture in VTK. I do not know which class I need to use. It seems that  vtkWin32VideoSource can do this job but I can not find VC++ sample program on it. Without the sample, too many stuffs are not clear. For an example, how to choose the capture device? Use VideoSourceDialog ( ) ? Another thing is in case we can do capturing in VTK, how to do the overlay?

 

(2) Do all the jobs in Directshow, and then I need to take the VTK data as a source in Directshow. I do not know if and how can I do it.

 

(3) If the background of vtkrenderer can be set to be transparent, then I can draw the 2D vtk image on the same static picture box. If the background is transparent, the contour will be overlaid on the video. I am not sure if this method will work― draw two images on one picture box. 

 

I am new in VTK, and my experiences in directshow are also limited. If you have any advice, could you please let me know? Thanks.

 

Do you think any of the three methods will succeed? If so, which one is better? Thanks again.

 

Best regards

 

Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081024/2c12c50a/attachment.htm>


More information about the vtkusers mailing list