VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkColorTransferFunctionItem.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 __vtkColorTransferFunctionItem_h 00017 #define __vtkColorTransferFunctionItem_h 00018 00019 #include "vtkChartsCoreModule.h" // For export macro 00020 #include "vtkScalarsToColorsItem.h" 00021 00022 class vtkColorTransferFunction; 00023 class vtkImageData; 00024 00025 // Description: 00026 // vtkPlot::Color, vtkPlot::Brush, vtkScalarsToColors::DrawPolyLine, 00027 // vtkScalarsToColors::MaskAboveCurve have no effect here. 00028 class VTKCHARTSCORE_EXPORT vtkColorTransferFunctionItem: public vtkScalarsToColorsItem 00029 { 00030 public: 00031 static vtkColorTransferFunctionItem* New(); 00032 vtkTypeMacro(vtkColorTransferFunctionItem, vtkScalarsToColorsItem); 00033 virtual void PrintSelf(ostream &os, vtkIndent indent); 00034 00035 void SetColorTransferFunction(vtkColorTransferFunction* t); 00036 vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction); 00037 00038 protected: 00039 vtkColorTransferFunctionItem(); 00040 virtual ~vtkColorTransferFunctionItem(); 00041 00042 // Description: 00043 // Returns true if we are rendering in log space. 00044 virtual bool UsingLogScale(); 00045 00046 00047 // Description: 00048 // Reimplemented to return the range of the lookup table 00049 virtual void ComputeBounds(double bounds[4]); 00050 00051 virtual void ComputeTexture(); 00052 vtkColorTransferFunction* ColorTransferFunction; 00053 private: 00054 vtkColorTransferFunctionItem(const vtkColorTransferFunctionItem&); // Not implemented 00055 void operator=(const vtkColorTransferFunctionItem&); // Not implemented 00056 }; 00057 00058 #endif