NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkLookupTableSaxHandler.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkLookupTableSaxHandler_h
16 #define niftkLookupTableSaxHandler_h
17 
18 #include <niftkCoreExports.h>
19 
20 #include <vector>
21 
22 #include <QColor>
23 #include <QString>
24 #include <QXmlDefaultHandler>
25 
26 class vtkLookupTable;
27 
28 namespace niftk
29 {
30 
31 class LookupTableContainer;
32 
45 class NIFTKCORE_EXPORT LookupTableSaxHandler : public QXmlDefaultHandler
46 {
47 
48 public:
49 
52 
54  LookupTableContainer* GetLookupTableContainer();
55 
57  bool startElement(const QString& namespaceURI,
58  const QString& localName,
59  const QString& qName,
60  const QXmlAttributes& attributes) override;
61 
63  bool endElement(const QString& namespaceURI,
64  const QString& localName,
65  const QString& qName) override;
66 
68  bool characters(const QString& str) override;
69 
71  bool fatalError(const QXmlParseException& exception) override;
72 
73 private:
74 
76  bool m_IsPreMultiplied;
77 
79  int m_Order;
80 
82  bool m_IsScaled;
83 
85  QString m_DisplayName;
86 
88  std::vector<QColor> m_List;
89 
90 };
91 
92 }
93 
94 #endif
Class to contain a vtkLookupTable and to store meta-data attributes like display name, which order to display it in in GUI, etc.
Definition: niftkLookupTableContainer.h:34
SAX handler to load lookup tables into LookupTableContainer objects.
Definition: niftkLookupTableSaxHandler.h:45
Definition: niftkExceptionObject.h:21