This file is indexed.

/usr/include/vtk-7.1/vtkMapper.h is in libvtk7-dev 7.1.1+dfsg1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkMapper.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
/**
 * @class   vtkMapper
 * @brief   abstract class specifies interface to map data to graphics primitives
 *
 * vtkMapper is an abstract class to specify interface between data and
 * graphics primitives. Subclasses of vtkMapper map data through a
 * lookuptable and control the creation of rendering primitives that
 * interface to the graphics library. The mapping can be controlled by
 * supplying a lookup table and specifying a scalar range to map data
 * through.
 *
 * There are several important control mechanisms affecting the behavior of
 * this object. The ScalarVisibility flag controls whether scalar data (if
 * any) controls the color of the associated actor(s) that refer to the
 * mapper. The ScalarMode ivar is used to determine whether scalar point data
 * or cell data is used to color the object. By default, point data scalars
 * are used unless there are none, in which cell scalars are used. Or you can
 * explicitly control whether to use point or cell scalar data. Finally, the
 * mapping of scalars through the lookup table varies depending on the
 * setting of the ColorMode flag. See the documentation for the appropriate
 * methods for an explanation.
 *
 * Another important feature of this class is whether to use immediate mode
 * rendering (ImmediateModeRenderingOn) or display list rendering
 * (ImmediateModeRenderingOff). If display lists are used, a data structure
 * is constructed (generally in the rendering library) which can then be
 * rapidly traversed and rendered by the rendering library. The disadvantage
 * of display lists is that they require additionally memory which may affect
 * the performance of the system.
 *
 * Another important feature of the mapper is the ability to shift the
 * z-buffer to resolve coincident topology. For example, if you'd like to
 * draw a mesh with some edges a different color, and the edges lie on the
 * mesh, this feature can be useful to get nice looking lines. (See the
 * ResolveCoincidentTopology-related methods.)
 *
 * @sa
 * vtkDataSetMapper vtkPolyDataMapper
*/

#ifndef vtkMapper_h
#define vtkMapper_h

#include "vtkRenderingCoreModule.h" // For export macro
#include "vtkAbstractMapper3D.h"
#include "vtkSystemIncludes.h" // For VTK_COLOR_MODE_DEFAULT and _MAP_SCALARS
#include "vtkSmartPointer.h" // needed for vtkSmartPointer.

#define VTK_RESOLVE_OFF 0
#define VTK_RESOLVE_POLYGON_OFFSET 1
#define VTK_RESOLVE_SHIFT_ZBUFFER 2

#define VTK_GET_ARRAY_BY_ID 0
#define VTK_GET_ARRAY_BY_NAME 1

#define VTK_MATERIALMODE_DEFAULT  0
#define VTK_MATERIALMODE_AMBIENT  1
#define VTK_MATERIALMODE_DIFFUSE  2
#define VTK_MATERIALMODE_AMBIENT_AND_DIFFUSE  3

class vtkWindow;
class vtkRenderer;
class vtkActor;
class vtkDataSet;
class vtkDataObject;
class vtkFloatArray;
class vtkImageData;
class vtkScalarsToColors;
class vtkUnsignedCharArray;

class VTKRENDERINGCORE_EXPORT vtkMapper : public vtkAbstractMapper3D
{
public:
  vtkTypeMacro(vtkMapper, vtkAbstractMapper3D);
  void PrintSelf(ostream& os, vtkIndent indent);

  /**
   * Make a shallow copy of this mapper.
   */
  void ShallowCopy(vtkAbstractMapper *m);

  /**
   * Overload standard modified time function. If lookup table is modified,
   * then this object is modified as well.
   */
  vtkMTimeType GetMTime();

  /**
   * Method initiates the mapping process. Generally sent by the actor
   * as each frame is rendered.
   */
  virtual void Render(vtkRenderer *ren, vtkActor *a) = 0;

  /**
   * Release any graphics resources that are being consumed by this mapper.
   * The parameter window could be used to determine which graphic
   * resources to release.
   */
  virtual void ReleaseGraphicsResources(vtkWindow *) {}

