1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkIdFilter.h,v $
6 Date: $Date: 2002/01/22 15:29:23 $
7 Version: $Revision: 1.18 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkIdFilter - generate scalars or field data from point and cell ids
19 // .SECTION Description
20 // vtkIdFilter is a filter to that generates scalars or field data
21 // using cell and point ids. That is, the point attribute data scalars
22 // or field data are generated from the point ids, and the cell
23 // attribute data scalars or field data are generated from the the
26 // Typically this filter is used with vtkLabeledDataMapper (and possibly
27 // vtkSelectVisiblePoints) to create labels for points and cells, or labels
28 // for the point or cell data scalar values.
30 #ifndef __vtkIdFilter_h
31 #define __vtkIdFilter_h
33 #include "vtkDataSetToDataSetFilter.h"
35 class VTK_GRAPHICS_EXPORT vtkIdFilter : public vtkDataSetToDataSetFilter
38 vtkTypeRevisionMacro(vtkIdFilter,vtkDataSetToDataSetFilter);
39 void PrintSelf(ostream& os, vtkIndent indent);
42 // Construct object with PointIds and CellIds on; and ids being generated
44 static vtkIdFilter *New();
47 // Enable/disable the generation of point ids.
48 vtkSetMacro(PointIds,int);
49 vtkGetMacro(PointIds,int);
50 vtkBooleanMacro(PointIds,int);
53 // Enable/disable the generation of point ids.
54 vtkSetMacro(CellIds,int);
55 vtkGetMacro(CellIds,int);
56 vtkBooleanMacro(CellIds,int);
59 // Set/Get the flag which controls whether to generate scalar data
60 // or field data. If this flag is off, scalar data is generated.
61 // Otherwise, field data is generated.
62 vtkSetMacro(FieldData,int);
63 vtkGetMacro(FieldData,int);
64 vtkBooleanMacro(FieldData,int);
67 // Set/Get the name of the Ids array if generated. By default the Ids
68 // are named "vtkIdFilter_Ids", but this can be changed with this function.
69 vtkSetStringMacro(IdsArrayName);
70 vtkGetStringMacro(IdsArrayName);
84 vtkIdFilter(const vtkIdFilter&); // Not implemented.
85 void operator=(const vtkIdFilter&); // Not implemented.