OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkContourValues.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkContourValues.h,v $
5   Language:  C++
6   Date:      $Date: 2002/12/26 18:24:21 $
7   Version:   $Revision: 1.22 $
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 vtkContourValues - helper object to manage setting and generating contour values
19 // .SECTION Description
20 // vtkContourValues is a general class to manage the creation, generation,
21 // and retrieval of contour values. This class serves as a helper class for
22 // contouring classes, or those classes operating on lists of contour values.
23
24 // .SECTION See Also
25 // vtkContourFilter
26
27 #ifndef __vtkContourValues_h
28 #define __vtkContourValues_h
29
30 #include "vtkObject.h"
31
32 class vtkFloatArray;
33
34 class VTK_COMMON_EXPORT vtkContourValues : public vtkObject
35 {
36 public:
37   // Description:
38   // Construct object with a single contour value at 0.0.
39   static vtkContourValues *New();
40
41   vtkTypeRevisionMacro(vtkContourValues,vtkObject);
42   void PrintSelf(ostream& os, vtkIndent indent);
43
44   // Description:
45   // Set the ith contour value.
46   void SetValue(int i, float value);
47
48   // Description:
49   // Get the ith contour value. The return value will be clamped if the
50   // index i is out of range.
51   float GetValue(int i);
52
53   // Description:
54   // Return a pointer to a list of contour values. The contents of the
55   // list will be garbage if the number of contours <= 0.
56   float *GetValues();
57
58   // Description:
59   // Fill a supplied list with contour values. Make sure you've
60   // allocated memory of size GetNumberOfContours().
61   void GetValues(float *contourValues);
62
63   // Description:
64   // Set the number of contours to place into the list. You only really
65   // need to use this method to reduce list size. The method SetValue()
66   // will automatically increase list size as needed.
67   void SetNumberOfContours(const int number);
68
69   // Description:
70   // Return the number of contours in the
71   int GetNumberOfContours();
72
73   // Description:
74   // Generate numContours equally spaced contour values between specified
75   // range. Contour values will include min/max range values.
76   void GenerateValues(int numContours, float range[2]);
77
78   // Description:
79   // Generate numContours equally spaced contour values between specified
80   // range. Contour values will include min/max range values.
81   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
82
83
84 protected:
85   vtkContourValues();
86   ~vtkContourValues();
87
88   vtkFloatArray *Contours;
89
90 private:
91   vtkContourValues(const vtkContourValues&);  // Not implemented.
92   void operator=(const vtkContourValues&);  // Not implemented.
93 };
94
95 #endif