13 #include "boost/bind.hpp" 25 mPluginContext(context),
28 this->initServiceListener();
37 return mService->isNull();
42 return mService->canLoad(type, filename);
47 return mService->load(uid, filename);
52 return mService->canLoadDataType();
57 return mService->read(filename);
62 return mService->readInto(data, path);
67 return mService->findDataTypeFromFile(filename);
70 void FileManagerServiceProxy::initServiceListener()
74 boost::bind(&FileManagerServiceProxy::onServiceAdded,
this, _1),
76 boost::bind(&FileManagerServiceProxy::onServiceRemoved,
this, _1)
78 mServiceListener->open();
96 return mService->loadVtkImageData(filename);
101 return mService->loadVtkPolyData(filename);
106 mService->save(data, filename);
111 mService->addFileReaderWriter(service);
116 mService->removeFileReaderWriter(service);
121 return mService->getExportersForDataType(dataType);
126 return mService->getImportersForDataType(dataType);
131 return mService->getFileReaderName(filename);
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
void removeFileReaderWriter(FileReaderWriterService *service)
virtual ~FileManagerServiceProxy()
QString canLoadDataType() const
vtkPolyDataPtr loadVtkPolyData(QString filename)
std::vector< DataPtr > read(const QString &filename)
FileManagerServiceProxy(ctkPluginContext *context)
static FileManagerServicePtr getNullObject()
std::vector< FileReaderWriterServicePtr > getImportersForDataType(QString dataType)
boost::shared_ptr< class Data > DataPtr
QString getFileReaderName(const QString &filename)
static FileManagerServicePtr create(ctkPluginContext *context)
vtkImageDataPtr loadVtkImageData(QString filename)
QString findDataTypeFromFile(QString filename)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Helper class for listening to services being added, modified and removed.
DataPtr load(const QString &uid, const QString &filename)
std::vector< FileReaderWriterServicePtr > getExportersForDataType(QString dataType)
bool readInto(DataPtr data, QString path)
void addFileReaderWriter(FileReaderWriterService *service)
void save(DataPtr data, const QString &filename)
bool canLoad(const QString &type, const QString &filename)
Namespace for all CustusX production code.