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

Patented/vtkGridSynchronizedTemplates3D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGridSynchronizedTemplates3D.h,v $
00005   Language:  C++
00006 
00007 
00008 
00009 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00010 All rights reserved.
00011 
00012     THIS CLASS IS PATENT PENDING.
00013 
00014     Application of this software for commercial purposes requires 
00015     a license grant from Kitware. Contact:
00016         Ken Martin
00017         Kitware
00018         469 Clifton Corporate Parkway,
00019         Clifton Park, NY 12065
00020         Phone:1-518-371-3971 
00021     for more information.
00022 
00023 Redistribution and use in source and binary forms, with or without
00024 modification, are permitted provided that the following conditions are met:
00025 
00026  * Redistributions of source code must retain the above copyright notice,
00027    this list of conditions and the following disclaimer.
00028 
00029  * Redistributions in binary form must reproduce the above copyright notice,
00030    this list of conditions and the following disclaimer in the documentation
00031    and/or other materials provided with the distribution.
00032 
00033  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00034    of any contributors may be used to endorse or promote products derived
00035    from this software without specific prior written permission.
00036 
00037  * Modified source versions must be plainly marked as such, and must not be
00038    misrepresented as being the original software.
00039 
00040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00041 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00042 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00043 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00044 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00045 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00046 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00047 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00048 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00049 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00050 
00051 =========================================================================*/
00069 #ifndef __vtkGridSynchronizedTemplates3D_h
00070 #define __vtkGridSynchronizedTemplates3D_h
00071 
00072 #include "vtkStructuredGridToPolyDataFilter.h"
00073 #include "vtkContourValues.h"
00074 #include "vtkMultiThreader.h"
00075 #include "vtkKitwareContourFilter.h"
00076 
00077 class VTK_PATENTED_EXPORT vtkGridSynchronizedTemplates3D : public vtkStructuredGridToPolyDataFilter
00078 {
00079 public:
00080   static vtkGridSynchronizedTemplates3D *New();
00081   vtkTypeMacro(vtkGridSynchronizedTemplates3D,vtkStructuredGridToPolyDataFilter);
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083 
00085   unsigned long int GetMTime();
00086 
00088 
00092   vtkSetMacro(ComputeNormals,int);
00093   vtkGetMacro(ComputeNormals,int);
00094   vtkBooleanMacro(ComputeNormals,int);
00096 
00098 
00104   vtkSetMacro(ComputeGradients,int);
00105   vtkGetMacro(ComputeGradients,int);
00106   vtkBooleanMacro(ComputeGradients,int);
00108 
00110 
00111   vtkSetMacro(ComputeScalars,int);
00112   vtkGetMacro(ComputeScalars,int);
00113   vtkBooleanMacro(ComputeScalars,int);
00115 
00118   void SetValue(int i, float value) {this->ContourValues->SetValue(i,value);}
00119 
00121   float GetValue(int i) {return this->ContourValues->GetValue(i);}
00122 
00125   float *GetValues() {return this->ContourValues->GetValues();}
00126 
00128 
00131   void GetValues(float *contourValues) {
00132     this->ContourValues->GetValues(contourValues);}
00134 
00136 
00139   void SetNumberOfContours(int number) {
00140     this->ContourValues->SetNumberOfContours(number);}
00142 
00144 
00145   int GetNumberOfContours() {
00146     return this->ContourValues->GetNumberOfContours();}
00148 
00150 
00152   void GenerateValues(int numContours, float range[2]) {
00153     this->ContourValues->GenerateValues(numContours, range);}
00155 
00157 
00159   void GenerateValues(int numContours, float rangeStart, float rangeEnd)
00160     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00162 
00164 
00165   int *GetExecuteExtent() {return this->ExecuteExtent;}
00166   void ThreadedExecute(int *exExt, int threadId);
00168 
00170 
00171   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00172   vtkGetMacro( NumberOfThreads, int );
00174 
00177   void SetInputMemoryLimit(long limit);
00178 
00179 protected:
00180   vtkGridSynchronizedTemplates3D();
00181   ~vtkGridSynchronizedTemplates3D();
00182 
00183   int ComputeNormals;
00184   int ComputeGradients;
00185   int ComputeScalars;
00186   vtkContourValues *ContourValues;
00187 
00188   void Execute();
00189   void ExecuteInformation();
00190 
00191   void ComputeInputUpdateExtents( vtkDataObject *output );
00192 
00193   int NumberOfThreads;
00194   vtkMultiThreader *Threader;
00195   int MinimumPieceSize[3];
00196   int ExecuteExtent[6];
00197 
00198   vtkPolyData *Threads[VTK_MAX_THREADS];
00199   void InitializeOutput(int *ext,vtkPolyData *o);
00200 
00201 private:
00202   //BTX
00203   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00204   //ETX
00205 private:
00206   vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
00207   void operator=(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
00208 };
00209 
00210 
00211 #endif

Generated on Thu Mar 28 14:19:31 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001