Computer Assited Medical Intervention Tool Kit  version 5.0
DicomParser Class Reference

DicomParser allows one to parse a directory of DICOM files looking for studies and series. More...

#include <DicomParser.h>

+ Collaboration diagram for DicomParser:

Public Member Functions

 DicomParser ()=default
 
virtual ~DicomParser ()=default
 Default Destructor. More...
 

Static Public Member Functions

static double getZSpacing (const std::vector< std::string > &seriesFileNames)
 Retrieve the DICOM image file Z spacing attribute (commonly known as spacing between slices) More...
 
static QList< DicomSeries * > parseDirectory (const QString &directory)
 Parse the input directory for DICOM series. More...
 

Static Private Member Functions

static QDate getAcquisitionDate (const std::vector< std::string > &seriesFileNames)
 Retrieve the SERIES acquisition date. More...
 
static QTime getAcquisitionTime (const std::vector< std::string > &seriesFileNames)
 Retrieve the SERIES acquisition time. More...
 
static QString getPatientName (const std::vector< std::string > &seriesFileNames)
 Retrieve the patient name information from the input files. More...
 
static QString getSeriesDescription (const std::vector< std::string > &seriesFileNames)
 Retrieve the series description. More...
 
static QString getSeriesName (const std::vector< std::string > &seriesFileNames)
 Retrieve the series name. More...
 
static QString getStudyName (const std::vector< std::string > &seriesFileNames)
 Retrieve the study name. More...
 
static std::vector< std::string > qtListOfStringToStd (const QList< QString > &inputList)
 Convert a QList of QString into a std list of string. More...
 
static QList< QString > stdListOfStringToQt (const std::vector< std::string > &inputList)
 Convert a simple std list of string into a QList of QString. More...
 

Detailed Description

DicomParser allows one to parse a directory of DICOM files looking for studies and series.

Note
This class is part of the model (in the MVP pattern) of the DICOM COMPONENT

Constructor & Destructor Documentation

◆ DicomParser()

DicomParser::DicomParser ( )
default

◆ ~DicomParser()

virtual DicomParser::~DicomParser ( )
virtualdefault

Default Destructor.

Member Function Documentation

◆ getAcquisitionDate()

QDate DicomParser::getAcquisitionDate ( const std::vector< std::string > &  seriesFileNames)
staticprivate

Retrieve the SERIES acquisition date.

Parameters
seriesFileNamesThe filenames belonging to a single series.
Returns
the acquisition date of this SERIES.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

◆ getAcquisitionTime()

QTime DicomParser::getAcquisitionTime ( const std::vector< std::string > &  seriesFileNames)
staticprivate

Retrieve the SERIES acquisition time.

Parameters
seriesFileNamesThe filenames belonging to a single series.
Returns
the acquisition time of this SERIES.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

◆ getPatientName()

QString DicomParser::getPatientName ( const std::vector< std::string > &  seriesFileNames)
staticprivate

Retrieve the patient name information from the input files.

Parameters
seriesFileNamesThe filenames belonging to a single series.
Returns
the patient name.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

◆ getSeriesDescription()

QString DicomParser::getSeriesDescription ( const std::vector< std::string > &  seriesFileNames)
staticprivate

Retrieve the series description.

Parameters
seriesFileNamesThe filenames belonging to a single series.
Returns
the series description.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

◆ getSeriesName()

QString DicomParser::getSeriesName ( const std::vector< std::string > &  seriesFileNames)
staticprivate

Retrieve the series name.

Parameters
seriesFileNamesThe filenames belonging to a single series.
Returns
the series name.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

◆ getStudyName()

QString DicomParser::getStudyName ( const std::vector< std::string > &  seriesFileNames)
staticprivate

Retrieve the study name.

Parameters
seriesFileNamesThe filenames belonging to a single series.
Returns
the study name.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

◆ getZSpacing()

double DicomParser::getZSpacing ( const std::vector< std::string > &  seriesFileNames)
static

Retrieve the DICOM image file Z spacing attribute (commonly known as spacing between slices)

Parameters
seriesFileNamesthe input DICOM image images to retrieve the Z spacing attribute from.
Returns
the Z spacing value.

References CAMITK_ERROR_ALT.

Referenced by DicomComponent::DicomComponent().

+ Here is the caller graph for this function:

◆ parseDirectory()

QList< DicomSeries * > DicomParser::parseDirectory ( const QString &  directory)
static

Parse the input directory for DICOM series.

Parameters
directoryThe input directory to parse DICOM image files.
Returns
A list of DicomSeries, high level CamiTK object which store information of a SERIES

DEBUG

References CAMITK_TRACE_ALT, getAcquisitionDate(), getAcquisitionTime(), getPatientName(), getSeriesDescription(), getSeriesName(), getStudyName(), DicomSeries::setAcquisitionDate(), DicomSeries::setAcquisitionTime(), DicomSeries::setFileNames(), DicomSeries::setPatientName(), DicomSeries::setSeriesDescription(), DicomSeries::setSeriesName(), DicomSeries::setStdFileNames(), DicomSeries::setStudyName(), and stdListOfStringToQt().

Referenced by DicomComponentExtension::open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qtListOfStringToStd()

std::vector< std::string > DicomParser::qtListOfStringToStd ( const QList< QString > &  inputList)
staticprivate

Convert a QList of QString into a std list of string.

Parameters
inputListQList of QString to convert.
Returns
std list of string version of the input Qt list.

◆ stdListOfStringToQt()

QList< QString > DicomParser::stdListOfStringToQt ( const std::vector< std::string > &  inputList)
staticprivate

Convert a simple std list of string into a QList of QString.

Parameters
inputListstd list of string to convert.
Returns
QList of QString version of the input std list.

Referenced by parseDirectory().

+ Here is the caller graph for this function:

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