[vtkusers] VTK class for scale bar line ?

HongKee Moon moon at mpi-cbg.de
Tue Aug 19 11:35:32 EDT 2014


Maybe, you can use the below code. However, customization is necessary for your taste.

		vtkTextProperty tprop = new vtkTextProperty();
		tprop.SetColor(1, 1, 1);
		tprop.ShadowOn();

		vtkCubeAxesActor2D axes = new vtkCubeAxesActor2D();
		axes.SetInputConnection(merge.GetOutputPort());
		axes.SetCamera(renWin.GetRenderer().GetActiveCamera());
		axes.SetLabelFormat("%6.4g");
		axes.SetFlyModeToOuterEdges();
		axes.SetFontFactor(0.8);
		axes.SetAxisTitleTextProperty(tprop);
		axes.SetAxisLabelTextProperty(tprop);
		renWin.GetRenderer().AddViewProp(axes);

Cheers,
HongKee


On Aug 19, 2014, at 2:47 PM, flaviu2 [via VTK] <ml-node+s1045678n5728279h60 at n5.nabble.com> wrote:

> There is in VTK some class that can render an scale bar line, like in attached image ? 
> Untitled-1.jpg
> Which one ? 
> 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://vtk.1045678.n5.nabble.com/VTK-class-for-scale-bar-line-tp5728279.html
> To start a new topic under VTK - Users, email ml-node+s1045678n1224199h80 at n5.nabble.com 
> To unsubscribe from VTK, click here.
> NAML


--
HongKee Moon
Software Engineer
Scientific Computing Facility

Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstr. 108
01307 Dresden
Germany

fon: +49 351 210 2740
fax: +49 351 210 1689
www.mpi-cbg.de





--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-class-for-scale-bar-line-tp5728279p5728284.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140819/b0736ada/attachment.html>


More information about the vtkusers mailing list