CustusX  2023.01.05-dev+develop.0da12
An IGT application
cx::DICOMReader Class Reference

#include <cxDICOMReader.h>

Inheritance diagram for cx::DICOMReader:
cx::FileReaderWriterImplService cx::FileReaderWriterService

Public Member Functions

 DICOMReader (PatientModelServicePtr patientModelService)
 
virtual ~DICOMReader ()
 
bool isNull ()
 
virtual bool canRead (const QString &type, const QString &filename)
 Simple check if file is a DICOM file. DICOM files can have several different endings (. .dcm .dicom .ima), so we instead look at the characters at position 0x80. These characters should spell DICM, as specified by DICOM standard PS3.10 "Media Storage and File Format for Media Interchange". More...
 
virtual bool readInto (DataPtr data, QString path)
 
bool readInto (ImagePtr image, QString filename)
 
virtual QString canReadDataType () const
 
virtual DataPtr read (const QString &uid, const QString &filename)
 
std::vector< DataPtrread (const QString &filename)
 
void write (DataPtr data, const QString &filename)
 
QString canWriteDataType () const
 
bool canWrite (const QString &type, const QString &filename) const
 
virtual vtkImageDataPtr loadVtkImageData (QString filename)
 
- Public Member Functions inherited from cx::FileReaderWriterImplService
 FileReaderWriterImplService (QString name, QString canReadDataType, QString canWriteDataType, QString fileSuffix, PatientModelServicePtr patientModelService)
 
virtual QString getName () const
 
virtual QString getFileSuffix () const
 
virtual vtkPolyDataPtr loadVtkPolyData (QString filename)
 
- Public Member Functions inherited from cx::FileReaderWriterService
virtual ~FileReaderWriterService ()
 

Protected Member Functions

std::vector< ImagePtrimportSeries (QString fileName, bool readBestSeries)
 
QString getBestDICOMSeries (ctkDICOMDatabasePtr database)
 
QStringList getAllDICOMSeries (ctkDICOMDatabasePtr database)
 
std::vector< ImagePtrimportBestSeries (ctkDICOMDatabasePtr database)
 
std::vector< ImagePtrimportAllSeries (ctkDICOMDatabasePtr database, QProgressDialog &progress)
 
void stopDCMTKMessages ()
 
bool canReadDir (QString dirname, bool checkSubDirs)
 
bool canReadFile (QString filename)
 
void addFolderToDicomDatabase (ctkDICOMDatabasePtr database, QString folder)
 
QStringList findAllSubfoldersWithDicomFiles (QString folder, QProgressDialog &progress)
 
QStringList findAllSubDirs (QString folder)
 
- Protected Member Functions inherited from cx::FileReaderWriterImplService
bool canReadInternal (const QString &type, const QString &filename) const
 
bool canWriteInternal (const QString &type, const QString &filename) const
 
DataPtr createData (QString type, QString filename, QString name="") const
 

Additional Inherited Members

- Static Public Member Functions inherited from cx::FileReaderWriterService
static FileReaderWriterServicePtr getNullObject ()
 

Detailed Description

Definition at line 23 of file cxDICOMReader.h.

Constructor & Destructor Documentation

cx::DICOMReader::DICOMReader ( PatientModelServicePtr  patientModelService)

Definition at line 32 of file cxDICOMReader.cpp.

virtual cx::DICOMReader::~DICOMReader ( )
inlinevirtual

Definition at line 28 of file cxDICOMReader.h.

Member Function Documentation

void cx::DICOMReader::addFolderToDicomDatabase ( ctkDICOMDatabasePtr  database,
QString  folder 
)
protected

Definition at line 249 of file cxDICOMReader.cpp.

bool cx::DICOMReader::canRead ( const QString &  type,
const QString &  filename 
)
virtual

Simple check if file is a DICOM file. DICOM files can have several different endings (. .dcm .dicom .ima), so we instead look at the characters at position 0x80. These characters should spell DICM, as specified by DICOM standard PS3.10 "Media Storage and File Format for Media Interchange".

