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

dox/Parallel/vtkPieceScalars.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPieceScalars.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 =========================================================================*/ 00032 #ifndef __vtkPieceScalars_h 00033 #define __vtkPieceScalars_h 00034 00035 #include "vtkDataSetToDataSetFilter.h" 00036 00037 class vtkFloatArray; 00038 class vtkIntArray; 00039 00040 class VTK_PARALLEL_EXPORT vtkPieceScalars : public vtkDataSetToDataSetFilter 00041 { 00042 public: 00043 static vtkPieceScalars *New(); 00044 00045 vtkTypeRevisionMacro(vtkPieceScalars,vtkDataSetToDataSetFilter); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00051 void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);} 00052 void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);} 00053 int GetScalarMode() {return this->CellScalarsFlag;} 00055 00056 // Dscription: 00057 // This option uses a random mapping between pieces and scalar values. 00058 // The scalar values are choosen between 0 and 1. By default, random mode is off. 00059 vtkSetMacro(RandomMode, int); 00060 vtkGetMacro(RandomMode, int); 00061 vtkBooleanMacro(RandomMode, int); 00062 00063 protected: 00064 vtkPieceScalars(); 00065 ~vtkPieceScalars(); 00066 00067 // Append the pieces. 00068 void Execute(); 00069 00070 vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars); 00071 vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars); 00072 00073 vtkSetMacro(CellScalarsFlag,int); 00074 int CellScalarsFlag; 00075 int RandomMode; 00076 private: 00077 vtkPieceScalars(const vtkPieceScalars&); // Not implemented. 00078 void operator=(const vtkPieceScalars&); // Not implemented. 00079 }; 00080 00081 #endif