+//----------------------------------------------------------------------------
+void vvSlicerManager::UpdateLinkedNavigation(vvSlicer *refSlicer, bool bPropagate)
+{
+ vtkCamera *refCam = refSlicer->GetRenderer()->GetActiveCamera();
+ double refPosition[3], refFocal[3];
+ refCam->GetPosition(refPosition);
+ refCam->GetFocalPoint(refFocal);
+
+ for ( unsigned int i = 0; i < mSlicers.size(); i++) {
+ vtkCamera *camera = mSlicers[i]->GetRenderer()->GetActiveCamera();
+ camera->SetParallelScale(refCam->GetParallelScale());
+
+ double position[3], focal[3];
+ camera->GetPosition(position);
+ camera->GetFocalPoint(focal);
+
+ if(refSlicer->GetSliceOrientation()==mSlicers[i]->GetSliceOrientation()) {
+ for(int i=0; i<3; i++) {
+ position[i] = refPosition[i];
+ focal[i] = refFocal[i];
+ }
+ }
+
+ if(refSlicer->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_XY) {
+ if(mSlicers[i]->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_XZ) {
+ position[0] = refPosition[0];
+ focal[0] = refFocal[0];
+ }
+ if(mSlicers[i]->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_YZ) {
+ position[1] = refPosition[1];
+ focal[1] = refFocal[1];
+ }
+ }
+
+ if(refSlicer->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_XZ) {
+ if(mSlicers[i]->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_YZ) {
+ position[2] = refPosition[2];
+ focal[2] = refFocal[2];
+ }
+ if(mSlicers[i]->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_XY) {
+ position[0] = refPosition[0];
+ focal[0] = refFocal[0];
+ }
+ }
+
+ if(refSlicer->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_YZ) {
+ if(mSlicers[i]->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_XY) {
+ position[1] = refPosition[1];
+ focal[1] = refFocal[1];
+ }
+ if(mSlicers[i]->GetSliceOrientation()==vtkImageViewer2::SLICE_ORIENTATION_XZ) {
+ position[2] = refPosition[2];
+ focal[2] = refFocal[2];
+ }
+ }
+
+ camera->SetFocalPoint(focal);
+ camera->SetPosition(position);
+
+ //Fix for bug #243
+ mSlicers[i]->ForceUpdateDisplayExtent();
+ }
+
+ Render();
+ if(bPropagate)
+ for (std::list<std::string>::const_iterator i = mLinkedId.begin(); i != mLinkedId.end(); i++)
+ emit UpdateLinkedNavigation(*i, this, refSlicer);
+}
+//----------------------------------------------------------------------------