VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/General/vtkDicer.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDicer.h
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 =========================================================================*/
00043 #ifndef vtkDicer_h
00044 #define vtkDicer_h
00045 
00046 #include "vtkFiltersGeneralModule.h" // For export macro
00047 #include "vtkDataSetAlgorithm.h"
00048 
00049 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
00050 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
00051 #define VTK_DICE_MODE_MEMORY_LIMIT 2
00052 
00053 class VTKFILTERSGENERAL_EXPORT vtkDicer : public vtkDataSetAlgorithm
00054 {
00055 public:
00056   vtkTypeMacro(vtkDicer,vtkDataSetAlgorithm);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00065   vtkSetMacro(FieldData,int);
00066   vtkGetMacro(FieldData,int);
00067   vtkBooleanMacro(FieldData,int);
00069 
00071 
00073   vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
00074   vtkGetMacro(DiceMode,int);
00075   void SetDiceModeToNumberOfPointsPerPiece()
00076     {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
00077   void SetDiceModeToSpecifiedNumberOfPieces()
00078     {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
00079   void SetDiceModeToMemoryLimitPerPiece()
00080     {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
00082 
00084 
00086   vtkGetMacro(NumberOfActualPieces,int);
00088 
00090 
00093   vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_INT_MAX);
00094   vtkGetMacro(NumberOfPointsPerPiece,int);
00096 
00098 
00103   vtkSetClampMacro(NumberOfPieces,int,1,VTK_INT_MAX);
00104   vtkGetMacro(NumberOfPieces,int);
00106 
00108 
00111   vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_INT_MAX);
00112   vtkGetMacro(MemoryLimit,unsigned long);
00114 
00115 protected:
00116   vtkDicer();
00117   ~vtkDicer() {}
00118 
00119   virtual void UpdatePieceMeasures(vtkDataSet *input);
00120 
00121   int           NumberOfPointsPerPiece;
00122   int           NumberOfPieces;
00123   unsigned long MemoryLimit;
00124   int           NumberOfActualPieces;
00125   int           FieldData;
00126   int           DiceMode;
00127 
00128 private:
00129   vtkDicer(const vtkDicer&);  // Not implemented.
00130   void operator=(const vtkDicer&);  // Not implemented.
00131 };
00132 
00133 #endif
00134 
00135