I use vtkResliceImageViewer to read DICOM data and display it, but when I doodle with vtkImageTracerWidget, it doesn’t work, why?
import vtk
from globalVariables import getDirPath
reader = vtk.vtkDICOMImageReader()
reader.SetDirectoryName("DicomData/16")
iren=vtk.vtkRenderWindowInteractor()
view=vtk.vtkResliceImageViewer()
view.SetColorWindow(2000)
view.SetColorLevel(1000)
view.SetInputData(reader.GetOutput())
view.SetupInteractor(iren)
view.SetColorLevel(500)
view.SetColorWindow(2000)
view.SetSliceOrientationToXY()
actor=vtk.vtkImageActor()
actor.SetInputData(view.GetInput())
paint1=vtk.vtkImageTracerWidget()
paint1.GetLineProperty().SetLineWidth(5)
paint1.SetViewProp(actor)
paint1.SetInputData(view.GetInput())
paint1.SetInteractor(iren)
paint1.On()
iren.Start()