From 0c28fb91fda0d2e5e8e3b10e14723fedec6275d3 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Fri, 10 Aug 2012 15:11:26 +0200 Subject: [PATCH] First version of reslicing transform --- vv/qt_ui/vvMainWindow.ui | 58 ++++++++++------- vv/vvMainWindow.cxx | 13 +++- vv/vvMainWindow.h | 1 + vv/vvSlicer.cxx | 59 +++++++++-------- vv/vvSlicer.h | 10 ++- vv/vvSlicerManager.cxx | 116 ++++++++++++++++++++++++---------- vv/vvSlicerManager.h | 5 ++ vv/vvSlicerManagerCommand.cxx | 7 +- 8 files changed, 182 insertions(+), 87 deletions(-) diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui index 789e59f..8d3d8ff 100644 --- a/vv/qt_ui/vvMainWindow.ui +++ b/vv/qt_ui/vvMainWindow.ui @@ -67,19 +67,6 @@ 2 - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -330,7 +317,7 @@ - + @@ -356,13 +343,6 @@ - - - - Qt::Vertical - - - @@ -402,6 +382,40 @@ + + + + + World + + + + + Voxels + + + + + + + + Slice to + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -791,7 +805,7 @@ 0 0 1008 - 22 + 25 diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 9fc078c..38f4f8b 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -309,10 +309,10 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() connect(levelSpinBox,SIGNAL(editingFinished()),this,SLOT(WindowLevelEdited())); connect(colorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateColorMap())); connect(presetComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateWindowLevel())); + connect(slicingPresetComboBox, SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateSlicingPreset())); connect(inverseButton,SIGNAL(clicked()),this,SLOT(SwitchWindowLevel())); connect(applyWindowLevelToAllButton,SIGNAL(clicked()),this,SLOT(ApplyWindowLevelToAllImages())); - connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(ShowContextMenu(QPoint))); connect(linkPanel,SIGNAL(addLink(QString,QString)),this,SLOT(AddLink(QString,QString))); @@ -1176,6 +1176,7 @@ void vvMainWindow::ImageInfoChanged() } } WindowLevelChanged(); + slicingPresetComboBox->setCurrentIndex(mSlicerManagers[index]->GetSlicingPreset()); if (mSlicerManagers[index]->GetSlicer(0)->GetVF()) { overlayPanel->getVFName(mSlicerManagers[index]->GetVFName().c_str()); @@ -1721,6 +1722,16 @@ void vvMainWindow::UpdateWindowLevel() } //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +void vvMainWindow::UpdateSlicingPreset() +{ + if (DataTree->selectedItems().size()) { + int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]); + mSlicerManagers[index]->SetSlicingPreset(slicingPresetComboBox->currentIndex()); + } +} +//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ void vvMainWindow::UpdateColorMap() { diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index bbdfe26..c77a59a 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -118,6 +118,7 @@ public slots: void SetWindowLevel(double w, double l); void UpdateColorMap(); void UpdateWindowLevel(); + void UpdateSlicingPreset(); void SwitchWindowLevel(); void ApplyWindowLevelToAllImages(); void UpdateLinkManager(std::string id, int slicer, double x, double y, double z, int temps); diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 2478205..52fa161 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -145,6 +145,9 @@ vvSlicer::vvSlicer() #if VTK_MAJOR_VERSION >= 6 || (VTK_MAJOR_VERSION >= 5 && VTK_MINOR_VERSION >= 10) this->GetImageActor()->GetMapper()->BorderOn(); #endif + + mSlicingTransform = vtkSmartPointer::New(); + mConcatenatedTransform = vtkSmartPointer::New(); } //------------------------------------------------------------------------------ @@ -290,13 +293,20 @@ vvSlicer::~vvSlicer() } //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +double* vvSlicer::GetCurrentPosition() +{ + return mCurrentBeforeSlicingTransform; +} +//------------------------------------------------------------------------------ //------------------------------------------------------------------------------ void vvSlicer::SetCurrentPosition(double x, double y, double z, int t) { - mCurrent[0] = x; - mCurrent[1] = y; - mCurrent[2] = z; + mCurrentBeforeSlicingTransform[0]=x; + mCurrentBeforeSlicingTransform[1]=y; + mCurrentBeforeSlicingTransform[2]=z; + mSlicingTransform->GetInverse()->TransformPoint(mCurrentBeforeSlicingTransform,mCurrent); mCurrentTSlice = t; } //------------------------------------------------------------------------------ @@ -314,7 +324,11 @@ void vvSlicer::SetImage(vvImage::Pointer image) mImageReslice->AutoCropOutputOn(); mImageReslice->SetBackgroundColor(-1000,-1000,-1000,1); } - mImageReslice->SetResliceTransform(mImage->GetTransform()); + + mConcatenatedTransform->Identity(); + mConcatenatedTransform->Concatenate(mImage->GetTransform()); + mConcatenatedTransform->Concatenate(mSlicingTransform); + mImageReslice->SetResliceTransform(mConcatenatedTransform); mImageReslice->SetInput(0, mImage->GetFirstVTKImageData()); mImageReslice->UpdateInformation(); @@ -1271,34 +1285,29 @@ void vvSlicer::Render() if (ca->GetVisibility()) { std::stringstream worldPos; - double X = (mCurrent[0] - this->GetInput()->GetOrigin()[0])/this->GetInput()->GetSpacing()[0]; - double Y = (mCurrent[1] - this->GetInput()->GetOrigin()[1])/this->GetInput()->GetSpacing()[1]; - double Z = (mCurrent[2] - this->GetInput()->GetOrigin()[2])/this->GetInput()->GetSpacing()[2]; - -// if (X < this->GetInput()->GetWholeExtent()[0]) X = this->GetInput()->GetWholeExtent()[0]; -// else if (X > this->GetInput()->GetWholeExtent()[1]) X = this->GetInput()->GetWholeExtent()[1]; -// if (Y < this->GetInput()->GetWholeExtent()[2]) Y = this->GetInput()->GetWholeExtent()[2]; -// else if (Y > this->GetInput()->GetWholeExtent()[3]) Y = this->GetInput()->GetWholeExtent()[3]; -// if (Z < this->GetInput()->GetWholeExtent()[4]) Z = this->GetInput()->GetWholeExtent()[4]; -// else if (Z > this->GetInput()->GetWholeExtent()[5]) Z = this->GetInput()->GetWholeExtent()[5]; - - if (X >= this->GetInput()->GetWholeExtent()[0] && - X <= this->GetInput()->GetWholeExtent()[1] && - Y >= this->GetInput()->GetWholeExtent()[2] && - Y <= this->GetInput()->GetWholeExtent()[3] && - Z >= this->GetInput()->GetWholeExtent()[4] && - Z <= this->GetInput()->GetWholeExtent()[5]) { + double pt[3]; + mConcatenatedTransform->TransformPoint(mCurrent, pt); + double X = (pt[0] - mImage->GetVTKImages()[mCurrentTSlice]->GetOrigin()[0])/mImage->GetVTKImages()[mCurrentTSlice]->GetSpacing()[0]; + double Y = (pt[1] - mImage->GetVTKImages()[mCurrentTSlice]->GetOrigin()[1])/mImage->GetVTKImages()[mCurrentTSlice]->GetSpacing()[1]; + double Z = (pt[2] - mImage->GetVTKImages()[mCurrentTSlice]->GetOrigin()[2])/mImage->GetVTKImages()[mCurrentTSlice]->GetSpacing()[2]; + + if (X >= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[0]-0.5 && + X <= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[1]+0.5 && + Y >= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[2]-0.5 && + Y <= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[3]+0.5 && + Z >= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[4]-0.5 && + Z <= mImage->GetVTKImages()[mCurrentTSlice]->GetWholeExtent()[5]+0.5) { int ix, iy, iz; - double value = this->GetScalarComponentAsDouble(this->GetInput(), X, Y, Z, ix, iy, iz); + double value = this->GetScalarComponentAsDouble(mImage->GetVTKImages()[mCurrentTSlice], X, Y, Z, ix, iy, iz); if(ImageActor->GetVisibility()) worldPos << "data value : " << value << std::endl; - worldPos << "mm : " << lrint(mCurrent[0]) << ' ' - << lrint(mCurrent[1]) << ' ' - << lrint(mCurrent[2]) << ' ' + worldPos << "mm : " << lrint(mCurrentBeforeSlicingTransform[0]) << ' ' + << lrint(mCurrentBeforeSlicingTransform[1]) << ' ' + << lrint(mCurrentBeforeSlicingTransform[2]) << ' ' << mCurrentTSlice << std::endl; worldPos << "pixel : " << ix << ' ' diff --git a/vv/vvSlicer.h b/vv/vvSlicer.h index c09001d..44e1a2c 100644 --- a/vv/vvSlicer.h +++ b/vv/vvSlicer.h @@ -140,10 +140,11 @@ public: return mCursor; } + vtkTransform * GetSlicingTransform() { return mSlicingTransform; } + vtkTransform * GetConcatenatedTransform() { return mConcatenatedTransform; } + void SetCurrentPosition(double x, double y, double z, int t); - double* GetCurrentPosition() { - return mCurrent; - } + double* GetCurrentPosition(); void UpdateCursorPosition(); void SetCursorVisibility(bool s); @@ -207,6 +208,8 @@ protected: vvLandmarks* mLandmarks; vtkSmartPointer mImageReslice; + vtkSmartPointer mSlicingTransform; + vtkSmartPointer mConcatenatedTransform; vtkSmartPointer mOverlayReslice; vtkSmartPointer mOverlayMapper; vtkSmartPointer mOverlayActor; @@ -235,6 +238,7 @@ protected: int mCurrentTSlice; double mCurrent[3]; + double mCurrentBeforeSlicingTransform[3]; double mCursor[4]; int mSubSampling; int mScale; diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index c86928f..1804970 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -72,6 +72,7 @@ vvSlicerManager::vvSlicerManager(int numberOfSlicers) mPreviousSlice.resize(numberOfSlicers); mPreviousTSlice.resize(numberOfSlicers); + mSlicingPreset = 0; } //---------------------------------------------------------------------------- @@ -570,36 +571,42 @@ void vvSlicerManager::SetOpacity(int i, double factor) //---------------------------------------------------------------------------- void vvSlicerManager::UpdateViews(int current,int slicer) { - double x = (mSlicers[slicer]->GetCurrentPosition()[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0]) + double p[3], pt[3]; + p[0] = mSlicers[slicer]->GetCurrentPosition()[0]; + p[1] = mSlicers[slicer]->GetCurrentPosition()[1]; + p[2] = mSlicers[slicer]->GetCurrentPosition()[2]; + mSlicers[slicer]->GetSlicingTransform()->GetInverse()->TransformPoint(p, pt); + + double x = (pt[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0]) /mSlicers[slicer]->GetInput()->GetSpacing()[0]; - double y = (mSlicers[slicer]->GetCurrentPosition()[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1]) + double y = (pt[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1]) /mSlicers[slicer]->GetInput()->GetSpacing()[1]; - double z = (mSlicers[slicer]->GetCurrentPosition()[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2]) + double z = (pt[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2]) /mSlicers[slicer]->GetInput()->GetSpacing()[2]; - if (x >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0] && - x <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1] && - y >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2] && - y <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3] && - z >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4] && - z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]) { + if (x >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0]-0.5 && + x <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1]+0.5 && + y >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2]-0.5 && + y <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3]+0.5 && + z >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4]-0.5 && + z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]+0.5) { mSlicers[slicer]->UpdateCursorPosition(); mSlicers[slicer]->SetCursorColor(10,212,255); switch (mSlicers[slicer]->GetSliceOrientation()) { case vtkImageViewer2::SLICE_ORIENTATION_XY: - if (mSlicers[slicer]->GetSlice() != (int)floor(z)) - mSlicers[slicer]->SetSlice((int)floor(z)); + if (mSlicers[slicer]->GetSlice() != (int)lrint(z)) + mSlicers[slicer]->SetSlice((int)lrint(z)); break; case vtkImageViewer2::SLICE_ORIENTATION_XZ: - if (mSlicers[slicer]->GetSlice() != (int)floor(y)) - mSlicers[slicer]->SetSlice((int)floor(y)); + if (mSlicers[slicer]->GetSlice() != (int)lrint(y)) + mSlicers[slicer]->SetSlice((int)lrint(y)); break; case vtkImageViewer2::SLICE_ORIENTATION_YZ: - if (mSlicers[slicer]->GetSlice() != (int)floor(x)) - mSlicers[slicer]->SetSlice((int)floor(x)); + if (mSlicers[slicer]->GetSlice() != (int)lrint(x)) + mSlicers[slicer]->SetSlice((int)lrint(x)); break; } mSlicers[slicer]->Render(); @@ -609,10 +616,7 @@ void vvSlicerManager::UpdateViews(int current,int slicer) && mSlicers[i]->GetRenderer()->GetDraw() && mSlicers[i]->GetRenderWindow()->GetSize()[0] > 2 && mSlicers[i]->GetRenderWindow()->GetSize()[1] > 2) { - mSlicers[i]->SetCurrentPosition(mSlicers[slicer]->GetCurrentPosition()[0], - mSlicers[slicer]->GetCurrentPosition()[1], - mSlicers[slicer]->GetCurrentPosition()[2], - mSlicers[slicer]->GetTSlice()); + mSlicers[i]->SetCurrentPosition(p[0], p[1], p[2], mSlicers[slicer]->GetTSlice()); mSlicers[i]->UpdateCursorPosition(); if (current) { //do not display corner annotation if image is the one picked mSlicers[i]->SetCurrentPosition(-VTK_DOUBLE_MAX,-VTK_DOUBLE_MAX, @@ -652,19 +656,21 @@ void vvSlicerManager::UpdateViews(int current,int slicer) //---------------------------------------------------------------------------- void vvSlicerManager::UpdateLinked(int slicer) { - double x = (mSlicers[slicer]->GetCurrentPosition()[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0]) - /mSlicers[slicer]->GetInput()->GetSpacing()[0]; - double y = (mSlicers[slicer]->GetCurrentPosition()[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1]) - /mSlicers[slicer]->GetInput()->GetSpacing()[1]; - double z = (mSlicers[slicer]->GetCurrentPosition()[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2]) - /mSlicers[slicer]->GetInput()->GetSpacing()[2]; - - if (x >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0] && - x <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1] && - y >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2] && - y <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3] && - z >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4] && - z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]) { + double p[3], pt[3]; + p[0] = mSlicers[slicer]->GetCurrentPosition()[0]; + p[1] = mSlicers[slicer]->GetCurrentPosition()[1]; + p[2] = mSlicers[slicer]->GetCurrentPosition()[2]; + mSlicers[slicer]->GetSlicingTransform()->GetInverse()->TransformPoint(p, pt); + double x = (pt[0] - mSlicers[slicer]->GetInput()->GetOrigin()[0]) / mSlicers[slicer]->GetInput()->GetSpacing()[0]; + double y = (pt[1] - mSlicers[slicer]->GetInput()->GetOrigin()[1]) / mSlicers[slicer]->GetInput()->GetSpacing()[1]; + double z = (pt[2] - mSlicers[slicer]->GetInput()->GetOrigin()[2]) / mSlicers[slicer]->GetInput()->GetSpacing()[2]; + + if (x >= mSlicers[slicer]->GetInput()->GetWholeExtent()[0]-0.5 && + x <= mSlicers[slicer]->GetInput()->GetWholeExtent()[1]+0.5 && + y >= mSlicers[slicer]->GetInput()->GetWholeExtent()[2]-0.5 && + y <= mSlicers[slicer]->GetInput()->GetWholeExtent()[3]+0.5 && + z >= mSlicers[slicer]->GetInput()->GetWholeExtent()[4]-0.5 && + z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]+0.5) { for (std::list::const_iterator i = mLinkedId.begin(); i != mLinkedId.end(); i++) { emit UpdateLinkManager(*i, slicer,mSlicers[slicer]->GetCurrentPosition()[0], mSlicers[slicer]->GetCurrentPosition()[1], @@ -682,6 +688,11 @@ void vvSlicerManager::UpdateLinkedNavigation(vvSlicer *refSlicer, bool bPropagat refCam->GetPosition(refPosition); refCam->GetFocalPoint(refFocal); + refSlicer->GetSlicingTransform()->TransformPoint(refPosition); + refSlicer->GetSlicingTransform()->TransformPoint(refFocal); + mSlicers[0]->GetSlicingTransform()->GetInverse()->TransformPoint(refPosition); + mSlicers[0]->GetSlicingTransform()->GetInverse()->TransformPoint(refFocal); + for ( unsigned int i = 0; i < mSlicers.size(); i++) { vtkCamera *camera = mSlicers[i]->GetRenderer()->GetActiveCamera(); camera->SetParallelScale(refCam->GetParallelScale()); @@ -729,10 +740,13 @@ void vvSlicerManager::UpdateLinkedNavigation(vvSlicer *refSlicer, bool bPropagat focal[2] = refFocal[2]; } } - +DD(camera->GetFocalPoint()[0] << ' ' << camera->GetFocalPoint()[1] << ' ' << camera->GetFocalPoint()[2]) camera->SetFocalPoint(focal); +DD(camera->GetFocalPoint()[0] << ' ' << camera->GetFocalPoint()[1] << ' ' << camera->GetFocalPoint()[2]) +DD(camera->GetPosition()[0] << ' ' << camera->GetPosition()[1] << ' ' << camera->GetPosition()[2]) camera->SetPosition(position); - +DD(camera->GetPosition()[0] << ' ' << camera->GetPosition()[1] << ' ' << camera->GetPosition()[2]) + //Fix for bug #243 mSlicers[i]->ForceUpdateDisplayExtent(); } @@ -1057,6 +1071,38 @@ void vvSlicerManager::UpdateSliceRange(int slicer) } //---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- +void vvSlicerManager::SetSlicingPreset(int preset) +{ + if(mSlicingPreset==preset) + return; + + vtkMatrix4x4 *mImageTransformInverse = vtkMatrix4x4::New(); + mImage->GetTransform()->GetInverse(mImageTransformInverse); + + for(int i=0; i< this->GetNumberOfSlicers(); i++){ + switch(preset) + { + case 0: // World + this->GetSlicer(i)->GetSlicingTransform()->Identity(); + break; + case 1: // Voxels + this->GetSlicer(i)->GetSlicingTransform()->SetMatrix(mImageTransformInverse); + break; + default: + mImageTransformInverse->Delete(); + return; + } + this->GetSlicer(i)->ForceUpdateDisplayExtent(); + this->GetSlicer(i)->ResetCamera(); + this->GetSlicer(i)->Render(); + } + + mImageTransformInverse->Delete(); + mSlicingPreset = preset; +} + +//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- void vvSlicerManager::SetPreset(int preset) @@ -1140,7 +1186,7 @@ void vvSlicerManager::SetLocalColorWindowing(const int slicer, const bool bCtrlK else { this->mSlicers[slicer]->GetExtremasAroundMousePointer(min, max, this->mSlicers[slicer]->GetImage()->GetVTKImages()[t], - this->mSlicers[slicer]->GetImage()->GetTransform()); + this->mSlicers[slicer]->GetConcatenatedTransform()); this->SetColorWindow(max-min); this->SetColorLevel(0.5*(min+max)); this->SetPreset(6); diff --git a/vv/vvSlicerManager.h b/vv/vvSlicerManager.h index 9858d69..b469277 100644 --- a/vv/vvSlicerManager.h +++ b/vv/vvSlicerManager.h @@ -151,6 +151,9 @@ class vvSlicerManager : public QObject { int GetPreset() { return mPreset; } + int GetSlicingPreset() { + return mSlicingPreset; + } int GetOverlayColor() const { return mOverlayColor; } @@ -203,6 +206,7 @@ class vvSlicerManager : public QObject { void UpdateSlice(int slicer); void UpdateTSlice(int slicer); void UpdateSliceRange(int slicer); + void SetSlicingPreset(int preset); vvLandmarks *GetLandmarks(); void AddLandmark(float x,float y,float z,float t); @@ -251,6 +255,7 @@ protected: bool mFusionShowLegend; int mPreset; + int mSlicingPreset; vvImageReader::LoadedImageType mType; std::string mVFComponent; std::string mOverlayComponent; diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index 1b71033..9929e9d 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -362,7 +362,12 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, zWorld = z; break; } - this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition(xWorld,yWorld,zWorld, + + double p[3]; p[0] = xWorld; p[1] = yWorld; p[2] = zWorld; + double pt[3]; + this->SM->GetSlicer(VisibleInWindow)->GetSlicingTransform()->TransformPoint(p, pt); + + this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition(pt[0],pt[1],pt[2], this->SM->GetSlicer(VisibleInWindow)->GetTSlice()); if (newLandmark) { this->SM->AddLandmark(xWorld,yWorld,zWorld, -- 2.47.1