1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkContourValues.h,v $
6 Date: $Date: 2002/12/26 18:24:21 $
7 Version: $Revision: 1.22 $
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 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.
27 #ifndef __vtkContourValues_h
28 #define __vtkContourValues_h
30 #include "vtkObject.h"
34 class VTK_COMMON_EXPORT vtkContourValues : public vtkObject
38 // Construct object with a single contour value at 0.0.
39 static vtkContourValues *New();
41 vtkTypeRevisionMacro(vtkContourValues,vtkObject);
42 void PrintSelf(ostream& os, vtkIndent indent);
45 // Set the ith contour value.
46 void SetValue(int i, float value);
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);
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.
59 // Fill a supplied list with contour values. Make sure you've
60 // allocated memory of size GetNumberOfContours().
61 void GetValues(float *contourValues);
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);
70 // Return the number of contours in the
71 int GetNumberOfContours();
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]);
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);
88 vtkFloatArray *Contours;
91 vtkContourValues(const vtkContourValues&); // Not implemented.
92 void operator=(const vtkContourValues&); // Not implemented.