X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=vv%2FvvMainWindow.cxx;h=1c109f02aa475eaaba2913d4dccc8d5b0384bf0c;hb=e49162511fd226bd3b5299e472dbd4db803cd01a;hp=456e9bda79a93f4687ad29f0958d5e7a61466c4e;hpb=77ed5552a569a557a4ebbda7477a8f452f7b1dcf;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 456e9bd..1c109f0 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -317,6 +317,21 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() if (!CLITK_EXPERIMENTAL) menuExperimental->menuAction()->setVisible(false); + + + QTimer * timerMemory = new QTimer(this); + //timerMemory->setInterval(5); + connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage())); + timerMemory->start(5000); +} +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +void vvMainWindow::UpdateMemoryUsage() +{ + clitk::PrintMemory(true); + ImageInfoChanged(); } //------------------------------------------------------------------------------ @@ -1076,6 +1091,9 @@ void vvMainWindow::ImageInfoChanged() infoPanel->setSpacing(GetVectorDoubleAsString(inputSpacing)); infoPanel->setNPixel(QString::number(NPixel)+" ("+inputSizeInBytes+")"); + infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" Mb"); + + landmarksPanel->SetCurrentLandmarks(mSlicerManagers[index]->GetLandmarks(), mSlicerManagers[index]->GetSlicer(0)->GetImage()->GetVTKImages().size()); landmarksPanel->SetCurrentPath(mInputPathName.toStdString()); @@ -1496,6 +1514,7 @@ void vvMainWindow::CloseImage(QTreeWidgetItem* item, int column) InitDisplay(); } } + ImageInfoChanged(); } //------------------------------------------------------------------------------ @@ -2739,6 +2758,7 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen qApp->processEvents(); // End + ImageInfoChanged(); return slicer_manager; } //------------------------------------------------------------------------------