Parameters
type
filename
Returns

Implements cx::FileReaderWriterService.

Definition at line 40 of file cxDICOMReader.cpp.

QString cx::DICOMReader::canReadDataType ( ) const
virtual

Implements cx::FileReaderWriterService.

Definition at line 102 of file cxDICOMReader.cpp.

bool cx::DICOMReader::canReadDir ( QString  dirname,
bool  checkSubDirs 
)
protected

Definition at line 48 of file cxDICOMReader.cpp.

bool cx::DICOMReader::canReadFile ( QString  filename)
protected

Definition at line 66 of file cxDICOMReader.cpp.

bool cx::DICOMReader::canWrite ( const QString &  type,
const QString &  filename 
) const
virtual

Implements cx::FileReaderWriterService.

Definition at line 156 of file cxDICOMReader.cpp.

QString cx::DICOMReader::canWriteDataType ( ) const
virtual

Implements cx::FileReaderWriterService.

Definition at line 151 of file cxDICOMReader.cpp.

QStringList cx::DICOMReader::findAllSubDirs ( QString  folder)
protected

Definition at line 229 of file cxDICOMReader.cpp.

QStringList cx::DICOMReader::findAllSubfoldersWithDicomFiles ( QString  folder,
QProgressDialog &  progress 
)
protected

Definition at line 210 of file cxDICOMReader.cpp.

QStringList cx::DICOMReader::getAllDICOMSeries ( ctkDICOMDatabasePtr  database)
protected

Definition at line 316 of file cxDICOMReader.cpp.

QString cx::DICOMReader::getBestDICOMSeries ( ctkDICOMDatabasePtr  database)
protected

Definition at line 336 of file cxDICOMReader.cpp.

std::vector< ImagePtr > cx::DICOMReader::importAllSeries ( ctkDICOMDatabasePtr  database,
QProgressDialog &  progress 
)
protected

Definition at line 289 of file cxDICOMReader.cpp.

std::vector< ImagePtr > cx::DICOMReader::importBestSeries ( ctkDICOMDatabasePtr  database)
protected

Definition at line 275 of file cxDICOMReader.cpp.

std::vector< ImagePtr > cx::DICOMReader::importSeries ( QString  fileName,
bool  readBestSeries 
)
protected

Definition at line 163 of file cxDICOMReader.cpp.

bool cx::DICOMReader::isNull ( )
inlinevirtual

Implements cx::FileReaderWriterService.

Definition at line 30 of file cxDICOMReader.h.

vtkImageDataPtr cx::DICOMReader::loadVtkImageData ( QString  filename)
virtual

Reimplemented from cx::FileReaderWriterImplService.

Definition at line 144 of file cxDICOMReader.cpp.

DataPtr cx::DICOMReader::read ( const QString &  uid,
const QString &  filename 
)
virtual

Implements cx::FileReaderWriterService.

Definition at line 123 of file cxDICOMReader.cpp.

std::vector< DataPtr > cx::DICOMReader::read ( const QString &  filename)
virtual

Implements cx::FileReaderWriterService.

Definition at line 132 of file cxDICOMReader.cpp.

bool cx::DICOMReader::readInto ( DataPtr  data,
QString  path 
)
virtual

Implements cx::FileReaderWriterService.

Definition at line 107 of file cxDICOMReader.cpp.

bool cx::DICOMReader::readInto ( ImagePtr  image,
QString  filename 
)

Definition at line 112 of file cxDICOMReader.cpp.

void cx::DICOMReader::stopDCMTKMessages ( )
protected

Definition at line 257 of file cxDICOMReader.cpp.

void cx::DICOMReader::write ( DataPtr  data,
const QString &  filename 
)
inlinevirtual

Implements cx::FileReaderWriterService.

Definition at line 49 of file cxDICOMReader.h.


The documentation for this class was generated from the following files: