Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerColorsModuleWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerColorsModuleWidget_h
22 #define __qSlicerColorsModuleWidget_h
23 
24 // SlicerQt includes
26 
27 // Colors includes
28 #include "qSlicerColorsModuleExport.h"
29 
30 class qSlicerColorsModuleWidgetPrivate;
31 class vtkMRMLNode;
32 
33 class Q_SLICER_QTMODULES_COLORS_EXPORT qSlicerColorsModuleWidget
35 {
36  Q_OBJECT
37 public:
38 
40  qSlicerColorsModuleWidget(QWidget *parent=0);
41  virtual ~qSlicerColorsModuleWidget();
42 
43  virtual bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString());
44 
45 public slots:
46  void setCurrentColorNode(vtkMRMLNode*);
47  void updateNumberOfColors();
48  void setLookupTableRange(double min, double max);
49  void copyCurrentColorNode();
50  void setUseColorNameAsLabel(bool);
51 
52 protected slots:
53  void onMRMLColorNodeChanged(vtkMRMLNode* newColorNode);
54 
55 protected:
56  virtual void setup();
57  virtual void setMRMLScene(vtkMRMLScene *scene);
58 
59 protected:
60  QScopedPointer<qSlicerColorsModuleWidgetPrivate> d_ptr;
61 
62 private:
63  Q_DECLARE_PRIVATE(qSlicerColorsModuleWidget);
64  Q_DISABLE_COPY(qSlicerColorsModuleWidget);
65 };
66 
67 #endif
virtual Q_INVOKABLE bool setEditedNode(vtkMRMLNode *node, QString role=QString(), QString context=QString())
Node editing.
virtual void setMRMLScene(vtkMRMLScene *scene)
qSlicerAbstractModuleWidget Superclass
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
QScopedPointer< qSlicerColorsModuleWidgetPrivate > d_ptr
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135