Computer Assisted Medical Intervention Tool Kit  version 5.2
DicomParser.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2024 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef DICOMPARSER_H
27 #define DICOMPARSER_H
28 
29 class DicomSeries;
30 
31 #include <QList>
32 #include <QDate>
33 #include <QTime>
34 
43 class DicomParser {
44 public:
45 
46  DicomParser() = default;
47 
49  virtual ~DicomParser() = default;
50 
56  static QList<DicomSeries*> parseDirectory(const QString& directory);
57 
63  static double getZSpacing(const std::vector<std::string>& seriesFileNames);
64 
65 private:
71  static QList<QString> stdListOfStringToQt(const std::vector< std::string >& inputList);
72 
78  static std::vector< std::string > qtListOfStringToStd(const QList<QString>& inputList);
79 
85  static QDate getAcquisitionDate(const std::vector<std::string>& seriesFileNames);
86 
92  static QTime getAcquisitionTime(const std::vector<std::string>& seriesFileNames);
93 
99  static QString getPatientName(const std::vector<std::string>& seriesFileNames);
100 
106  static QString getSeriesName(const std::vector<std::string>& seriesFileNames);
107 
113  static QString getSeriesDescription(const std::vector<std::string>& seriesFileNames);
114 
120  static QString getStudyName(const std::vector<std::string>& seriesFileNames);
121 
122 };
123 
124 #endif // DICOMPARSER_H
125 
DicomParser allows one to parse a directory of DICOM files looking for studies and series.
Definition: DicomParser.h:43
DicomParser()=default
static QList< DicomSeries * > parseDirectory(const QString &directory)
Parse the input directory for DICOM series.
Definition: DicomParser.cpp:37
virtual ~DicomParser()=default
Default Destructor.
static double getZSpacing(const std::vector< std::string > &seriesFileNames)
Retrieve the DICOM image file Z spacing attribute (commonly known as spacing between slices)
Definition: DicomParser.cpp:220
DicomSeries is a CamiTK high level class to represent a DICOM SERIES This class encapsulates GDCM obj...
Definition: DicomSeries.h:45