Graphics/vtkContourFilter.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Graphics/vtkContourFilter.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkContourFilter.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00075 #ifndef __vtkContourFilter_h
    00076 #define __vtkContourFilter_h
    00077
    00078 #include "vtkDataSetToPolyDataFilter.h"
    00079
    00080 #include "vtkContourValues.h" // Needed for inline methods
    00081
    00082 class vtkPointLocator;
    00083 class vtkScalarTree;
    00084
    00085 class VTK_GRAPHICS_EXPORT vtkContourFilter : public vtkDataSetToPolyDataFilter
    00086 {
    00087 public:
    00088   vtkTypeRevisionMacro(vtkContourFilter,vtkDataSetToPolyDataFilter);
    00089   void PrintSelf(ostream& os, vtkIndent indent);
    00090
    00093   static vtkContourFilter *New();
    00094
    00096
    00097   void SetValue(int i, float value);
    00098   float GetValue(int i);
    00099   float *GetValues();
    00100   void GetValues(float *contourValues);
    00101   void SetNumberOfContours(int number);
    00102   int GetNumberOfContours();
    00103   void GenerateValues(int numContours, float range[2]);
    00104   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
    00106
    00108   unsigned long GetMTime();
    00109
    00111
    00115   vtkSetMacro(ComputeNormals,int);
    00116   vtkGetMacro(ComputeNormals,int);
    00117   vtkBooleanMacro(ComputeNormals,int);
    00119
    00121
    00127   vtkSetMacro(ComputeGradients,int);
    00128   vtkGetMacro(ComputeGradients,int);
    00129   vtkBooleanMacro(ComputeGradients,int);
    00131
    00133
    00134   vtkSetMacro(ComputeScalars,int);
    00135   vtkGetMacro(ComputeScalars,int);
    00136   vtkBooleanMacro(ComputeScalars,int);
    00138
    00140
    00141   vtkSetMacro(UseScalarTree,int);
    00142   vtkGetMacro(UseScalarTree,int);
    00143   vtkBooleanMacro(UseScalarTree,int);
    00145
    00147
    00148   virtual void SetScalarTree(vtkScalarTree*);
    00149   vtkGetObjectMacro(ScalarTree,vtkScalarTree);
    00151
    00153
    00155   void SetLocator(vtkPointLocator *locator);
    00156   vtkGetObjectMacro(Locator,vtkPointLocator);
    00158
    00161   void CreateDefaultLocator();
    00162
    00163 protected:
    00164   vtkContourFilter();
    00165   ~vtkContourFilter();
    00166
    00167   void Execute();
    00168
    00169   vtkContourValues *ContourValues;
    00170   int ComputeNormals;
    00171   int ComputeGradients;
    00172   int ComputeScalars;
    00173   vtkPointLocator *Locator;
    00174   int UseScalarTree;
    00175   vtkScalarTree *ScalarTree;
    00176
    00177   char *InputScalarsSelection;
    00178   vtkSetStringMacro(InputScalarsSelection);
    00179
    00180 //BTX
    00181
    00182   // This is temporary solution. The sub-classes must be able
    00183   // to call SelectInputScalars() on other instances.
    00184   friend class vtkKitwareContourFilter;
    00185
    00187
    00190   vtkGetStringMacro(InputScalarsSelection);
    00191   virtual void SelectInputScalars(const char *fieldName)
    00192     {this->SetInputScalarsSelection(fieldName);}
    00194
    00195 //ETX
    00196
    00197 private:
    00198   vtkContourFilter(const vtkContourFilter&);  // Not implemented.
    00199   void operator=(const vtkContourFilter&);  // Not implemented.
    00200 };
    00201
    00204 inline void vtkContourFilter::SetValue(int i, float value)
    00205 {this->ContourValues->SetValue(i,value);}
    00206
    00208
    00209 inline float vtkContourFilter::GetValue(int i)
    00210 {return this->ContourValues->GetValue(i);}
    00212
    00214
    00216 inline float *vtkContourFilter::GetValues()
    00217 {return this->ContourValues->GetValues();}
    00219
    00223 inline void vtkContourFilter::GetValues(float *contourValues)
    00224 {this->ContourValues->GetValues(contourValues);}
    00225
    00229 inline void vtkContourFilter::SetNumberOfContours(int number)
    00230 {this->ContourValues->SetNumberOfContours(number);}
    00231
    00233
    00234 inline int vtkContourFilter::GetNumberOfContours()
    00235 {return this->ContourValues->GetNumberOfContours();}
    00237
    00239
    00241 inline void vtkContourFilter::GenerateValues(int numContours, float range[2])
    00242 {this->ContourValues->GenerateValues(numContours, range);}
    00244
    00246
    00248 inline void vtkContourFilter::GenerateValues(int numContours, float
    00249                                              rangeStart, float rangeEnd)
    00250 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
    00252
    00253
    00254 #endif
    00255
    00256