VTK
dox/Charts/Core/vtkCompositeTransferFunctionItem.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCompositeTransferFunctionItem.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 
00016 #ifndef __vtkCompositeTransferFunctionItem_h
00017 #define __vtkCompositeTransferFunctionItem_h
00018 
00019 #include "vtkChartsCoreModule.h" // For export macro
00020 #include "vtkColorTransferFunctionItem.h"
00021 
00022 class vtkPiecewiseFunction;
00023 
00024 // Description:
00025 // vtkPlot::Color and vtkPlot::Brush have no effect here.
00026 class VTKCHARTSCORE_EXPORT vtkCompositeTransferFunctionItem: public vtkColorTransferFunctionItem
00027 {
00028 public:
00029   static vtkCompositeTransferFunctionItem* New();
00030   vtkTypeMacro(vtkCompositeTransferFunctionItem, vtkColorTransferFunctionItem);
00031   virtual void PrintSelf(ostream &os, vtkIndent indent);
00032 
00033   void SetOpacityFunction(vtkPiecewiseFunction* opacity);
00034   vtkGetObjectMacro(OpacityFunction, vtkPiecewiseFunction);
00035 
00036 protected:
00037   vtkCompositeTransferFunctionItem();
00038   virtual ~vtkCompositeTransferFunctionItem();
00039 
00040   // Description:
00041   // Returns true if we are rendering in log space.
00042   // Since vtkPiecewiseFunction doesn't support log, we show this transfer
00043   // function in non-log space always.
00044   virtual bool UsingLogScale() { return false; }
00045 
00046   // Description:
00047   // Reimplemented to return the range of the piecewise function
00048   virtual void ComputeBounds(double bounds[4]);
00049 
00050   virtual void ComputeTexture();
00051   vtkPiecewiseFunction* OpacityFunction;
00052 
00053 private:
00054   vtkCompositeTransferFunctionItem(const vtkCompositeTransferFunctionItem&); // Not implemented.
00055   void operator=(const vtkCompositeTransferFunctionItem&); // Not implemented
00056 };
00057 
00058 #endif