Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerColorLogic.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8 =========================================================================auto=*/
9 
14 
15 #ifndef __vtkSlicerColorLogic_h
16 #define __vtkSlicerColorLogic_h
17 
18 // MRMLLogic includes
19 #include <vtkMRMLColorLogic.h>
20 #include "vtkSlicerColorsModuleLogicExport.h"
21 
24 class vtkMRMLDisplayNode;
25 
26 class VTK_SLICER_COLORS_MODULE_LOGIC_EXPORT vtkSlicerColorLogic
27  : public vtkMRMLColorLogic
28 {
29 public:
30 
32  static vtkSlicerColorLogic *New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37  const char * GetDefaultLabelMapColorNodeID() override;
38 
40  const char * GetDefaultEditorColorNodeID() override;
41 
43  const char * GetDefaultChartColorNodeID() override;
44 
48  std::vector<std::string> FindDefaultColorFiles() override;
49  std::vector<std::string> FindUserColorFiles() override;
50 
56  static vtkMRMLColorLegendDisplayNode* AddDefaultColorLegendDisplayNode(vtkMRMLDisplayableNode* displayableNode);
57 
63  static vtkMRMLColorLegendDisplayNode* AddDefaultColorLegendDisplayNode(vtkMRMLDisplayNode* displayNode);
64 
70  static vtkMRMLColorLegendDisplayNode* GetNthColorLegendDisplayNode(vtkMRMLDisplayableNode* displayableNode, int n);
71 
74  static int GetNumberOfColorLegendDisplayNodes(vtkMRMLDisplayableNode* displayableNode);
75 
79  static vtkMRMLColorLegendDisplayNode* GetColorLegendDisplayNode(vtkMRMLDisplayableNode* displayableNode);
80 
85  static vtkMRMLColorLegendDisplayNode* GetColorLegendDisplayNode(vtkMRMLDisplayNode* displayNode);
86 
87 protected:
89  ~vtkSlicerColorLogic() override;
91  void operator=(const vtkSlicerColorLogic&);
92 
93  static vtkMRMLDisplayNode* GetFirstNonColorLegendDisplayNode(vtkMRMLDisplayableNode* displayableNode);
94 
96  void RegisterNodes() override;
97 
98  std::vector<std::string> FindColorFiles(const std::vector<std::string>& directories);
99 };
100 
101 #endif
102 
static vtkMRMLColorLogic * New()
The Usual vtk class functions.
void PrintSelf(ostream &os, vtkIndent indent) override
void operator=(const vtkMRMLColorLogic &)
virtual std::vector< std::string > FindUserColorFiles()
virtual const char * GetDefaultLabelMapColorNodeID()
Return a default color node id for a label map.
MRML logic class for color manipulation.
virtual std::vector< std::string > FindDefaultColorFiles()
virtual const char * GetDefaultEditorColorNodeID()
Return a default color node id for the editor.
virtual const char * GetDefaultChartColorNodeID()
Return a default color node id for a chart.
Abstract class that contains graphical display properties for displayable nodes.
Class describing how to display a color legend.