Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DicomComponentExtension.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, 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 DICOM_COMPONENT_EXTENSION_H
27 #define DICOM_COMPONENT_EXTENSION_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 
98  Q_OBJECT
100 
101 public:
104 
106  virtual QString getName() const;
107 
109  virtual QString getDescription() const;
110 
112  virtual QStringList getFileExtensions() const;
113 
115  virtual bool hasDataDirectory() const;
116 
118  virtual camitk::Component * open(const QString &) throw (camitk::AbortException);
119 
120 protected:
122  virtual ~DicomComponentExtension() {};
123 
125  bool findAllDicomSeries(const QString &);
126 
128  bool chooseDicomSeriesIds() throw (camitk::AbortException);
129 
130 
137 
138 };
139 
140 #endif // DICOM_COMPONENT_EXTENSION_H
QCheckBox * openIt
Check box to ask the user wether he/she wants to open this series or not.
Definition: DicomComponentExtension.h:75
ImageComponentExtension()
Constructor protected because the class is virtual.
virtual QString getDescription() const
get the plugin description (can be html)
std::map< SomeDicomInfo *, FileNamesContainerType > theSeries
Map storing series For each series, it contains:
Definition: DicomComponentExtension.h:136
QString seriesDescription
Description of the series given by clinician.
Definition: DicomComponentExtension.h:47
QString rows
Definition: DicomComponentExtension.h:53
This allows you to manipulate a limited number of dicom images.
Definition: DicomComponentExtension.h:97
bool chooseDicomSeriesIds()
Shows a dialog to the user to choose which volume should be read.
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 ...
QString highBit
Big and Little endian information.
Definition: DicomComponentExtension.h:72
bool operator()(const SomeDicomInfo i1, const SomeDicomInfo i2) const
Definition: DicomComponentExtension.h:82
std::vector< std::string > FileNamesContainerType
Definition: DicomComponentExtension.h:39
This class describes what is a generic Component extension.
Definition: ComponentExtension.h:63
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:292
QString protocolName
How was the volume acquired.
Definition: DicomComponentExtension.h:45
QString bitsAllocated
Used to know if we open char, short or int.
Definition: DicomComponentExtension.h:70
QString numberOfTemporalPositions
In case of temporal series, the volume are stored interlaced The temporal series volume are stored in...
Definition: DicomComponentExtension.h:68
QCheckBox * desInterlace
Check box to ask the user if he wants the temporal series volume de-interlaced or not...
Definition: DicomComponentExtension.h:77
Abstract class created to support export file formats for ImageComponent Any data component plugin cr...
Definition: ImageComponentExtension.h:53
virtual QString getName() const
get the plugin name
QString modality
Modality (generally MR or CT)
Definition: DicomComponentExtension.h:43
Definition: DicomComponentExtension.h:41
Definition: DicomComponentExtension.h:81
virtual QStringList getFileExtensions() const
get the list of managed extensions (each file with an extension in the list can be loaded by this Ext...
DicomComponentExtension()
the constructor (do nothicamitk::ng really)
Definition: DicomComponentExtension.h:103
QString studyDescription
Description of the exam given by clinician.
Definition: DicomComponentExtension.h:49
virtual bool hasDataDirectory() const
this method returns true as DICOM do not use file extension but directory
itk::GDCMSeriesFileNames NamesGeneratorType
Definition: DicomComponentExtension.h:37
Q_INTERFACES(camitk::ComponentExtension)
bool findAllDicomSeries(const QString &)
Explores the dicom directory to find all dicom volumes and needed info.
QString columns
Definition: DicomComponentExtension.h:54
QString slices
Definition: DicomComponentExtension.h:55