vtkCompositeTransferFunctionItem.h 1.99 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkCompositeTransferFunctionItem.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/

16 17
#ifndef vtkCompositeTransferFunctionItem_h
#define vtkCompositeTransferFunctionItem_h
18

19
#include "vtkChartsCoreModule.h" // For export macro
20 21 22 23
#include "vtkColorTransferFunctionItem.h"

class vtkPiecewiseFunction;

24 25
// Description:
// vtkPlot::Color and vtkPlot::Brush have no effect here.
26
class VTKCHARTSCORE_EXPORT vtkCompositeTransferFunctionItem: public vtkColorTransferFunctionItem
27 28 29 30 31 32 33 34 35 36 37 38 39
{
public:
  static vtkCompositeTransferFunctionItem* New();
  vtkTypeMacro(vtkCompositeTransferFunctionItem, vtkColorTransferFunctionItem);
  virtual void PrintSelf(ostream &os, vtkIndent indent);

  void SetOpacityFunction(vtkPiecewiseFunction* opacity);
  vtkGetObjectMacro(OpacityFunction, vtkPiecewiseFunction);

protected:
  vtkCompositeTransferFunctionItem();
  virtual ~vtkCompositeTransferFunctionItem();

40 41 42 43 44 45
  // Description:
  // Returns true if we are rendering in log space.
  // Since vtkPiecewiseFunction doesn't support log, we show this transfer
  // function in non-log space always.
  virtual bool UsingLogScale() { return false; }

46 47 48 49
  // Description:
  // Reimplemented to return the range of the piecewise function
  virtual void ComputeBounds(double bounds[4]);

50 51
  virtual void ComputeTexture();
  vtkPiecewiseFunction* OpacityFunction;
52 53

private:
54
  vtkCompositeTransferFunctionItem(const vtkCompositeTransferFunctionItem&) VTK_DELETE_FUNCTION;
55
  void operator=(const vtkCompositeTransferFunctionItem&) VTK_DELETE_FUNCTION;
56 57 58
};

#endif