  //@{
  /**
   * Specify a lookup table for the mapper to use.
   */
  void SetLookupTable(vtkScalarsToColors *lut);
  vtkScalarsToColors *GetLookupTable();
  //@}

  /**
   * Create default lookup table. Generally used to create one when none
   * is available with the scalar data.
   */
  virtual void CreateDefaultLookupTable();

  //@{
  /**
   * Turn on/off flag to control whether scalar data is used to color objects.
   */
  vtkSetMacro(ScalarVisibility, int);
  vtkGetMacro(ScalarVisibility, int);
  vtkBooleanMacro(ScalarVisibility, int);
  //@}

  //@{
  /**
   * Turn on/off flag to control whether the mapper's data is static. Static data
   * means that the mapper does not propagate updates down the pipeline, greatly
   * decreasing the time it takes to update many mappers. This should only be
   * used if the data never changes.
   */
  vtkSetMacro(Static, int);
  vtkGetMacro(Static, int);
  vtkBooleanMacro(Static, int);
  //@}

  //@{
  /**
   * default (ColorModeToDefault), unsigned char scalars are treated
   * as colors, and NOT mapped through the lookup table, while
   * everything else is.  ColorModeToDirectScalar extends
   * ColorModeToDefault such that all integer types are treated as
   * colors with values in the range 0-255 and floating types are
   * treated as colors with values in the range 0.0-1.0.  Setting
   * ColorModeToMapScalars means that all scalar data will be mapped
   * through the lookup table.  (Note that for multi-component
   * scalars, the particular component to use for mapping can be
   * specified using the SelectColorArray() method.)
   */
  vtkSetMacro(ColorMode, int);
  vtkGetMacro(ColorMode, int);
  void SetColorModeToDefault()
    { this->SetColorMode(VTK_COLOR_MODE_DEFAULT); }
  void SetColorModeToMapScalars()
    { this->SetColorMode(VTK_COLOR_MODE_MAP_SCALARS); }
  void SetColorModeToDirectScalars()
  { this->SetColorMode(VTK_COLOR_MODE_DIRECT_SCALARS); }
  //@}

  /**
   * Return the method of coloring scalar data.
   */
  const char *GetColorModeAsString();

  //@{
  /**
   * By default, vertex color is used to map colors to a surface.
   * Colors are interpolated after being mapped.
   * This option avoids color interpolation by using a one dimensional
   * texture map for the colors.
   */
  vtkSetMacro(InterpolateScalarsBeforeMapping, int);
  vtkGetMacro(InterpolateScalarsBeforeMapping, int);
  vtkBooleanMacro(InterpolateScalarsBeforeMapping, int);
  //@}

  //@{
  /**
   * Control whether the mapper sets the lookuptable range based on its
   * own ScalarRange, or whether it will use the LookupTable ScalarRange
   * regardless of it's own setting. By default the Mapper is allowed to set
   * the LookupTable range, but users who are sharing LookupTables between
   * mappers/actors will probably wish to force the mapper to use the
   * LookupTable unchanged.
   */
  vtkSetMacro(UseLookupTableScalarRange, int);
  vtkGetMacro(UseLookupTableScalarRange, int);
  vtkBooleanMacro(UseLookupTableScalarRange, int);
  //@}

  //@{
  /**
   * Specify range in terms of scalar minimum and maximum (smin,smax). These
   * values are used to map scalars into lookup table. Has no effect when
   * UseLookupTableScalarRange is true.
   */
  vtkSetVector2Macro(ScalarRange, double);
  vtkGetVectorMacro(ScalarRange, double, 2);
  //@}

  //@{
  /**
   * Turn on/off flag to control whether data is rendered using
   * immediate mode or note. Immediate mode rendering
   * tends to be slower but it can handle larger datasets.
   * The default value is immediate mode off. If you are
   * having problems rendering a large dataset you might
   * want to consider using immediate more rendering.
   */
  vtkSetMacro(ImmediateModeRendering, int);
  vtkGetMacro(ImmediateModeRendering, int);
  vtkBooleanMacro(ImmediateModeRendering, int);
  //@}

