00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00216 protected:
00217 vtkApplyColors();
00218 ~vtkApplyColors();
00219
00221
00222 int RequestData(
00223 vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00225
00227 int FillInputPortInformation(int port, vtkInformation* info);
00228
00229 void ProcessColorArray(
00230 vtkUnsignedCharArray* colorArr,
00231 vtkScalarsToColors* lut,
00232 vtkAbstractArray* arr,
00233 unsigned char color[4],
00234 bool scale);
00235
00236 vtkScalarsToColors* PointLookupTable;
00237 vtkScalarsToColors* CellLookupTable;
00238 double DefaultPointColor[3];
00239 double DefaultPointOpacity;
00240 double DefaultCellColor[3];
00241 double DefaultCellOpacity;
00242 double SelectedPointColor[3];
00243 double SelectedPointOpacity;
00244 double SelectedCellColor[3];
00245 double SelectedCellOpacity;
00246 bool ScalePointLookupTable;
00247 bool ScaleCellLookupTable;
00248 bool UsePointLookupTable;
00249 bool UseCellLookupTable;
00250 char* PointColorOutputArrayName;
00251 char* CellColorOutputArrayName;
00252 bool UseCurrentAnnotationColor;
00253
00254 private:
00255 vtkApplyColors(const vtkApplyColors&);
00256 void operator=(const vtkApplyColors&);
00257 };
00258
00259 #endif