21 #ifndef __vtkDiscretizableColorTransferChart_h
22 #define __vtkDiscretizableColorTransferChart_h
24 #include "ctkVisualizationVTKCoreExport.h"
26 #include <vtkChartXY.h>
27 #include <vtkSmartPointer.h>
29 class vtkCompositeControlPointsItem;
30 class vtkCompositeTransferFunctionItem;
32 class vtkDiscretizableColorTransferFunction;
33 class vtkHistogramMarker;
43 void SetColorTransferFunction(
44 vtkDiscretizableColorTransferFunction*
function);
45 void SetColorTransferFunction(
46 vtkDiscretizableColorTransferFunction*
function,
47 double dataRangeMin,
double dataRangeMax);
50 bool GetCurrentControlPointColor(
double rgb[3]);
53 void SetCurrentControlPointColor(
const double rgb[3]);
56 void SetDataRange(
double min,
double max);
57 double* GetDataRange();
62 void SetCurrentRange(
double min,
double max);
63 double* GetCurrentRange();
64 void RemapColorTransferFunction();
67 void SetOriginalRange(
double min,
double max);
68 double* GetOriginalRange();
71 void CenterRange(
double center);
73 vtkCompositeControlPointsItem* GetControlPointsItem();
75 bool IsProcessingColorTransferFunction()
const;
77 bool MouseMoveEvent(
const vtkContextMouseEvent &mouse) VTK_OVERRIDE;
78 bool MouseButtonPressEvent(
const vtkContextMouseEvent& mouse) VTK_OVERRIDE;
79 bool MouseButtonReleaseEvent(
const vtkContextMouseEvent &mouse) VTK_OVERRIDE;
83 static bool IsInRange(
double min,
double max,
double value);
84 void UpdateMarkerPosition(
const vtkContextMouseEvent& m);
87 vtkSmartPointer<vtkDiscretizableColorTransferControlPointsItem>
ControlPoints;
105 double CurrentRange[2];
106 double OriginalRange[2];