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

# Patented/vtkMarchingContourFilter.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkMarchingContourFilter.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      THIS CLASS IS PATENTED UNDER UNITED STATES PATENT NUMBER 4,710,876
    00016      "System and Method for the Display of Surface Structures Contained
    00017      Within the Interior Region of a Solid Body".
    00018      Application of this software for commercial purposes requires
    00019      a license grant from GE. Contact:
    00020
    00021          Carl B. Horton
    00022          Sr. Counsel, Intellectual Property
    00023          3000 N. Grandview Blvd., W-710
    00024          Waukesha, WI  53188
    00025          Phone:  (262) 513-4022
    00026          E-Mail: Carl.Horton@med.ge.com
    00027
    00028      for more information.
    00029
    00030 =========================================================================*/
    00087 #ifndef __vtkMarchingContourFilter_h
    00088 #define __vtkMarchingContourFilter_h
    00089
    00090 #include "vtkDataSetToPolyDataFilter.h"
    00091
    00092 #include "vtkContourValues.h" // Needed for direct access to ContourValues
    00093
    00094 class vtkPointLocator;
    00095 class vtkScalarTree;
    00096
    00097 class VTK_PATENTED_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
    00098 {
    00099 public:
    00100   vtkTypeRevisionMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
    00101   void PrintSelf(ostream& os, vtkIndent indent);
    00102
    00105   static vtkMarchingContourFilter *New();
    00106
    00108
    00109   void SetValue(int i, float value);
    00110   float GetValue(int i);
    00111   float *GetValues();
    00112   void GetValues(float *contourValues);
    00113   void SetNumberOfContours(int number);
    00114   int GetNumberOfContours();
    00115   void GenerateValues(int numContours, float range[2]);
    00116   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
    00118
    00120   unsigned long GetMTime();
    00121
    00123
    00127   vtkSetMacro(ComputeNormals,int);
    00128   vtkGetMacro(ComputeNormals,int);
    00129   vtkBooleanMacro(ComputeNormals,int);
    00131
    00133
    00139   vtkSetMacro(ComputeGradients,int);
    00140   vtkGetMacro(ComputeGradients,int);
    00141   vtkBooleanMacro(ComputeGradients,int);
    00143
    00145
    00146   vtkSetMacro(ComputeScalars,int);
    00147   vtkGetMacro(ComputeScalars,int);
    00148   vtkBooleanMacro(ComputeScalars,int);
    00150
    00152
    00153   vtkSetMacro(UseScalarTree,int);
    00154   vtkGetMacro(UseScalarTree,int);
    00155   vtkBooleanMacro(UseScalarTree,int);
    00157
    00159
    00161   void SetLocator(vtkPointLocator *locator);
    00162   vtkGetObjectMacro(Locator,vtkPointLocator);
    00164
    00167   void CreateDefaultLocator();
    00168
    00169 protected:
    00170   vtkMarchingContourFilter();
    00171   ~vtkMarchingContourFilter();
    00172
    00173   void Execute();
    00174
    00175   vtkContourValues *ContourValues;
    00176   int ComputeNormals;
    00177   int ComputeGradients;
    00178   int ComputeScalars;
    00179   vtkPointLocator *Locator;
    00180   int UseScalarTree;
    00181   vtkScalarTree *ScalarTree;
    00182
    00183   //special contouring for structured points
    00184   void StructuredPointsContour(int dim);
    00185   //special contouring for image data
    00186   void ImageContour(int dim);
    00187   //default if not structured data
    00188   void DataSetContour();
    00189 private:
    00190   vtkMarchingContourFilter(const vtkMarchingContourFilter&);  // Not implemented.
    00191   void operator=(const vtkMarchingContourFilter&);  // Not implemented.
    00192 };
    00193
    00196 inline void vtkMarchingContourFilter::SetValue(int i, float value)
    00197 {
    00198   this->ContourValues->SetValue(i,value);
    00199 }
    00200
    00202 inline float vtkMarchingContourFilter::GetValue(int i)
    00203 {
    00204   return this->ContourValues->GetValue(i);
    00205 }
    00206
    00209 inline float *vtkMarchingContourFilter::GetValues()
    00210 {
    00211   return this->ContourValues->GetValues();
    00212 }
    00213
    00217 inline void vtkMarchingContourFilter::GetValues(float *contourValues)
    00218 {
    00219   this->ContourValues->GetValues(contourValues);
    00220 }
    00221
    00225 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
    00226 {
    00227   this->ContourValues->SetNumberOfContours(number);
    00228 }
    00229
    00231 inline int vtkMarchingContourFilter::GetNumberOfContours()
    00232 {
    00233   return this->ContourValues->GetNumberOfContours();
    00234 }
    00235
    00237
    00239 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
    00240                                                      float range[2])
    00242 {
    00243   this->ContourValues->GenerateValues(numContours, range);
    00244 }
    00245
    00247
    00249 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
    00250                                                      float rangeStart,
    00251                                                      float rangeEnd)
    00253 {
    00254   this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
    00255 }
    00256
    00257 #endif