1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkCompositeTransferFunctionItem.h 5 6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 All rights reserved. 8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 10 This software is distributed WITHOUT ANY WARRANTY; without even 11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 PURPOSE. See the above copyright notice for more information. 13 14 =========================================================================*/ 15 16 #ifndef vtkCompositeTransferFunctionItem_h 17 #define vtkCompositeTransferFunctionItem_h 18 19 #include "vtkChartsCoreModule.h" // For export macro 20 #include "vtkColorTransferFunctionItem.h" 21 22 class vtkPiecewiseFunction; 23 24 // Description: 25 // vtkPlot::Color and vtkPlot::Brush have no effect here. 26 class VTKCHARTSCORE_EXPORT vtkCompositeTransferFunctionItem: public vtkColorTransferFunctionItem 27 { 28 public: 29 static vtkCompositeTransferFunctionItem* New(); 30 vtkTypeMacro(vtkCompositeTransferFunctionItem, vtkColorTransferFunctionItem); 31 void PrintSelf(ostream &os, vtkIndent indent) override; 32 33 void SetOpacityFunction(vtkPiecewiseFunction* opacity); 34 vtkGetObjectMacro(OpacityFunction, vtkPiecewiseFunction); 35 36 protected: 37 vtkCompositeTransferFunctionItem(); 38 ~vtkCompositeTransferFunctionItem() override; 39 40 // Description: 41 // Reimplemented to return the range of the piecewise function 42 void ComputeBounds(double bounds[4]) override; 43 44 void ComputeTexture() override; 45 vtkPiecewiseFunction* OpacityFunction; 46 47 private: 48 vtkCompositeTransferFunctionItem(const vtkCompositeTransferFunctionItem&) = delete; 49 void operator=(const vtkCompositeTransferFunctionItem&) = delete; 50 }; 51 52 #endif 53