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

Graphics/vtkDicer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDicer.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00058 #ifndef __vtkDicer_h
00059 #define __vtkDicer_h
00060 
00061 #include "vtkDataSetToDataSetFilter.h"
00062 
00063 #define VTK_DICE_MODE_NUMBER_OF_POINTS 0
00064 #define VTK_DICE_MODE_SPECIFIED_NUMBER 1
00065 #define VTK_DICE_MODE_MEMORY_LIMIT 2
00066 
00067 class VTK_GRAPHICS_EXPORT vtkDicer : public vtkDataSetToDataSetFilter 
00068 {
00069 public:
00070   vtkTypeRevisionMacro(vtkDicer,vtkDataSetToDataSetFilter);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072 
00074 
00079   vtkSetMacro(FieldData,int);
00080   vtkGetMacro(FieldData,int);
00081   vtkBooleanMacro(FieldData,int);
00083 
00085 
00087   vtkSetClampMacro(DiceMode,int,VTK_DICE_MODE_NUMBER_OF_POINTS,VTK_DICE_MODE_MEMORY_LIMIT);
00088   vtkGetMacro(DiceMode,int);
00089   void SetDiceModeToNumberOfPointsPerPiece()
00090     {this->SetDiceMode(VTK_DICE_MODE_NUMBER_OF_POINTS);};
00091   void SetDiceModeToSpecifiedNumberOfPieces()
00092     {this->SetDiceMode(VTK_DICE_MODE_SPECIFIED_NUMBER);};
00093   void SetDiceModeToMemoryLimitPerPiece()
00094     {this->SetDiceMode(VTK_DICE_MODE_MEMORY_LIMIT);};
00096 
00098 
00100   vtkGetMacro(NumberOfActualPieces,int);
00102 
00104 
00107   vtkSetClampMacro(NumberOfPointsPerPiece,int,1000,VTK_LARGE_INTEGER);
00108   vtkGetMacro(NumberOfPointsPerPiece,int);
00110 
00112 
00117   vtkSetClampMacro(NumberOfPieces,int,1,VTK_LARGE_INTEGER);
00118   vtkGetMacro(NumberOfPieces,int);
00120 
00122 
00125   vtkSetClampMacro(MemoryLimit,unsigned long,100,VTK_LARGE_INTEGER);
00126   vtkGetMacro(MemoryLimit,unsigned long);
00128 
00129 protected:
00130   vtkDicer();
00131   ~vtkDicer() {};
00132 
00133   virtual void UpdatePieceMeasures();
00134 
00135   int           NumberOfPointsPerPiece;
00136   int           NumberOfPieces;
00137   unsigned long MemoryLimit;
00138   int           NumberOfActualPieces;
00139   int           FieldData;
00140   int           DiceMode;
00141 
00142 private:
00143   vtkDicer(const vtkDicer&);  // Not implemented.
00144   void operator=(const vtkDicer&);  // Not implemented.
00145 };
00146 
00147 #endif
00148 
00149