Fraxinus  22.04-rc5
An IGT application
cxFileReaderWriterServiceProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXFILEREADERWRITERSERVICEPROXY_H
13 #define CXFILEREADERWRITERSERVICEPROXY_H
14 
15 #include "cxResourceExport.h"
17 class ctkPluginContext;
18 
19 namespace cx
20 {
21 
22 class cxResource_EXPORT FileReaderWriterServiceProxy : public FileReaderWriterService
23 {
24  Q_OBJECT
25 public:
26  static FileReaderWriterServicePtr create(ctkPluginContext *context);
27 
28  FileReaderWriterServiceProxy(ctkPluginContext *context);
30 
31  virtual bool isNull();
32 
33  QString getName() const;
34  QString getFileSuffix() const;
35 
36  bool canRead(const QString &type, const QString &filename);
37  std::vector<DataPtr> read(const QString &filename);
38  DataPtr read(const QString &uid, const QString &filename);
39  QString canReadDataType() const;
40  bool readInto(DataPtr data, QString path);
41 
42  QString canWriteDataType() const;
43  bool canWrite(const QString &type, const QString &filename) const;
44  void write(DataPtr data, const QString &filename);
45 
46  vtkImageDataPtr loadVtkImageData(QString filename);
47  vtkPolyDataPtr loadVtkPolyData(QString filename);
48 
49 private:
50  ctkPluginContext *mPluginContext;
52 };
53 }
54 
55 #endif // CXFILEREADERWRITERSERVICEPROXY_H
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class FileReaderWriterService > FileReaderWriterServicePtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.