Add EndPanEvent to infinitiViewer::raiseEvent, use infinitiViewer::raiseEvent to instead of addObserver mode.
This commit is contained in:
@@ -800,6 +800,7 @@ void infinitiViewer::InstallPipeline()
|
||||
this->InteractorStyle->AddObserver(ActorDraggableInteractorStyle::DraggableStyleEvents::SlicedEvent, this, &infinitiViewer::raiseEvent);
|
||||
this->InteractorStyle->AddObserver(ActorDraggableInteractorStyle::DraggableStyleEvents::EndDollyEvent, this, &infinitiViewer::raiseEvent);
|
||||
this->InteractorStyle->AddObserver(vtkCommand::EventIds::EndWindowLevelEvent, this, &infinitiViewer::raiseEvent);
|
||||
this->InteractorStyle->AddObserver(vtkCommand::EventIds::EndPanEvent, this, &infinitiViewer::raiseEvent);
|
||||
}
|
||||
|
||||
this->Interactor->SetInteractorStyle(this->InteractorStyle);
|
||||
|
||||
@@ -682,12 +682,10 @@ void DicomImageView::CopyFromSeries(SeriesImageSet *series)
|
||||
|
||||
//以下是一些转接函数
|
||||
//TODO: 考虑使用connect 替代 AddObserver,避免出现多种事件机制架构
|
||||
connect(_ImageViewer->GetSignalRaiser(),&vtkSignalRaiser::raiseEvent, this, &DicomImageView::syncEventFunc);
|
||||
//目前 替换了一部分包括SlicedEvent,EndDollyEvent,EndWindowLevelEvent,EndPanEvent,主要关联到sync
|
||||
|
||||
ActorDraggableInteractorStyle *style = _ImageViewer->GetInteractorStyle();
|
||||
style->AddObserver(vtkCommand::EventIds::EndPanEvent, this, &DicomImageView::syncEventFunc);
|
||||
//style->AddObserver(vtkCommand::EventIds::EndRotateEvent, this, &DicomImageView::syncEventFunc);
|
||||
style->AddObserver(vtkCommand::EventIds::EndWindowLevelEvent, this, &DicomImageView::syncEventFunc);
|
||||
style->AddObserver(ActorDraggableInteractorStyle::DraggableStyleEvents::EndDollyEvent, this, &DicomImageView::syncEventFunc);
|
||||
style->AddObserver(ActorDraggableInteractorStyle::DraggableStyleEvents::SlicedEvent, this, &DicomImageView::syncEventFunc);
|
||||
style->AddObserver(vtkCommand::EventIds::WindowLevelEvent, this, &DicomImageView::updateWindowLevelCb);
|
||||
style->AddObserver(ActorDraggableInteractorStyle::DoubleClickEvent, this, &DicomImageView::doubleclickedEventCb);
|
||||
style->AddObserver(ActorDraggableInteractorStyle::ScalarOpacityEvent, this, &DicomImageView::scalarEventCb);
|
||||
|
||||
@@ -337,18 +337,10 @@ void ViewContainerWidget::emptyCurrentView()
|
||||
|
||||
void ViewContainerWidget::Slot_ViewEmpty(DicomImageView *view)
|
||||
{
|
||||
|
||||
if (view != nullptr)
|
||||
{
|
||||
view->ResetView();
|
||||
}
|
||||
|
||||
////default notify is true
|
||||
//if (current_view_ == view)
|
||||
//{
|
||||
// setCurrentView(view_list_.first());
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
void ViewContainerWidget::Slot_DragDropEvent(DicomImageView *view, thumbnailImage* tb)
|
||||
|
||||
Reference in New Issue
Block a user