this.resliceMapper = vtkImageResliceMapper.newInstance();
this.reslicePlane = vtkPlane.newInstance();
this.reslicePlane.setNormal(ViewType[2]);
this.reslicePlane.setOrigin([
this.vtkImageData.getCenter()[0],
this.vtkImageData.getCenter()[1],
this.vtkImageData.getCenter()[2],
]);
this.reslicePlaneSource = vtkPlaneSource.newInstance();
this.reslicePlaneSource.setOrigin([
this.vtkImageData.getCenter()[0],
this.vtkImageData.getCenter()[1],
this.vtkImageData.getCenter()[2],
])
this.resliceMapper.setInputData(this.vtkImageData);
this.resliceMapper.setSlicePlane(this.reslicePlane);
this.resliceMapper.setSlabType(SlabTypes.MAX);
this.resliceMapper.update();
this.imageResliceActor = vtkImageSlice.newInstance();
this.imageResliceActor.setMapper(this.resliceMapper);
this.imageResliceActor.getProperty().setColorWindow(5000);
this.imageResliceActor.getProperty().setColorLevel(1400);
// this.imageInteractor = vtkInteractorStyleImage.newInstance();
// this.renderWindow
// .getRenderWindow()
// .getInteractor()
// .setInteractorStyle(this.imageInteractor);
this.renderer.addActor(this.imageResliceActor);
I have created vtkImageSlice actor with “vtkImageMapper”
Now I want to pick a point on that actor, Here is my code for picker
const picker = vtkCellPicker.newInstance();
picker.setPickFromList(true);
picker.initializePickList();
picker.setTolerance(0);
return picker;
But I am not getting any points with picker.
this.imagePicker.pick(mousePosition, this.renderer);
const pickedPositions = this.imagePicker.getPickedPositions();