NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkLabelMapReader.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 niftkLabelMapReader_h
16 #define niftkLabelMapReader_h
17 
18 
19 #include <mitkAbstractFileReader.h>
21 #include <QColor>
22 
23 namespace niftk
24 {
25 
26 class LookupTableContainer;
27 
33 class LabelMapReader : public mitk::AbstractFileReader
34 {
35 
36 public:
37 
39  LabelMapReader(const LabelMapReader & other);
40  virtual LabelMapReader * Clone() const override;
41  virtual ~LabelMapReader(){};
42 
46  virtual std::vector<itk::SmartPointer<mitk::BaseData> > Read() override;
47 
52 
57  void SetOrder(int order){m_Order = order;}
58 
59 private:
60 
62  bool ReadLabelMap(std::istream &);
63 
66 
67  typedef std::vector<QColor> ColorListType;
69  ColorListType m_Colors;
70 
71  us::ServiceRegistration<mitk::IFileReader> m_ServiceReg;
72 
74  int m_Order;
75 
77  QString m_DisplayName;
78 
79 };
80 
81 }
82 
83 #endif
virtual LabelMapReader * Clone() const override
Definition: niftkLabelMapReader.cxx:54
LabelMapReader()
Definition: niftkLabelMapReader.cxx:36
GLuint GLdouble GLdouble GLint GLint order
Definition: glew.h:3085
virtual LookupTableContainer * GetLookupTableContainer()
Get a LookupTableContainer from file.
Definition: niftkLabelMapReader.cxx:187
Definition: niftkLabelMapReader.h:33
std::vector< LabelType > LabelListType
Definition: niftkLabeledLookupTableProperty.h:37
virtual ~LabelMapReader()
Definition: niftkLabelMapReader.h:41
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
std::vector< QColor > ColorListType
Definition: niftkVtkLookupTableUtils.h:38
void SetOrder(int order)
Set the order to assign the LookupTableContainer as the label map file does not store this informatio...
Definition: niftkLabelMapReader.h:57
virtual std::vector< itk::SmartPointer< mitk::BaseData > > Read() override
Read the file and return mitkBaseData.
Definition: niftkLabelMapReader.cxx:61
Definition: niftkExceptionObject.h:21