  //@{
  /**
   * Turn on/off flag to control whether data is rendered using
   * immediate mode or note. Immediate mode rendering
   * tends to be slower but it can handle larger datasets.
   * The default value is immediate mode off. If you are
   * having problems rendering a large dataset you might
   * want to consider using immediate more rendering.
   */
  static void SetGlobalImmediateModeRendering(int val);
  static void GlobalImmediateModeRenderingOn()
    { vtkMapper::SetGlobalImmediateModeRendering(1); }
  static void GlobalImmediateModeRenderingOff()
    { vtkMapper::SetGlobalImmediateModeRendering(0); }
  static int  GetGlobalImmediateModeRendering();
  //@}

  //@{
  /**
   * Force compile only mode in case display lists are used
   * (ImmediateModeRendering is false). If ImmediateModeRendering is true,
   * no rendering happens. Changing the value of this flag does not change
   * modified time of the mapper. Initial value is false.
   * This can be used by another rendering class which also uses display lists
   * (call of display lists can be nested but not their creation.)
   * There is no good reason to expose it to wrappers.
   */
  vtkGetMacro(ForceCompileOnly, int);
  void SetForceCompileOnly(int value);
  //@}

  /**
   * Control how the filter works with scalar point data and cell attribute
   * data.  By default (ScalarModeToDefault), the filter will use point data,
   * and if no point data is available, then cell data is used. Alternatively
   * you can explicitly set the filter to use point data
   * (ScalarModeToUsePointData) or cell data (ScalarModeToUseCellData).
   * You can also choose to get the scalars from an array in point field
   * data (ScalarModeToUsePointFieldData) or cell field data
   * (ScalarModeToUseCellFieldData).  If scalars are coming from a field
   * data array, you must call SelectColorArray before you call
   * GetColors.
   */

