ScaleBarWidget#

class ScaleBarWidget(renderer, interactor)[source]#

Bases: object

VTK Scale Bar widget for adding distance indicators to the vtk viewer.

Methods

ScaleBarWidget.hide()

ScaleBarWidget.set_label_format(format_string)

Set the format string for the scale labels.

ScaleBarWidget.set_units(units)

Set the units for the scale bar.

ScaleBarWidget.show()

set_label_format(format_string)[source]#

Set the format string for the scale labels.

Args:

format_string: Format string (e.g., “%.1f mm” or “%.2f µm”)

set_units(units)[source]#

Set the units for the scale bar.

Args:

units: Unit string (e.g., “mm”, “µm”, “nm”)