[vtkusers] Drawing on Image

"Siebert, Frank-André" siebert at onco.uni-kiel.de
Fri Feb 8 04:18:21 EST 2002


Hello VTK-users,

I made little VTK3.2-program which is able to show 8 bit grayscale images.
Now I want to draw lines in a different color on the top of the image.
The lines should be set by the mouse and thereafter moveable.



Now my questions:

1. If I use vtkPolydata to describe my lines, how can I put them on the top
of my image?
	Using a second image and blending them together or can I write the
vtkPolydata
	directly on my image ? 

2. When the first problem is solved, would the usage of the vtkPicker or
vtkCellPicker a proper
	method to select a single line for shifting it or change its
properties?     





Thanks, I hope somebody will answer.Beneath is a part of my trival code.


Have a nice day


Frank-André Siebert   





...

vtkTIFFReader reader
    reader SetFileName $file

vtkImageReslice reslice
    reslice SetInput [my_close GetOutput]
    reslice InterpolateOn
    reslice OutputAlwaysCenteredOnInputOff
    reslice SetOutputExtent 0 [expr $viewportWidth-1] 0 [expr
$viewportHeight-1] 0 0

vtkImageViewer viewer
    viewer SetInput [reslice GetOutput]
    viewer SetColorWindow 256
    viewer SetColorLevel 127.5
    [viewer GetImageWindow] DoubleBufferOn

vtkTkImageViewerWidget .top.f1.r1 -width $viewportWidth -height
$viewportHeight -iv viewer

...



More information about the vtkusers mailing list