NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxPNGImageReader.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 CXPNGIMAGEREADER_H
13 #define CXPNGIMAGEREADER_H
14 
16 #include "org_custusx_core_filemanager_Export.h"
17 
18 namespace cx {
19 
23 class org_custusx_core_filemanager_EXPORT PNGImageReader: public FileReaderWriterImplService
24 {
25 public:
26  Q_INTERFACES(cx::FileReaderWriterService)
27 
28  PNGImageReader(PatientModelServicePtr patientModelService);
29  virtual ~PNGImageReader() {}
30 
31  bool isNull(){return false;}
32 
33  virtual bool canRead(const QString& type, const QString& filename);
34  virtual bool readInto(DataPtr data, QString path);
35  bool readInto(ImagePtr image, QString filename);
36  virtual QString canReadDataType() const;
37  virtual DataPtr read(const QString& uid, const QString& filename);
38  std::vector<DataPtr> read(const QString &filename);
39 
40  void write(DataPtr data, const QString &filename) {};
41  QString canWriteDataType() const;
42  bool canWrite(const QString &type, const QString &filename) const;
43 
44  virtual vtkImageDataPtr loadVtkImageData(QString filename);
45 };
46 
47 }
48 
49 #endif // CXPNGIMAGEREADER_H
cx::PNGImageReader::write
void write(DataPtr data, const QString &filename)
Definition: cxPNGImageReader.h:40
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::PNGImageReader::isNull
bool isNull()
Definition: cxPNGImageReader.h:31
cxFileReaderWriterService.h
cx::PNGImageReader
Reader for portable network graphics .png files.
Definition: cxPNGImageReader.h:23
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::ImagePtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
cx::FileReaderWriterImplService
Definition: cxFileReaderWriterService.h:71
cx::FileReaderWriterService
Definition: cxFileReaderWriterService.h:30
cx::PNGImageReader::~PNGImageReader
virtual ~PNGImageReader()
Definition: cxPNGImageReader.h:29