CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
vtkScalarsToColorsHistogramChart.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __vtkScalarsToColorsHistogramChart_h
22 #define __vtkScalarsToColorsHistogramChart_h
23 
24 #include "ctkVisualizationVTKCoreExport.h"
25 
26 #include <vtkChartXY.h>
27 #include <vtkNew.h>
28 
29 class vtkPlotBar;
30 class vtkScalarsToColors;
31 class vtkTable;
32 
33 class CTK_VISUALIZATION_VTK_CORE_EXPORT vtkScalarsToColorsHistogramChart
34  : public vtkChartXY
35 {
36 public:
39 
40  enum
41  {
42  VTK_AUTO, // VTK auto scaling: scale the axis to view all data that is visible.
43  MAXIMUM, // Scale the axis to the maximum value of histogram.
44  MEAN_PLUS_THREE_SIGMA // Scale the axis to "mean + 3 * sigma".
45  };
46 
52  void SetLeftAxisMode(int mode);
54 
56  virtual void SetHistogramInputData(vtkTable* table, const char* xAxisColumn,
57  const char* yAxisColumn);
58 
60  virtual void SetScalarVisibility(bool visible);
61 
63  virtual void SetLookupTable(vtkScalarsToColors* lut);
64 
66  virtual void SelectColorArray(const char* arrayName);
67 
68 protected:
69  vtkNew<vtkPlotBar> HistogramPlotBar;
71 
72 private:
75 };
76 
77 #endif // __vtkScalarsToColorsHistogramChart_h
virtual void SetLookupTable(vtkScalarsToColors *lut)
Set lookup table.
virtual void SetHistogramInputData(vtkTable *table, const char *xAxisColumn, const char *yAxisColumn)
Set input for histogram.
virtual void SelectColorArray(const char *arrayName)
Set the color array name.
virtual void SetScalarVisibility(bool visible)
Set scalar visibility in the histogram plot bar.
vtkTypeMacro(vtkScalarsToColorsHistogramChart, vtkChartXY) static vtkScalarsToColorsHistogramChart *New()