VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Views/Infovis/vtkApplyColors.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkApplyColors.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   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00076 #ifndef vtkApplyColors_h
00077 #define vtkApplyColors_h
00078 
00079 #include "vtkViewsInfovisModule.h" // For export macro
00080 #include "vtkPassInputTypeAlgorithm.h"
00081 
00082 class vtkScalarsToColors;
00083 class vtkUnsignedCharArray;
00084 
00085 class VTKVIEWSINFOVIS_EXPORT vtkApplyColors : public vtkPassInputTypeAlgorithm
00086 {
00087 public:
00088   static vtkApplyColors *New();
00089   vtkTypeMacro(vtkApplyColors, vtkPassInputTypeAlgorithm);
00090   void PrintSelf(ostream& os, vtkIndent indent);
00091 
00093 
00095   virtual void SetPointLookupTable(vtkScalarsToColors* lut);
00096   vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
00098 
00100 
00102   vtkSetMacro(UsePointLookupTable, bool);
00103   vtkGetMacro(UsePointLookupTable, bool);
00104   vtkBooleanMacro(UsePointLookupTable, bool);
00106 
00108 
00110   vtkSetMacro(ScalePointLookupTable, bool);
00111   vtkGetMacro(ScalePointLookupTable, bool);
00112   vtkBooleanMacro(ScalePointLookupTable, bool);
00114 
00116 
00118   vtkSetVector3Macro(DefaultPointColor, double);
00119   vtkGetVector3Macro(DefaultPointColor, double);
00121 
00123 
00125   vtkSetMacro(DefaultPointOpacity, double);
00126   vtkGetMacro(DefaultPointOpacity, double);
00128 
00130 
00132   vtkSetVector3Macro(SelectedPointColor, double);
00133   vtkGetVector3Macro(SelectedPointColor, double);
00135 
00137 
00139   vtkSetMacro(SelectedPointOpacity, double);
00140   vtkGetMacro(SelectedPointOpacity, double);
00142 
00144 
00146   vtkSetStringMacro(PointColorOutputArrayName);
00147   vtkGetStringMacro(PointColorOutputArrayName);
00149 
00151 
00153   virtual void SetCellLookupTable(vtkScalarsToColors* lut);
00154   vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
00156 
00158 
00160   vtkSetMacro(UseCellLookupTable, bool);
00161   vtkGetMacro(UseCellLookupTable, bool);
00162   vtkBooleanMacro(UseCellLookupTable, bool);
00164 
00166 
00168   vtkSetMacro(ScaleCellLookupTable, bool);
00169   vtkGetMacro(ScaleCellLookupTable, bool);
00170   vtkBooleanMacro(ScaleCellLookupTable, bool);
00172 
00174 
00176   vtkSetVector3Macro(DefaultCellColor, double);
00177   vtkGetVector3Macro(DefaultCellColor, double);
00179 
00181 
00183   vtkSetMacro(DefaultCellOpacity, double);
00184   vtkGetMacro(DefaultCellOpacity, double);
00186 
00188 
00190   vtkSetVector3Macro(SelectedCellColor, double);
00191   vtkGetVector3Macro(SelectedCellColor, double);
00193 
00195 
00197   vtkSetMacro(SelectedCellOpacity, double);
00198   vtkGetMacro(SelectedCellOpacity, double);
00200 
00202 
00204   vtkSetStringMacro(CellColorOutputArrayName);
00205   vtkGetStringMacro(CellColorOutputArrayName);
00207 
00209 
00212   vtkSetMacro(UseCurrentAnnotationColor, bool);
00213   vtkGetMacro(UseCurrentAnnotationColor, bool);
00214   vtkBooleanMacro(UseCurrentAnnotationColor, bool);
00216 
00218   virtual long unsigned int GetMTime();
00219 
00220 protected:
00221   vtkApplyColors();
00222   ~vtkApplyColors();
00223 
00225 
00226   int RequestData(
00227     vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00229 
00231   int FillInputPortInformation(int port, vtkInformation* info);
00232 
00233   void ProcessColorArray(
00234     vtkUnsignedCharArray* colorArr,
00235     vtkScalarsToColors* lut,
00236     vtkAbstractArray* arr,
00237     unsigned char color[4],
00238     bool scale);
00239 
00240   vtkScalarsToColors* PointLookupTable;
00241   vtkScalarsToColors* CellLookupTable;
00242   double DefaultPointColor[3];
00243   double DefaultPointOpacity;
00244   double DefaultCellColor[3];
00245   double DefaultCellOpacity;
00246   double SelectedPointColor[3];
00247   double SelectedPointOpacity;
00248   double SelectedCellColor[3];
00249   double SelectedCellOpacity;
00250   bool ScalePointLookupTable;
00251   bool ScaleCellLookupTable;
00252   bool UsePointLookupTable;
00253   bool UseCellLookupTable;
00254   char* PointColorOutputArrayName;
00255   char* CellColorOutputArrayName;
00256   bool UseCurrentAnnotationColor;
00257 
00258 private:
00259   vtkApplyColors(const vtkApplyColors&);  // Not implemented.
00260   void operator=(const vtkApplyColors&);  // Not implemented.
00261 };
00262 
00263 #endif