Slicer  4.10
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 class vtkScalarBarWidget;
33 
34 class Q_SLICER_QTMODULES_COLORS_EXPORT qSlicerColorsModuleWidget
36 {
37  Q_OBJECT
38 public:
39 
41  qSlicerColorsModuleWidget(QWidget *parent=0);
42  virtual ~qSlicerColorsModuleWidget();
43 
44  virtual bool setEditedNode(vtkMRMLNode* node, QString role = QString(), QString context = QString());
45 
47  Q_INVOKABLE virtual vtkScalarBarWidget* scalarBar();
48 
49 public slots:
50  void setCurrentColorNode(vtkMRMLNode*);
51  void updateNumberOfColors();
52  void setLookupTableRange(double min, double max);
53  void copyCurrentColorNode();
54  void setUseColorNameAsLabel(bool);
55  void setCenterLabel(bool);
56 
57 protected slots:
58  void onMRMLColorNodeChanged(vtkMRMLNode* newColorNode);
59 
60 protected:
61  virtual void setup();
62  virtual void setMRMLScene(vtkMRMLScene *scene);
63 
64 protected:
65  QScopedPointer<qSlicerColorsModuleWidgetPrivate> d_ptr;
66 
67 private:
68  Q_DECLARE_PRIVATE(qSlicerColorsModuleWidget);
69  Q_DISABLE_COPY(qSlicerColorsModuleWidget);
70 };
71 
72 #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:138