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");
}
//------------------------------------------------------------------------------
item->setData(0,Qt::UserRole,files[i].c_str());
QFileInfo fileinfo(imageManager->GetFileName().c_str()); //Do not show the path
item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
+ item->setToolTip(COLUMN_IMAGE_NAME,fileinfo.absoluteFilePath());
qApp->processEvents();
//Create the buttons for reload and close
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)
{
QTreeWidgetItem *item = new QTreeWidgetItem();
item->setData(0,Qt::UserRole,file.toStdString().c_str());
item->setData(1,Qt::UserRole,tr("overlay"));
- item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,filename.c_str());
+ QFileInfo fileinfo(file); //Do not show the path
+ item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
+ item->setToolTip(COLUMN_IMAGE_NAME,fileinfo.absoluteFilePath());
qApp->processEvents();
for (int j = 1; j <= 4; j++) {
QTreeWidgetItem *item = new QTreeWidgetItem();
item->setData(0,Qt::UserRole,file.toStdString().c_str());
item->setData(1,Qt::UserRole,tr("fusion"));
- item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,filename.c_str());
+ QFileInfo fileinfo(filename.c_str()); //Do not show the path
+ item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
+ item->setToolTip(COLUMN_IMAGE_NAME,fileinfo.absoluteFilePath());
qApp->processEvents();
for (int j = 1; j <= 4; j++) {
QTreeWidgetItem *item = new QTreeWidgetItem();
item->setData(0,Qt::UserRole,filename.toStdString().c_str());
item->setData(1,Qt::UserRole,tr("vector"));
- item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,filename);
+ QFileInfo fileinfo(filename); //Do not show the path
+ item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
+ item->setToolTip(COLUMN_IMAGE_NAME,fileinfo.absoluteFilePath());
qApp->processEvents();
for (int j = 1; j <= 4; j++) {
qApp->processEvents();
// End
+ ImageInfoChanged();
return slicer_manager;
}
//------------------------------------------------------------------------------