connect(colorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateColorMap()));
connect(presetComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateWindowLevel()));
connect(inverseButton,SIGNAL(clicked()),this,SLOT(SwitchWindowLevel()));
+ connect(applyWindowLevelToAllButton,SIGNAL(clicked()),this,SLOT(ApplyWindowLevelToAllImages()));
connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(ShowContextMenu(QPoint)));
if (!CLITK_EXPERIMENTAL)
menuExperimental->menuAction()->setVisible(false);
+
+
+ QTimer * timerMemory = new QTimer(this);
+ //timerMemory->setInterval(5);
+ connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage()));
+ timerMemory->start(2000);
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvMainWindow::UpdateMemoryUsage()
+{
+ // clitk::PrintMemory(true);
+ infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MiB");
}
//------------------------------------------------------------------------------
InitDisplay();
}
}
+ ImageInfoChanged();
}
//------------------------------------------------------------------------------
}
//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void vvMainWindow::ApplyWindowLevelToAllImages()
+{
+ for (unsigned int i = 0; i < mSlicerManagers.size(); i++) {
+ if (mSlicerManagers[i] == NULL)
+ continue;
+ mSlicerManagers[i]->SetColorWindow(windowSpinBox->value());
+ mSlicerManagers[i]->SetColorLevel(levelSpinBox->value());
+ mSlicerManagers[i]->SetPreset(6);
+ mSlicerManagers[i]->Render();
+ }
+}
+//------------------------------------------------------------------------------
+
//------------------------------------------------------------------------------
void vvMainWindow::UpdateLinkManager(std::string id, int slicer, double x, double y, double z, int temps)
{
qApp->processEvents();
// End
+ ImageInfoChanged();
return slicer_manager;
}
//------------------------------------------------------------------------------