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());
+ item->setToolTip(COLUMN_IMAGE_NAME, imageManager->GetListOfAbsoluteFilePathInOneString("image").c_str());
qApp->processEvents();
//Create the buttons for reload and close
item->setData(1,Qt::UserRole,tr("overlay"));
QFileInfo fileinfo(file); //Do not show the path
item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
- item->setToolTip(COLUMN_IMAGE_NAME,fileinfo.absoluteFilePath());
+ item->setToolTip(COLUMN_IMAGE_NAME, mSlicerManagers[index]->GetListOfAbsoluteFilePathInOneString("overlay").c_str());
qApp->processEvents();
for (int j = 1; j <= 4; j++) {
item->setData(1,Qt::UserRole,tr("fusion"));
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());
+ item->setToolTip(COLUMN_IMAGE_NAME, mSlicerManagers[index]->GetListOfAbsoluteFilePathInOneString("fusion").c_str());
qApp->processEvents();
for (int j = 1; j <= 4; j++) {
item->setData(1,Qt::UserRole,tr("vector"));
QFileInfo fileinfo(filename); //Do not show the path
item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
- item->setToolTip(COLUMN_IMAGE_NAME,fileinfo.absoluteFilePath());
+ item->setToolTip(COLUMN_IMAGE_NAME, mSlicerManagers[index]->GetListOfAbsoluteFilePathInOneString("vector").c_str());
qApp->processEvents();
for (int j = 1; j <= 4; j++) {
#include <vtksys/SystemTools.hxx>
#include <vtkCamera.h>
+#include <qfileinfo.h>
+
//----------------------------------------------------------------------------
vvSlicerManager::vvSlicerManager(int numberOfSlicers)
{
}
//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+std::string vvSlicerManager::GetListOfAbsoluteFilePathInOneString(const std::string &actorType)
+{
+ vvImageReader *reader = NULL;
+
+ if(actorType=="image")
+ reader = mReader;
+ else if(actorType=="overlay")
+ reader = mOverlayReader;
+ else if(actorType=="fusion")
+ reader = mFusionReader;
+ else if(actorType=="vector")
+ reader = mVectorReader;
+
+ if(!reader)
+ return "";
+
+ std::string list;
+ for(unsigned int i=0; i<reader->GetInputFilenames().size(); i++){
+ QFileInfo fileinfo(reader->GetInputFilenames()[i].c_str()); //Do not show the path
+ if(i)
+ list += '\n';
+ list += fileinfo.absoluteFilePath().toStdString();
+ }
+ return list;
+}
+//----------------------------------------------------------------------------
+
//----------------------------------------------------------------------------
bool vvSlicerManager::SetImage(std::string filename, vvImageReader::LoadedImageType type, int n, unsigned int slice)