CustusX  22.04-rc5
An IGT application
cxFileReaderWriterServiceProxy.cpp
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 
13 #include "boost/bind.hpp"
14 #include "cxNullDeleter.h"
15 
16 namespace cx {
17 
19 {
21 }
22 
24  mPluginContext(context),
26 {
27 }
28 
30 {
31  return mService->isNull();
32 }
33 
34 bool FileReaderWriterServiceProxy::canRead(const QString &type, const QString &filename)
35 {
36  return mService->canRead(type, filename);
37 }
38 
39 std::vector<DataPtr> FileReaderWriterServiceProxy::read(const QString &filename)
40 {
41  return mService->read(filename);
42 }
43 
44 DataPtr FileReaderWriterServiceProxy::read(const QString &uid, const QString &filename)
45 {
46  return mService->read(uid, filename);
47 }
48 
50 {
51  return mService->canReadDataType();
52 }
53 
55 {
56  return mService->readInto(data, path);
57 }
58 
59 void FileReaderWriterServiceProxy::write(DataPtr data, const QString &filename)
60 {
61  mService->write(data, filename);
62 }
63 
64 
65 } //cx
66 
67 
69 {
70  return mService->canReadDataType();
71 }
72 
73 bool cx::FileReaderWriterServiceProxy::canWrite(const QString &type, const QString &filename) const
74 {
75  return mService->canWrite(type, filename);
76 }
77 
79 {
80  return mService->getName();
81 }
82 
84 {
85  return mService->getFileSuffix();
86 }
87 
89 {
90  return mService->loadVtkImageData(filename);
91 }
92 
94 {
95  return mService->loadVtkPolyData(filename);
96 }
static FileReaderWriterServicePtr getNullObject()
void write(DataPtr data, const QString &filename)
std::vector< DataPtr > read(const QString &filename)
vtkImageDataPtr loadVtkImageData(QString filename)
vtkPolyDataPtr loadVtkPolyData(QString filename)
FileReaderWriterServiceProxy(ctkPluginContext *context)
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class FileReaderWriterService > FileReaderWriterServicePtr
bool readInto(DataPtr data, QString path)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
static FileReaderWriterServicePtr create(ctkPluginContext *context)
bool canWrite(const QString &type, const QString &filename) const
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
bool canRead(const QString &type, const QString &filename)
Namespace for all CustusX production code.