Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImplicitModeller.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitModeller.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00090 #ifndef __vtkImplicitModeller_h
00091 #define __vtkImplicitModeller_h
00092 
00093 #include "vtkDataSetToImageFilter.h"
00094 
00095 #define VTK_VOXEL_MODE   0
00096 #define VTK_CELL_MODE    1
00097 
00098 class vtkDataArray;
00099 class vtkExtractGeometry;
00100 class vtkMultiThreader;
00101 
00102 class VTK_HYBRID_EXPORT vtkImplicitModeller : public vtkDataSetToImageFilter 
00103 {
00104 public:
00105   vtkTypeRevisionMacro(vtkImplicitModeller,vtkDataSetToImageFilter);
00106   void PrintSelf(ostream& os, vtkIndent indent);
00107 
00111   static vtkImplicitModeller *New();
00112 
00115   double ComputeModelBounds(vtkDataSet *input = NULL);
00116 
00118 
00119   vtkGetVectorMacro(SampleDimensions,int,3);
00120   void SetSampleDimensions(int i, int j, int k);
00121   void SetSampleDimensions(int dim[3]);
00123 
00125 
00127   vtkSetClampMacro(MaximumDistance,double,0.0,1.0);
00128   vtkGetMacro(MaximumDistance,double);
00130 
00132 
00134   vtkSetVector6Macro(ModelBounds,double);
00135   vtkGetVectorMacro(ModelBounds,double,6);
00137 
00139 
00143   vtkSetMacro(AdjustBounds,int);
00144   vtkGetMacro(AdjustBounds,int);
00145   vtkBooleanMacro(AdjustBounds,int);
00147   
00149 
00152   vtkSetClampMacro(AdjustDistance,double,-1.0,1.0);
00153   vtkGetMacro(AdjustDistance,double);
00155 
00157 
00159   vtkSetMacro(Capping,int);
00160   vtkGetMacro(Capping,int);
00161   vtkBooleanMacro(Capping,int);
00163   
00165 
00167   vtkSetMacro(CapValue,double);
00168   vtkGetMacro(CapValue,double);
00170 
00172 
00177   vtkSetClampMacro(ProcessMode, int, 0, 1);
00178   vtkGetMacro(ProcessMode, int);
00179   void SetProcessModeToPerVoxel() {this->SetProcessMode(VTK_VOXEL_MODE);}
00180   void SetProcessModeToPerCell()  {this->SetProcessMode(VTK_CELL_MODE);}
00181   const char *GetProcessModeAsString(void);
00183 
00185 
00187   vtkSetMacro(LocatorMaxLevel,int);
00188   vtkGetMacro(LocatorMaxLevel,int);
00190 
00192 
00193   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00194   vtkGetMacro( NumberOfThreads, int );
00196 
00201   void StartAppend();
00202 
00208   void Append(vtkDataSet *input);
00209 
00211   void EndAppend();
00212 
00213   virtual void UpdateData(vtkDataObject *output);
00214 
00215   // See the vtkAlgorithm for a desciption of what these do
00216   int ProcessRequest(vtkInformation*,
00217                      vtkInformationVector*,
00218                      vtkInformationVector*);
00219 
00220 protected:
00221   vtkImplicitModeller();
00222   ~vtkImplicitModeller();
00223 
00224   void ExecuteData(vtkDataObject *);
00225   void ExecuteInformation();
00226   
00227   void Cap(vtkDataArray *s);
00228 
00229   vtkMultiThreader *Threader;
00230   int              NumberOfThreads;
00231 
00232   int SampleDimensions[3];
00233   double MaximumDistance;
00234   double ModelBounds[6];
00235   int Capping;
00236   double CapValue;
00237   int DataAppended;
00238   int AdjustBounds;
00239   double AdjustDistance;
00240   int ProcessMode;
00241   int LocatorMaxLevel;
00242 
00243   int BoundsComputed; // flag to limit to one ComputeModelBounds per StartAppend
00244   double InternalMaxDistance; // the max distance computed during that one call
00245 
00246   virtual int FillInputPortInformation(int, vtkInformation*);
00247 private:
00248   vtkImplicitModeller(const vtkImplicitModeller&);  // Not implemented.
00249   void operator=(const vtkImplicitModeller&);  // Not implemented.
00250 };
00251 
00252 #endif
00253 
00254