  // When ScalarMode is set to use Field Data (ScalarModeToFieldData),
  // you must call SelectColorArray to choose the field data array to
  // be used to color cells. In this mode, the default behavior is to
  // treat the field data tuples as being associated with cells. If
  // the poly data contains triangle strips, the array is expected to
  // contain the cell data for each mini-cell formed by any triangle
  // strips in the poly data as opposed to treating them as a single
  // tuple that applies to the entire strip.  This mode can also be
  // used to color the entire poly data by a single color obtained by
  // mapping the tuple at a given index in the field data array
  // through the color map. Use SetFieldDataTupleId() to specify
  // the tuple index.
  vtkSetMacro(ScalarMode, int);
  vtkGetMacro(ScalarMode, int);
  void SetScalarModeToDefault()
    { this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT); }
  void SetScalarModeToUsePointData()
    { this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA); }
  void SetScalarModeToUseCellData()
    { this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA); }
  void SetScalarModeToUsePointFieldData()
    { this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA); }
  void SetScalarModeToUseCellFieldData()
    { this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA); }
  void SetScalarModeToUseFieldData()
    { this->SetScalarMode(VTK_SCALAR_MODE_USE_FIELD_DATA); }

  //@{
  /**
   * When ScalarMode is set to UsePointFieldData or UseCellFieldData,
   * you can specify which array to use for coloring using these methods.
   * The lookup table will decide how to convert vectors to colors.
   */
  void SelectColorArray(int arrayNum);
  void SelectColorArray(const char* arrayName);
  //@}


  // When ScalarMode is set to UseFieldData, set the index of the
  // tuple by which to color the entire data set. By default, the
  // index is -1, which means to treat the field data array selected
  // with SelectColorArray as having a scalar value for each cell.
  // Indices of 0 or higher mean to use the tuple at the given index
  // for coloring the entire data set.
  vtkSetMacro(FieldDataTupleId, vtkIdType);
  vtkGetMacro(FieldDataTupleId, vtkIdType);

  //@{
  /**
   * Legacy:
   * These methods used to be used to specify the array component.
   * It is better to do this in the lookup table.
   */
  void ColorByArrayComponent(int arrayNum, int component);
  void ColorByArrayComponent(const char* arrayName, int component);
  //@}

  /**
   * Get the array name or number and component to color by.
   */
  char* GetArrayName() { return this->ArrayName; }
  int GetArrayId() { return this->ArrayId; }
  int GetArrayAccessMode() { return this->ArrayAccessMode; }
  int GetArrayComponent() { return this->ArrayComponent; }

  /**
   * Return the method for obtaining scalar data.
   */
  const char *GetScalarModeAsString();

  //@{
  /**
   * Set/Get a global flag that controls whether coincident topology (e.g., a
   * line on top of a polygon) is shifted to avoid z-buffer resolution (and
   * hence rendering problems). If not off, there are two methods to choose
   * from. PolygonOffset uses graphics systems calls to shift polygons, but
   * does not distinguish vertices and lines from one another. ShiftZBuffer
   * remaps the z-buffer to distinguish vertices, lines, and polygons, but
   * does not always produce acceptable results. If you use the ShiftZBuffer
   * approach, you may also want to set the ResolveCoincidentTopologyZShift
   * value. (Note: not all mappers/graphics systems implement this
   * functionality.)
   */
  static void SetResolveCoincidentTopology(int val);
  static int  GetResolveCoincidentTopology();
  static void SetResolveCoincidentTopologyToDefault();
  static void SetResolveCoincidentTopologyToOff()
    { SetResolveCoincidentTopology(VTK_RESOLVE_OFF) ;}
  static void SetResolveCoincidentTopologyToPolygonOffset()
    { SetResolveCoincidentTopology(VTK_RESOLVE_POLYGON_OFFSET); }
  static void SetResolveCoincidentTopologyToShiftZBuffer()
    { SetResolveCoincidentTopology(VTK_RESOLVE_SHIFT_ZBUFFER); }
  //@}

  //@{
  /**
   * Used to set the polygon offset scale factor and units.
   * Used when ResolveCoincidentTopology is set to PolygonOffset.
   * These are global variables.
   */
  static void SetResolveCoincidentTopologyPolygonOffsetParameters(
    double factor, double units);
  static void GetResolveCoincidentTopologyPolygonOffsetParameters(
    double& factor, double& units);
  //@}

  //@{
  /**
   * Used to set the polygon offset values relative to the global
   * Used when ResolveCoincidentTopology is set to PolygonOffset.
   */
  void SetRelativeCoincidentTopologyPolygonOffsetParameters(
    double factor, double units);
  void GetRelativeCoincidentTopologyPolygonOffsetParameters(
    double& factor, double& units);
  //@}

  //@{
  /**
   * Used to set the line offset scale factor and units.
   * Used when ResolveCoincidentTopology is set to PolygonOffset.
   * These are global variables.
   */
  static void SetResolveCoincidentTopologyLineOffsetParameters(
    double factor, double units);
  static void GetResolveCoincidentTopologyLineOffsetParameters(
    double& factor, double& units);
  //@}

  //@{
  /**
   * Used to set the line offset values relative to the global
   * Used when ResolveCoincidentTopology is set to PolygonOffset.
   */
  void SetRelativeCoincidentTopologyLineOffsetParameters(
    double factor, double units);
  void GetRelativeCoincidentTopologyLineOffsetParameters(
    double& factor, double& units);
  //@}

  //@{
  /**
   * Used to set the point offset value
   * Used when ResolveCoincidentTopology is set to PolygonOffset.
   * These are global variables.
   */
  static void SetResolveCoincidentTopologyPointOffsetParameter(
    double units);
  static void GetResolveCoincidentTopologyPointOffsetParameter(
    double& units);
  //@}

  //@{
  /**
   * Used to set the point offset value relative to the global
   * Used when ResolveCoincidentTopology is set to PolygonOffset.
   */
  void SetRelativeCoincidentTopologyPointOffsetParameter(double units);
  void GetRelativeCoincidentTopologyPointOffsetParameter(double& units);
  //@}

  //@{
  /**
   * Get the net paramters for handlig coincident topology
   * obtained by summing the global values with the relative values.
   */
  void GetCoincidentTopologyPolygonOffsetParameters(
    double& factor, double& units);
  void GetCoincidentTopologyLineOffsetParameters(
    double& factor, double& units);
  void GetCoincidentTopologyPointOffsetParameter(double& units);
  //@}

  //@{
  /**
   * Used when ResolveCoincidentTopology is set to PolygonOffset. The polygon
   * offset can be applied either to the solid polygonal faces or the
   * lines/vertices. When set (default), the offset is applied to the faces
   * otherwise it is applied to lines and vertices.
   * This is a global variable.
   */
  static void SetResolveCoincidentTopologyPolygonOffsetFaces(int faces);
  static int GetResolveCoincidentTopologyPolygonOffsetFaces();
  //@}

  //@{
  /**
   * Used to set the z-shift if ResolveCoincidentTopology is set to
   * ShiftZBuffer. This is a global variable.
   */
  static void SetResolveCoincidentTopologyZShift(double val);
  static double GetResolveCoincidentTopologyZShift();
  //@}

  /**
   * Return bounding box (array of six doubles) of data expressed as
   * (xmin,xmax, ymin,ymax, zmin,zmax).
   */
  virtual double *GetBounds();
  virtual void GetBounds(double bounds[6])
    { this->vtkAbstractMapper3D::GetBounds(bounds); }

  /**
   * This instance variable is used by vtkLODActor to determine which
   * mapper to use.  It is an estimate of the time necessary to render.
   * Setting the render time does not modify the mapper.
   */
  void SetRenderTime(double time) {this->RenderTime = time;}
  vtkGetMacro(RenderTime, double);

  /**
   * Get the input as a vtkDataSet.  This method is overridden in
   * the specialized mapper classes to return more specific data types.
   */
  vtkDataSet *GetInput();

  /**
   * Get the input to this mapper as a vtkDataSet, instead of as a
   * more specialized data type that the subclass may return from
   * GetInput().  This method is provided for use in the wrapper languages,
   * C++ programmers should use GetInput() instead.
   */
  vtkDataSet *GetInputAsDataSet()
    { return this->GetInput(); }

  //@{
  /**
   * Map the scalars (if there are any scalars and ScalarVisibility is on)
   * through the lookup table, returning an unsigned char RGBA array. This is
   * typically done as part of the rendering process. The alpha parameter
   * allows the blending of the scalars with an additional alpha (typically
   * which comes from a vtkActor, etc.)
   */
  virtual vtkUnsignedCharArray *MapScalars(double alpha);
  virtual vtkUnsignedCharArray *MapScalars(double alpha,
                                           int &cellFlag);
  virtual vtkUnsignedCharArray *MapScalars(vtkDataSet *input,
                                           double alpha);
  virtual vtkUnsignedCharArray *MapScalars(vtkDataSet *input,
                                           double alpha,
                                           int &cellFlag);
  //@}

  //@{
  /**
   * Set/Get the light-model color mode.
   */
  vtkSetMacro(ScalarMaterialMode,int);
  vtkGetMacro(ScalarMaterialMode,int);
  void SetScalarMaterialModeToDefault()
    { this->SetScalarMaterialMode(VTK_MATERIALMODE_DEFAULT); }
  void SetScalarMaterialModeToAmbient()
    { this->SetScalarMaterialMode(VTK_MATERIALMODE_AMBIENT); }
  void SetScalarMaterialModeToDiffuse()
    { this->SetScalarMaterialMode(VTK_MATERIALMODE_DIFFUSE); }
  void SetScalarMaterialModeToAmbientAndDiffuse()
    { this->SetScalarMaterialMode(VTK_MATERIALMODE_AMBIENT_AND_DIFFUSE); }
  //@}

  /**
   * Return the light-model color mode.
   */
  const char *GetScalarMaterialModeAsString();

  /**
   * Returns if the mapper does not expect to have translucent geometry. This
   * may happen when using ColorMode is set to not map scalars i.e. render the
   * scalar array directly as colors and the scalar array has opacity i.e. alpha
   * component.  Default implementation simply returns true. Note that even if
   * this method returns true, an actor may treat the geometry as translucent
   * since a constant translucency is set on the property, for example.
   */
  virtual bool GetIsOpaque();

  /**
   * WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
   * DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS
   * Used by vtkHardwareSelector to determine if the prop supports hardware
   * selection.
   */
  virtual bool GetSupportsSelection()
    { return false; }

  /**
   * Returns if we can use texture maps for scalar coloring. Note this doesn't
   * say we "will" use scalar coloring. It says, if we do use scalar coloring,
   * we will use a texture.
   * When rendering multiblock datasets, if any 2 blocks provide different
   * lookup tables for the scalars, then also we cannot use textures. This case
   * can be handled if required.
   */
  virtual int CanUseTextureMapForColoring(vtkDataObject* input);

  //@{
  /**
   * Used internally by vtkValuePass
   */
  void UseInvertibleColorFor(vtkDataObject *input,
    int scalarMode,
    int arrayAccessMode,
    int arrayId,
    const char *arrayName,
    int arrayComponent,
    double *scalarRange);
  void UseInvertibleColorFor(int scalarMode,
    int arrayAccessMode,
    int arrayId,
    const char *arrayName,
    int arrayComponent,
    double *scalarRange);
  //@}

  /**
   * Used internally by vtkValuePass.
   */
  void ClearInvertibleColor();

  /**
   * Convert a floating point value to an RGB triplet.
   */
  static void ValueToColor(double value, double min, double scale,
    unsigned char *color);

  /**
   * Convert an RGB triplet to a floating point value.
   */
  static void ColorToValue(unsigned char *color, double min, double scale,
    double &value);

  /**
   * Call to force a rebuild of color result arrays on next MapScalars.
   * Necessary when using arrays in the case of multiblock data.
   */
  void ClearColorArrays();

  /**
   * Provide read access to the color array
   */
  vtkUnsignedCharArray *GetColorMapColors();

  /**
   * Provide read access to the color texture coordinate array
   */
  vtkFloatArray *GetColorCoordinates();

  /**
   * Provide read access to the color texture array
   */
  vtkImageData* GetColorTextureMap();

