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

vtkDicer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDicer.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 =========================================================================*/
00054 #ifndef __vtkDicer_h
00055 #define __vtkDicer_h
00056 
00057 #include "vtkDataSetToDataSetFilter.h"
00058 
00059 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
00060 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
00061 #define VTK_DICE_MODE_MEMORY_LIMIT 2
00062 
00063 class VTK_GRAPHICS_EXPORT vtkDicer : public vtkDataSetToDataSetFilter 
00064 {
00065 public:
00066   vtkTypeRevisionMacro(vtkDicer,vtkDataSetToDataSetFilter);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068 
00070 
00075   vtkSetMacro(FieldData,int);
00076   vtkGetMacro(FieldData,int);
00077   vtkBooleanMacro(FieldData,int);
00079 
00081 
00083   vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
00084   vtkGetMacro(DiceMode,int);
00085   void SetDiceModeToNumberOfPointsPerPiece()
00086     {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
00087   void SetDiceModeToSpecifiedNumberOfPieces()
00088     {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
00089   void SetDiceModeToMemoryLimitPerPiece()
00090     {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
00092 
00094 
00096   vtkGetMacro(NumberOfActualPieces,int);
00098 
00100 
00103   vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
00104   vtkGetMacro(NumberOfPointsPerPiece,int);
00106 
00108 
00113   vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
00114   vtkGetMacro(NumberOfPieces,int);
00116 
00118 
00121   vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
00122   vtkGetMacro(MemoryLimit,unsigned long);
00124 
00125 protected:
00126   vtkDicer();
00127   ~vtkDicer() {};
00128 
00129   virtual void UpdatePieceMeasures();
00130 
00131   int           NumberOfPointsPerPiece;
00132   int           NumberOfPieces;
00133   unsigned long MemoryLimit;
00134   int           NumberOfActualPieces;
00135   int           FieldData;
00136   int           DiceMode;
00137 
00138 private:
00139   vtkDicer(const vtkDicer&);  // Not implemented.
00140   void operator=(const vtkDicer&);  // Not implemented.
00141 };
00142 
00143 #endif
00144 
00145