AW: [vtkusers] Drawing on vtkImageViewer!!!!

"Siebert, Frank-André" siebert at onco.uni-kiel.de
Thu May 30 10:40:13 EDT 2002


>  -----Ursprüngliche Nachricht-----
> Von: 	latbera at virgilio.it [mailto:latbera at virgilio.it] 
> Gesendet:	Mittwoch, 29. Mai 2002 18:33
> An:	vtkusers at public.kitware.com
> Betreff:	[vtkusers] Drawing on vtkImageViewer!!!!
> 
> I load a stack of image and visualize it with vtkImageViewer...well
> now I would to draw a rect for select a region of interest (ROI)..the
> question
> is : how can I draw on vtkImageViewer ? Thank's
> 
> 
	In my Applikation I am using vtkTkImageViewerWidget and draw lines
on the top of the images.
	Here are some lines of my tcl-code (I think they are not very
professional !).


	      ...
	      
	      vtkPoints pts1

		vtkCellArray line1
		
		vtkTransform transformSeed

		vtkPolyData seedLines
		seedLines SetPoints pts1
		seedLines SetLines line1

		vtkTransformPolyDataFilter tpd
		tpd SetTransform transformSeed
		tpd SetInput seedLines

		vtkPolyDataMapper2D seedLineMapper
		seedLineMapper SetInput [tpd GetOutput]

		vtkActor2D seedLineActor
		seedLineActor SetMapper seedLineMapper
		[seedLineActor GetProperty] SetColor 1 1 0
		[seedLineActor GetProperty] SetLineWidth 3
		[seedLineActor GetProperty] SetDisplayLocationToForeground
		seedLineActor SetPosition [expr -round([lindex [reslice
GetOutputOrigin] 0])] [expr -round([lindex [reslice GetOutputOrigin] 1])]

		set imager [[.top.f1.r1 GetImageViewer] GetRenderer]
		$imager AddActor2D seedLineActor


		viewer Render

	      ...




	The explicit definition of my lines is in another part. It looks
like

	            ...    

	            pts1 InsertPoint [expr 2*$i+1] $x $y 0
			line1 InsertNextCell 2
			line1 InsertCellPoint [expr 2*$i]
			line1 InsertCellPoint [expr 2*$i+1] 

	            ...



	Maybe this helps a little.



	Frank-André





> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> Viruses are not found. Checked by AVP.



More information about the vtkusers mailing list