VTK
dox/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 "vtkPassInputTypeAlgorithm.h"
00080 
00081 class vtkScalarsToColors;
00082 class vtkUnsignedCharArray;
00083 
00084 class VTK_INFOVIS_EXPORT vtkApplyColors : public vtkPassInputTypeAlgorithm 
00085 {
00086 public:
00087   static vtkApplyColors *New();
00088   vtkTypeMacro(vtkApplyColors, vtkPassInputTypeAlgorithm);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090 
00092 
00094   virtual void SetPointLookupTable(vtkScalarsToColors* lut);
00095   vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
00097 
00099 
00101   vtkSetMacro(UsePointLookupTable, bool);
00102   vtkGetMacro(UsePointLookupTable, bool);
00103   vtkBooleanMacro(UsePointLookupTable, bool);
00105 
00107 
00109   vtkSetMacro(ScalePointLookupTable, bool);
00110   vtkGetMacro(ScalePointLookupTable, bool);
00111   vtkBooleanMacro(ScalePointLookupTable, bool);
00113 
00115 
00117   vtkSetVector3Macro(DefaultPointColor, double);
00118   vtkGetVector3Macro(DefaultPointColor, double);
00120 
00122 
00124   vtkSetMacro(DefaultPointOpacity, double);
00125   vtkGetMacro(DefaultPointOpacity, double);
00127 
00129 
00131   vtkSetVector3Macro(SelectedPointColor, double);
00132   vtkGetVector3Macro(SelectedPointColor, double);
00134 
00136 
00138   vtkSetMacro(SelectedPointOpacity, double);
00139   vtkGetMacro(SelectedPointOpacity, double);
00141 
00143 
00145   vtkSetStringMacro(PointColorOutputArrayName);
00146   vtkGetStringMacro(PointColorOutputArrayName);
00148 
00150 
00152   virtual void SetCellLookupTable(vtkScalarsToColors* lut);
00153   vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
00155 
00157 
00159   vtkSetMacro(UseCellLookupTable, bool);
00160   vtkGetMacro(UseCellLookupTable, bool);
00161   vtkBooleanMacro(UseCellLookupTable, bool);
00163 
00165 
00167   vtkSetMacro(ScaleCellLookupTable, bool);
00168   vtkGetMacro(ScaleCellLookupTable, bool);
00169   vtkBooleanMacro(ScaleCellLookupTable, bool);
00171 
00173 
00175   vtkSetVector3Macro(DefaultCellColor, double);
00176   vtkGetVector3Macro(DefaultCellColor, double);
00178 
00180 
00182   vtkSetMacro(DefaultCellOpacity, double);
00183   vtkGetMacro(DefaultCellOpacity, double);
00185 
00187 
00189   vtkSetVector3Macro(SelectedCellColor, double);
00190   vtkGetVector3Macro(SelectedCellColor, double);
00192 
00194 
00196   vtkSetMacro(SelectedCellOpacity, double);
00197   vtkGetMacro(SelectedCellOpacity, double);
00199 
00201 
00203   vtkSetStringMacro(CellColorOutputArrayName);
00204   vtkGetStringMacro(CellColorOutputArrayName);
00206 
00208 
00211   vtkSetMacro(UseCurrentAnnotationColor, bool);
00212   vtkGetMacro(UseCurrentAnnotationColor, bool);
00213   vtkBooleanMacro(UseCurrentAnnotationColor, bool);
00215 
00217   virtual long unsigned int GetMTime();
00218 
00219 protected:
00220   vtkApplyColors();
00221   ~vtkApplyColors();
00222   
00224 
00225   int RequestData(
00226     vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00228   
00230   int FillInputPortInformation(int port, vtkInformation* info);
00231 
00232   void ProcessColorArray(
00233     vtkUnsignedCharArray* colorArr,
00234     vtkScalarsToColors* lut,
00235     vtkAbstractArray* arr,
00236     unsigned char color[4],
00237     bool scale);
00238 
00239   vtkScalarsToColors* PointLookupTable;
00240   vtkScalarsToColors* CellLookupTable;
00241   double DefaultPointColor[3];
00242   double DefaultPointOpacity;
00243   double DefaultCellColor[3];
00244   double DefaultCellOpacity;
00245   double SelectedPointColor[3];
00246   double SelectedPointOpacity;
00247   double SelectedCellColor[3];
00248   double SelectedCellOpacity;
00249   bool ScalePointLookupTable;
00250   bool ScaleCellLookupTable;
00251   bool UsePointLookupTable;
00252   bool UseCellLookupTable;
00253   char* PointColorOutputArrayName;
00254   char* CellColorOutputArrayName;
00255   bool UseCurrentAnnotationColor;
00256 
00257 private:
00258   vtkApplyColors(const vtkApplyColors&);  // Not implemented.
00259   void operator=(const vtkApplyColors&);  // Not implemented.
00260 };
00261 
00262 #endif