protected:
  vtkMapper();
  ~vtkMapper();

  // color mapped colors
  vtkUnsignedCharArray *Colors;

  // Use texture coordinates for coloring.
  int InterpolateScalarsBeforeMapping;
  // Coordinate for each point.
  vtkFloatArray *ColorCoordinates;
  // 1D ColorMap used for the texture image.
  vtkImageData* ColorTextureMap;
  void MapScalarsToTexture(vtkAbstractArray* scalars, double alpha);

  // Makes a lookup table that can be used for deferred colormaps
  void AcquireInvertibleLookupTable();
  bool UseInvertibleColors;
  static vtkScalarsToColors *InvertibleLookupTable;

  vtkScalarsToColors *LookupTable;
  int ScalarVisibility;
  vtkTimeStamp BuildTime;
  double ScalarRange[2];
  int UseLookupTableScalarRange;
  int ImmediateModeRendering;
  int ColorMode;
  int ScalarMode;
  int ScalarMaterialMode;

  double RenderTime;

  // for coloring by a component of a field data array
  int ArrayId;
  char ArrayName[256];
  int ArrayComponent;
  int ArrayAccessMode;

  // If coloring by field data, which tuple to use to color the entire
  // data set. If -1, treat array values as cell data.
  vtkIdType FieldDataTupleId;

  int Static;

  int ForceCompileOnly;

  vtkAbstractArray *InvertibleScalars;

  double CoincidentPolygonFactor;
  double CoincidentPolygonOffset;
  double CoincidentLineFactor;
  double CoincidentLineOffset;
  double CoincidentPointOffset;

private:
  vtkMapper(const vtkMapper&) VTK_DELETE_FUNCTION;
  void operator=(const vtkMapper&) VTK_DELETE_FUNCTION;
};

#endif