CustusX  22.04-rc5
An IGT application
cxDICOMReader.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 CXDICOMREADER_H
13 #define CXDICOMREADER_H
14 
16 #include "org_custusx_core_filemanager_Export.h"
17 
18 typedef QSharedPointer<class ctkDICOMDatabase> ctkDICOMDatabasePtr;
19 
20 namespace cx {
21 
22 class org_custusx_core_filemanager_EXPORT DICOMReader : public FileReaderWriterImplService
23 {
24 public:
25  Q_INTERFACES(cx::FileReaderWriterService)
26  DICOMReader(PatientModelServicePtr patientModelService);
27  virtual ~DICOMReader() {}
28 
29  bool isNull(){return false;}
30 
41  virtual bool canRead(const QString& type, const QString& filename);
42  virtual bool readInto(DataPtr data, QString path);
43  bool readInto(ImagePtr image, QString filename);
44  virtual QString canReadDataType() const;
45  virtual DataPtr read(const QString& uid, const QString& filename);
46  std::vector<DataPtr> read(const QString &filename);
47 
48  void write(DataPtr data, const QString &filename) {}
49  QString canWriteDataType() const;
50  bool canWrite(const QString &type, const QString &filename) const;
51 
52  virtual vtkImageDataPtr loadVtkImageData(QString filename);
53 
54 protected:
55  ImagePtr importSeries(QString fileName);
56  QString getBestDICOMSeries(ctkDICOMDatabasePtr database);
57 };
58 
59 } //cx
60 #endif // CXDICOMREADER_H
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
void write(DataPtr data, const QString &filename)
Definition: cxDICOMReader.h:48
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
QSharedPointer< class ctkDICOMDatabase > ctkDICOMDatabasePtr
Definition: cxDICOMReader.h:18
virtual ~DICOMReader()
Definition: cxDICOMReader.h:27
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.