I created vtkDistanceWidget to measure distance on my reslice image. and it works fine but when I scroll through slices, the distanceWidget also appears.I want to display the measure tool only for current slice not all slices and also want to save the measure tool (points) to meta file.
So I don’t know how to add the widget to my image data and save to meta file and restore from.
Here is my snippet:
measure_widget = vtk.vtkDistanceWidget() measure_repr = vtk.vtkDistanceRepresentation2D() measure_widget.SetRepresentation(measure_repr) measure_widget.SetInteractor(interactor) measure_widget.On()