this->SM->Render();
return;
}
+ if (KeyPress == "x") {
+ for(int i=0; i<SM->NumberOfSlicers(); i++) {
+ SM->RemoveActor("overlay",0);
+ SM->SetColorMap(0);
+ SM->Render();
+ }
+ return;
+ }
if (KeyPress == "u") {
this->SM->Reload();
this->SM->Render();
return;
}
if (KeyPress == "Up") {
- DD("------------ up");
+ // DD("------------ up");
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()+1);
- DD("------------ after set slice");
+ //DD("------------ after set slice");
this->SM->UpdateInfoOnCursorPosition(VisibleInWindow);
- DD("------------ after UpdateInfoOnCursorPosition");
+ //DD("------------ after UpdateInfoOnCursorPosition");
this->SM->UpdateSlice(VisibleInWindow);
- DD("------------ after updateslice");
+ //DD("------------ after updateslice");
}
if (KeyPress == "Down") {
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1);
mStartSlicer = -1;
}
+ if (event == vtkCommand::EndInteractionEvent) {
+ this->SM->UpdateLinkedNavigation(this->SM->GetSlicer(VisibleInWindow),true);
+ return;
+ }
}
if (VisibleInWindow > -1) {
this->SM->Activated();
} else if (event == vtkCommand::MouseWheelForwardEvent && isi->GetInteractor()->GetControlKey()) {
double factor = 2;
this->Dolly(pow((double)1.1, factor),isi->GetInteractor());
+ Execute(caller, vtkCommand::EndInteractionEvent, NULL);
} else if (event == vtkCommand::MouseWheelBackwardEvent && !isi->GetInteractor()->GetControlKey()) {
this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1);
this->SM->UpdateSlice(VisibleInWindow);
} else if (event == vtkCommand::MouseWheelBackwardEvent && isi->GetInteractor()->GetControlKey()) {
double factor = -2;
this->Dolly(pow((double)1.1, factor),isi->GetInteractor());
+ Execute(caller, vtkCommand::EndInteractionEvent, NULL);
}
double xWorld=0;
double yWorld=0;