Fix slice sync slice number corner text bug.
This commit is contained in:
@@ -257,8 +257,6 @@ void infinitiViewer::InstallPipeline() {
|
||||
&infinitiViewer::ChangeSlice);
|
||||
this->InteractorStyle->AddObserver(ActorDraggableInteractorStyle::DraggableStyleEvents::SlicedEvent, this,
|
||||
&infinitiViewer::LoadMeasures);
|
||||
InteractorStyle->AddObserver(ActorDraggableInteractorStyle::SlicedEvent, this,
|
||||
&infinitiViewer::UpdateTopLeftCornerInfo);
|
||||
|
||||
//for convert vtkEvent to Qt signal
|
||||
this->InteractorStyle->AddObserver(ActorDraggableInteractorStyle::DraggableStyleEvents::SlicedEvent, this,
|
||||
@@ -461,8 +459,8 @@ void infinitiViewer::SetSlice(int slice) {
|
||||
if (Fusion && FusionMapper) {
|
||||
FusionMapper->SetClippingPlanes(ImageMapper->GetClippingPlanes());
|
||||
}
|
||||
|
||||
this->Render();
|
||||
UpdateTopLeftCornerInfo();
|
||||
if (InteractorStyle){
|
||||
double direction = (double)(slice - lastSliceNumber);
|
||||
double focusPoint[5] = {.0, .0, .0 };
|
||||
@@ -503,6 +501,8 @@ void infinitiViewer::applySliceOffset(double offset, double direction){
|
||||
// 假设原数据为slice--则需要唯一
|
||||
if (direction < 0) offset = offset * -1.0;
|
||||
Renderer->GetActiveCamera()->SetDistance(Renderer->GetActiveCamera()->GetDistance() + offset);
|
||||
this->Render();
|
||||
UpdateTopLeftCornerInfo();
|
||||
}
|
||||
|
||||
vtkSmartPointer<vtkPoints> infinitiViewer::GetSliceBoundPoints() {
|
||||
@@ -549,6 +549,8 @@ void infinitiViewer::SyncSlicePoint(double *point) {
|
||||
ImageMapper->GetBounds(bounds);
|
||||
f[SliceOrientation] = focusPoint[SliceOrientation];
|
||||
Renderer->GetActiveCamera()->SetFocalPoint(f);
|
||||
this->Render();
|
||||
UpdateTopLeftCornerInfo();
|
||||
}
|
||||
|
||||
// zoom------------------------------------------------------------------------
|
||||
|
||||
@@ -162,12 +162,10 @@ public:
|
||||
|
||||
void syncSlicePoint(double *point) {
|
||||
mImageViewer->SyncSlicePoint(point);
|
||||
mImageViewer->Render();
|
||||
}
|
||||
|
||||
void applySliceOffset(double offset, double direction){
|
||||
mImageViewer->applySliceOffset(offset, direction);
|
||||
mImageViewer->Render();
|
||||
}
|
||||
|
||||
void loadSeries(SeriesImageSet *series);
|
||||
|
||||
Reference in New Issue
Block a user