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 =========================================================================*/
00071 #ifndef __vtkGridSynchronizedTemplates3D_h
00072 #define __vtkGridSynchronizedTemplates3D_h
00073 
00074 #include "vtkStructuredGridToPolyDataFilter.h"
00075 #include "vtkContourValues.h"
00076 #include "vtkMultiThreader.h"
00077 #include "vtkKitwareContourFilter.h"
00078 
00079 class VTK_EXPORT vtkGridSynchronizedTemplates3D : public vtkStructuredGridToPolyDataFilter
00080 {
00081 public:
00082   static vtkGridSynchronizedTemplates3D *New();
00083   vtkTypeMacro(vtkGridSynchronizedTemplates3D,vtkStructuredGridToPolyDataFilter);
00084   void PrintSelf(ostream& os, vtkIndent indent);
00085 
00087   unsigned long int GetMTime();
00088 
00093   vtkSetMacro(ComputeNormals,int);
00094   vtkGetMacro(ComputeNormals,int);
00095   vtkBooleanMacro(ComputeNormals,int);
00096 
00103   vtkSetMacro(ComputeGradients,int);
00104   vtkGetMacro(ComputeGradients,int);
00105   vtkBooleanMacro(ComputeGradients,int);
00106 
00108   vtkSetMacro(ComputeScalars,int);
00109   vtkGetMacro(ComputeScalars,int);
00110   vtkBooleanMacro(ComputeScalars,int);
00111 
00114   void SetValue(int i, float value) {this->ContourValues->SetValue(i,value);}
00115 
00117   float GetValue(int i) {return this->ContourValues->GetValue(i);}
00118 
00121   float *GetValues() {return this->ContourValues->GetValues();}
00122 
00126   void GetValues(float *contourValues) {
00127     this->ContourValues->GetValues(contourValues);}
00128 
00132   void SetNumberOfContours(int number) {
00133     this->ContourValues->SetNumberOfContours(number);}
00134 
00136   int GetNumberOfContours() {
00137     return this->ContourValues->GetNumberOfContours();}
00138 
00141   void GenerateValues(int numContours, float range[2]) {
00142     this->ContourValues->GenerateValues(numContours, range);}
00143 
00146   void GenerateValues(int numContours, float rangeStart, float rangeEnd)
00147     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00148 
00150   int *GetExecuteExtent() {return this->ExecuteExtent;}
00151   int SplitExtent(int piece, int numPieces, int *ext);
00152   void ThreadedExecute(int *exExt, int threadId);
00153 
00155   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00156   vtkGetMacro( NumberOfThreads, int );
00157 
00160   void SetInputMemoryLimit(long limit);
00161 
00162 protected:
00163   vtkGridSynchronizedTemplates3D();
00164   ~vtkGridSynchronizedTemplates3D();
00165   vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&) {};
00166   void operator=(const vtkGridSynchronizedTemplates3D&) {};
00167 
00168   int ComputeNormals;
00169   int ComputeGradients;
00170   int ComputeScalars;
00171   vtkContourValues *ContourValues;
00172 
00173   void Execute();
00174   void ExecuteInformation();
00175 
00176   void ComputeInputUpdateExtents( vtkDataObject *output );
00177 
00178   int NumberOfThreads;
00179   vtkMultiThreader *Threader;
00180   int MinimumPieceSize[3];
00181   int ExecuteExtent[6];
00182 
00183   vtkPolyData *Threads[VTK_MAX_THREADS];
00184   void InitializeOutput(int *ext,vtkPolyData *o);
00185 
00186 private:
00187   //BTX
00188   friend VTK_EXPORT vtkKitwareContourFilter;
00189   //ETX
00190 
00191 
00192 };
00193 
00194 
00195 #endif
00196 

Generated on Wed Nov 21 12:27:09 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001