[vtkusers] drawing onto a vtkDataImage (or any image)
David Doria
daviddoria+vtk at gmail.com
Fri Mar 12 10:15:43 EST 2010
On Fri, Mar 12, 2010 at 12:43 AM, Ryven <swifteye at gmail.com> wrote:
> Hi
>
> I was wondering if anyone knows of an easy way to draw onto an image in vtk
> and then save the image out?
>
> I've currently got rgb data stored in vtkPoint form (it was easy to use that
> way for processing purposes) and now want to move that data out onto an
> image which could then be saved out to disk as a bmp. I've been trying to
> use vtkImageData with SetScalarComponentFromFloat to draw with, but to
> little avail (Although, it may be possible that i'm missing a simple but
> crucial step in setting up the image appropriately rather than the drawing
> itself not working).
>
> Any ideas would be greatly appreciated
>
> Thanks
>
Take a look at these examples:
http://www.vtk.org/Wiki/VTK/Examples/DrawOnAnImage
http://www.vtk.org/Wiki/VTK/Examples/DrawShapes
I'm not sure what you're trying to do exactly, but VTKEdge has
something called paintbrushes:
http://www.kitware.com/news/home/browse/VTKEdge?2008_10_10&Paintbrushes+in+VTKEdge
I've never used it, but you may want to look into it.
Thanks,
David
More information about the vtkusers
mailing list