]> Creatis software - clitk.git/blob - vv/vvQDicomSeriesSelector.h
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvQDicomSeriesSelector.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://www.centreleonberard.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef VVDICOMSERIESSELECTOR_H
19 #define VVDICOMSERIESSELECTOR_H
20 #include "ui_vvDicomSeriesSelector.h"
21 #include "clitkCommon.h"
22 #include "vvQProgressDialogITKCommand.h"
23
24 namespace gdcm {class File;}
25
26 // qt include
27 #include <QSplitter>
28 #include <QFileDialog>
29
30 class vvDicomSeriesSelector : public QDialog {
31     Q_OBJECT
32
33 public:
34     vvDicomSeriesSelector(QWidget * parent=0);
35     virtual void show();
36     virtual void close();
37     std::vector<std::string> * GetFilenames() {
38         return mFilenames;
39     }
40     bool IsPatientCoordianteSystemChecked() { return mPatientCoordinateSystem; }
41
42 protected slots:
43     void BrowseButtonRelease();
44     void SearchButtonRelease();
45     void itemSelectionChanged();
46     void itemDetailsSelectionChanged();
47     void itemMatrixSelectionChanged(int state);
48
49 protected:
50     QString mPreviousPath;
51     QString mFoldername;
52     void AddSerieToTheTable(int i, std::vector<std::string> & filenames);
53 #if GDCM_MAJOR_VERSION >= 2
54     QString MakeDicomInfo(std::string & s, const gdcm::Reader& header);
55 #else
56     QString MakeDicomInfo(std::string & s, gdcm::File *header);
57 #endif
58     QString AddInfo(const gdcm::File *header, QString n, unsigned short group, unsigned short elem);
59     QString AddInfo(std::string n, std::string m);
60
61 private:
62     Ui::vvDicomSeriesSelector ui;
63     std::string mCurrentSerie;
64     std::map<std::string, std::vector<std::string>* > mListOfSeriesFilenames;
65     std::vector<std::string> * mFilenames;
66     std::map<std::string, QString> mDicomInfo;
67 #if GDCM_MAJOR_VERSION >= 2
68     std::map<std::string, gdcm::Reader> mDicomHeader;
69 #else
70     std::map<std::string, gdcm::File*> mDicomHeader;
71 #endif
72     std::map<std::string, std::string> mDicomDetails;
73     bool mPatientCoordinateSystem;
74 };
75
76 #endif // VVDICOMSERIESSELECTOR_H