#define clitkDD_h
#include <iostream>
-
+#ifdef WIN32
+# include <windows.h>
+#endif
// David's debug
-#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush();
+#ifdef WIN32
+# define DD(a) { \
+ std::ostringstream ossDD; \
+ ossDD << #a " = [ " << a << " ]" << std::endl; \
+ OutputDebugString(ossDD.str().c_str()); \
+ }
+#else
+# define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush();
+#endif
#define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_<n; _i_++) { std::cout << a[_i_] << " "; }; std::cout << " ]" << std::endl;std::cout.flush();}
template<class T>
void _print_container(T const& a)
typedef itk::SmartPointer<Self> Pointer;
itkNewMacro(Self);
+ const std::vector<std::string>& GetInputFilenames(){return mInputFilenames;}
+
void SetInputFilename(const std::string & filename);
void SetInputFilenames(const std::vector<std::string> & filenames);
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)
std::string GetVFName() { return mVFName; }
std::string GetOverlayName() { return mOverlayName; }
std::string GetFusionName() { return mFusionName; }
+ std::string GetListOfAbsoluteFilePathInOneString(const std::string &actorType);
///Switch between nearest neighbor and linear interpolation
void ToggleInterpolation();
#include <QMenu>
//------------------------------------------------------------------------------
-vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false)
+vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false), mAction(NULL)
{
mUseContextMenu = false;
mToolName = name;