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

Hybrid/vtkImplicitModeller.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitModeller.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00105 #ifndef __vtkImplicitModeller_h
00106 #define __vtkImplicitModeller_h
00107 
00108 #include "vtkDataSetToStructuredPointsFilter.h"
00109 
00110 #define VTK_VOXEL_MODE   0
00111 #define VTK_CELL_MODE    1
00112 
00113 class vtkMultiThreader;
00114 class vtkExtractGeometry;
00115 
00116 class VTK_HYBRID_EXPORT vtkImplicitModeller : public vtkDataSetToStructuredPointsFilter 
00117 {
00118 public:
00119   vtkTypeMacro(vtkImplicitModeller,vtkDataSetToStructuredPointsFilter);
00120   void PrintSelf(ostream& os, vtkIndent indent);
00121 
00125   static vtkImplicitModeller *New();
00126 
00129   float ComputeModelBounds(vtkDataSet *input = NULL);
00130 
00132 
00133   vtkGetVectorMacro(SampleDimensions,int,3);
00134   void SetSampleDimensions(int i, int j, int k);
00135   void SetSampleDimensions(int dim[3]);
00137 
00139 
00141   vtkSetClampMacro(MaximumDistance,float,0.0,1.0);
00142   vtkGetMacro(MaximumDistance,float);
00144 
00146 
00148   vtkSetVector6Macro(ModelBounds,float);
00149   vtkGetVectorMacro(ModelBounds,float,6);
00151 
00153 
00157   vtkSetMacro(AdjustBounds,int);
00158   vtkGetMacro(AdjustBounds,int);
00159   vtkBooleanMacro(AdjustBounds,int);
00161   
00163 
00166   vtkSetClampMacro(AdjustDistance,float,-1.0,1.0);
00167   vtkGetMacro(AdjustDistance,float);
00169 
00171 
00173   vtkSetMacro(Capping,int);
00174   vtkGetMacro(Capping,int);
00175   vtkBooleanMacro(Capping,int);
00177   
00179 
00181   vtkSetMacro(CapValue,float);
00182   vtkGetMacro(CapValue,float);
00184 
00186 
00191   vtkSetClampMacro(ProcessMode, int, 0, 1);
00192   vtkGetMacro(ProcessMode, int);
00193   void SetProcessModeToPerVoxel() {this->SetProcessMode(VTK_VOXEL_MODE);}
00194   void SetProcessModeToPerCell()  {this->SetProcessMode(VTK_CELL_MODE);}
00195   const char *GetProcessModeAsString(void);
00197 
00199 
00201   vtkSetMacro(LocatorMaxLevel,int);
00202   vtkGetMacro(LocatorMaxLevel,int);
00204 
00206 
00207   vtkSetMacro( NumberOfThreads, int );
00208   vtkGetMacro( NumberOfThreads, int );
00210 
00215   void StartAppend();
00216 
00222   void Append(vtkDataSet *input);
00223 
00225   void EndAppend();
00226 
00227   virtual void UpdateData(vtkDataObject *output);
00228 
00229 protected:
00230   vtkImplicitModeller();
00231   ~vtkImplicitModeller();
00232 
00233   void Execute();
00234   void ExecuteInformation();
00235   
00236   void Cap(vtkDataArray *s);
00237 
00238   vtkMultiThreader *Threader;
00239   int              NumberOfThreads;
00240 
00241   int SampleDimensions[3];
00242   float MaximumDistance;
00243   float ModelBounds[6];
00244   int Capping;
00245   float CapValue;
00246   int DataAppended;
00247   int AdjustBounds;
00248   float AdjustDistance;
00249   int ProcessMode;
00250   int LocatorMaxLevel;
00251 
00252   int BoundsComputed; // flag to limit to one ComputeModelBounds per StartAppend
00253   float InternalMaxDistance; // the max distance computed during that one call
00254 private:
00255   vtkImplicitModeller(const vtkImplicitModeller&);  // Not implemented.
00256   void operator=(const vtkImplicitModeller&);  // Not implemented.
00257 };
00258 
00259 #endif
00260 
00261 

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