[vtk-developers] Drawing on a vtkRenderWindow in C#/ActiViz

David Cole david.cole at kitware.com
Wed Sep 14 09:15:56 EDT 2011


If you want to do your own drawing, perhaps you should just have an
invisible/hidden vtkRenderWindow, and then grab its output with a
vtkWindowToImageFilter (
http://www.vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html )

After that, you can simply use the image returned from that to draw it
as a bitmap in your own drawing context, and then draw on top of it.

Or maybe somebody else listening here has done something similar and
can suggest another alternative?


HTH,
David


On Wed, Sep 14, 2011 at 7:28 AM, cakbulut <cakbulut at web.de> wrote:
> Hello together,
>
> I have already asked a similar question in context of Java.
> http://vtk.1045678.n5.nabble.com/Drwaing-on-a-vtkActor-in-Java-td4631768.html
>
> Now I have changed the language in the hope that the problem do not occur in
> C#.
>
> But it has.
>
> I am loading a DICOM image into a vtkRenderWindow. After that I'm taking the
> Graphics of the vtkRenderWindow and try to draw a Point or rectangle onto
> the DICOM image. But always all the drawn Graphics are behind the
> vtkRenderWindow.
>
> So I thought maybe it would work if I inherit the vtkRenderWindow and
> override the OnPaint() method. But the result is the same like above.
>
> The third stuff which I have also tried is that I have put the
> vtkRenderWindow into a Panel (mainPanel). After that I have added additional
> Panels into the mainPanel. But the added Panel is behind the
> vtkRenderWindow.
>
> As far as I have seen the vtkRenderWindow is a UserControl.
> Normally it is possible to draw on a UserControl.
>
> What is so special in vtkRenderWindow???
> Is there a solution for this problem???
>
> Best regards
> cakbulut
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Drawing-on-a-vtkRenderWindow-in-C-ActiViz-tp4802425p4802425.html
> Sent from the VTK - Dev 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list