I am using both dicomseiral read and pickpixel example.
https://kitware.github.io/vtk-examples/site/Cxx/IO/ReadDICOMSeries/
https://kitware.github.io/vtk-examples/site/Cxx/Images/PickPixel/
Well, in my custom imageinteractorstyle I difen OnMouseMove function and code as in pickpixel exmaple.
I got a exception triggered in my Qt debugger as below:
I check the debugger, it seems no nullptr:
The GetEventPosition function can return the right position infomation.
I alse test the below code:
this->Picker->Pick(1.0,1.0,1.0,renderer);
it also return a exception.
Can someone help me?
If you need more debug information, just tell me.
Part of my OnMouseMove function:
void myVtkInteractorStyleImage::OnMouseMove(){
vtkRenderWindowInteractor* interactor =
this->_ImageViewer->GetRenderWindow()->GetInteractor();
vtkRenderer* renderer = this->_ImageViewer->GetRenderer();
vtkImageActor* actor = this->_ImageViewer->GetImageActor();
vtkImageData* image = this->_ImageViewer->GetInput();
vtkInteractorStyle* style =
dynamic_cast<vtkInteractorStyle*>(interactor->GetInteractorStyle());
this->Picker->Pick(1.0,1.0,1.0,renderer);
// Pick at the mouse location provided by the interactor
this->Picker->Pick(interactor->GetEventPosition()[0],
interactor->GetEventPosition()[1], 0.0, renderer);
// There could be other props assigned to this picker, so
// make sure we picked the image actor
vtkAssemblyPath* path = this->Picker->GetPath();
bool validPick = false;
......
......