Computer Assited Medical Intervention Tool Kit  version 4.0
DicomItkComponentExtension.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2016 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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 DICOMITKCOMPONENTEXTENSION_H
27 #define DICOMITKCOMPONENTEXTENSION_H
28 
29 #include <map>
30 #include <QObject>
31 #include <QCheckBox>
32 #include <itkGDCMSeriesFileNames.h>
33 
35 
36 
37 typedef itk::GDCMSeriesFileNames NamesGeneratorType;
38 
39 typedef std::vector<std::string> FileNamesContainerType;
40 
41 typedef struct {
43  QString modality;
45  QString protocolName;
50 
53  QString rows;
54  QString columns;
55  QString slices;
57 
70  QString bitsAllocated;
72  QString highBit;
73 
75  QCheckBox * openIt;
77  QCheckBox * desInterlace;
78 
80 
81 typedef struct {
82  bool operator()(const SomeDicomInfo i1, const SomeDicomInfo i2) const {
83  int nb1 = i1.numberOfTemporalPositions.toInt();
84  int nb2 = i2.numberOfTemporalPositions.toInt();
85 
86  return nb1 < nb2;
87  }
88 
89 } CompareInfo;
90 
97  Q_OBJECT
99 
100 public:
103 
105  virtual QString getName() const;
106 
108  virtual QString getDescription() const;
109 
111  virtual QStringList getFileExtensions() const;
112 
114  virtual bool hasDataDirectory() const;
115 
117  virtual camitk::Component * open(const QString &) throw (camitk::AbortException);
118 
119 protected:
122 
124  bool findAllDicomSeries(const QString &);
125 
128 
129 
135  std::map<SomeDicomInfo *, FileNamesContainerType> theSeries;
136 
137 };
138 
139 #endif // DICOMITKCOMPONENTEXTENSION_H
QCheckBox * openIt
Check box to ask the user wether he/she wants to open this series or not.
Definition: DicomItkComponentExtension.h:75
ImageComponentExtension()
Constructor protected because the class is virtual.
Definition: ImageComponentExtension.cpp:36
QString seriesDescription
Description of the series given by clinician.
Definition: DicomItkComponentExtension.h:47
Q_INTERFACES(camitk::ComponentExtension)
bool findAllDicomSeries(const QString &)
Explores the dicom directory to find all dicom volumes and needed info.
Definition: DicomItkComponentExtension.cpp:144
QString rows
Definition: DicomItkComponentExtension.h:53
Exception class to handle abortion in component instanciation.
Definition: AbortException.h:43
virtual camitk::Component * open(const QString &)
get a new instance from data stored in a file (this is the most important method to redefine in your ...
Definition: DicomItkComponentExtension.cpp:90
QString highBit
Big and Little endian information.
Definition: DicomItkComponentExtension.h:72
This class describes what is a generic Component extension.
Definition: ComponentExtension.h:63
virtual QString getDescription() const
get the plugin description (can be html)
Definition: DicomItkComponentExtension.cpp:77
virtual bool hasDataDirectory() const
this method returns true as DICOM do not use file extension but directory
Definition: DicomItkComponentExtension.cpp:82
bool chooseDicomSeriesIds()
Shows a dialog to the user to choose which volume should be read.
Definition: DicomItkComponentExtension.cpp:244
virtual QStringList getFileExtensions() const
get the list of managed extensions (each file with an extension in the list can be loaded by this Ext...
Definition: DicomItkComponentExtension.cpp:342
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:299
QString protocolName
How was the volume acquired.
Definition: DicomItkComponentExtension.h:45
This allows you to manipulate a limited number of dicom images.
Definition: DicomItkComponentExtension.h:96
QString bitsAllocated
Used to know if we open char, short or int.
Definition: DicomItkComponentExtension.h:70
bool operator()(const SomeDicomInfo i1, const SomeDicomInfo i2) const
Definition: DicomItkComponentExtension.h:82
virtual ~DicomItkComponentExtension()
the destructor
Definition: DicomItkComponentExtension.h:121
QString numberOfTemporalPositions
In case of temporal series, the volume are stored interlaced The temporal series volume are stored in...
Definition: DicomItkComponentExtension.h:68
QCheckBox * desInterlace
Check box to ask the user if he wants the temporal series volume de-interlaced or not...
Definition: DicomItkComponentExtension.h:77
Abstract class created to support export file formats for ImageComponent Any data component plugin cr...
Definition: ImageComponentExtension.h:52
std::vector< std::string > FileNamesContainerType
Definition: DicomItkComponentExtension.h:39
std::map< SomeDicomInfo *, FileNamesContainerType > theSeries
Map storing series For each series, it contains:
Definition: DicomItkComponentExtension.h:135
QString modality
Modality (generally MR or CT)
Definition: DicomItkComponentExtension.h:43
Definition: DicomItkComponentExtension.h:41
itk::GDCMSeriesFileNames NamesGeneratorType
Definition: DicomItkComponentExtension.h:37
Definition: DicomItkComponentExtension.h:81
QString studyDescription
Description of the exam given by clinician.
Definition: DicomItkComponentExtension.h:49
virtual QString getName() const
get the plugin name
Definition: DicomItkComponentExtension.cpp:72
DicomItkComponentExtension()
the constructor (do nothicamitk::ng really)
Definition: DicomItkComponentExtension.h:102
QString columns
Definition: DicomItkComponentExtension.h:54
QString slices
Definition: DicomItkComponentExtension.h:55