OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkIdFilter.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkIdFilter.h,v $
5   Language:  C++
6   Date:      $Date: 2002/01/22 15:29:23 $
7   Version:   $Revision: 1.18 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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
24 // cell ids.
25 //
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.
29
30 #ifndef __vtkIdFilter_h
31 #define __vtkIdFilter_h
32
33 #include "vtkDataSetToDataSetFilter.h"
34
35 class VTK_GRAPHICS_EXPORT vtkIdFilter : public vtkDataSetToDataSetFilter 
36 {
37 public:
38   vtkTypeRevisionMacro(vtkIdFilter,vtkDataSetToDataSetFilter);
39   void PrintSelf(ostream& os, vtkIndent indent);
40
41   // Description:
42   // Construct object with PointIds and CellIds on; and ids being generated
43   // as scalars.
44   static vtkIdFilter *New();
45
46   // Description:
47   // Enable/disable the generation of point ids.
48   vtkSetMacro(PointIds,int);
49   vtkGetMacro(PointIds,int);
50   vtkBooleanMacro(PointIds,int);
51
52   // Description:
53   // Enable/disable the generation of point ids.
54   vtkSetMacro(CellIds,int);
55   vtkGetMacro(CellIds,int);
56   vtkBooleanMacro(CellIds,int);
57
58   // Description:
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);
65
66   // Description:
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);
71
72 protected:
73   vtkIdFilter();
74   ~vtkIdFilter();
75
76   void Execute();
77
78   int PointIds;
79   int CellIds;
80   int FieldData;
81   char *IdsArrayName;
82
83 private:
84   vtkIdFilter(const vtkIdFilter&);  // Not implemented.
85   void operator=(const vtkIdFilter&);  // Not implemented.
86 };
87
88 #endif
89
90