VTK
vtkProcessIdScalars.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProcessIdScalars.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkProcessIdScalars_h
29 #define vtkProcessIdScalars_h
30 
31 #include "vtkFiltersParallelModule.h" // For export macro
32 #include "vtkDataSetAlgorithm.h"
33 
34 class vtkFloatArray;
35 class vtkIntArray;
37 
38 class VTKFILTERSPARALLEL_EXPORT vtkProcessIdScalars : public vtkDataSetAlgorithm
39 {
40 public:
42 
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
50  void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
51  void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
52  int GetScalarMode() {return this->CellScalarsFlag;}
53 
54  // Dscription:
55  // This option uses a random mapping between pieces and scalar values.
56  // The scalar values are chosen between 0 and 1. By default, random
57  // mode is off.
58  vtkSetMacro(RandomMode, int);
59  vtkGetMacro(RandomMode, int);
60  vtkBooleanMacro(RandomMode, int);
61 
63 
68  vtkGetObjectMacro(Controller, vtkMultiProcessController);
70 
71 
72 protected:
75 
76  // Append the pieces.
79 
80  vtkIntArray *MakeProcessIdScalars(int piece, vtkIdType numScalars);
81  vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
82 
83  vtkSetMacro(CellScalarsFlag,int);
86 
88 
89 private:
90  vtkProcessIdScalars(const vtkProcessIdScalars&) VTK_DELETE_FUNCTION;
91  void operator=(const vtkProcessIdScalars&) VTK_DELETE_FUNCTION;
92 };
93 
94 #endif
vtkProcessIdScalars::New
static vtkProcessIdScalars * New()
vtkProcessIdScalars::GetScalarMode
int GetScalarMode()
Definition: vtkProcessIdScalars.h:52
vtkProcessIdScalars::~vtkProcessIdScalars
~vtkProcessIdScalars()
vtkProcessIdScalars::MakeProcessIdScalars
vtkIntArray * MakeProcessIdScalars(int piece, vtkIdType numScalars)
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkProcessIdScalars::MakeRandomScalars
vtkFloatArray * MakeRandomScalars(int piece, vtkIdType numScalars)
vtkProcessIdScalars::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:52
vtkProcessIdScalars
Sets cell or point scalars to the processor rank.
Definition: vtkProcessIdScalars.h:39
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:83
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
vtkProcessIdScalars::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkProcessIdScalars::SetController
virtual void SetController(vtkMultiProcessController *)
By defualt this filter uses the global controller, but this method can be used to set another instead...
vtkProcessIdScalars::vtkProcessIdScalars
vtkProcessIdScalars()
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkProcessIdScalars::SetScalarModeToCellData
void SetScalarModeToCellData()
Option to centerate cell scalars of points scalars.
Definition: vtkProcessIdScalars.h:50
vtkProcessIdScalars::CellScalarsFlag
int CellScalarsFlag
Definition: vtkProcessIdScalars.h:83
vtkDataSetAlgorithm.h
vtkProcessIdScalars::RandomMode
int RandomMode
Definition: vtkProcessIdScalars.h:85
vtkProcessIdScalars::Controller
vtkMultiProcessController * Controller
Definition: vtkProcessIdScalars.h:87
vtkProcessIdScalars::SetScalarModeToPointData
void SetScalarModeToPointData()
Definition: vtkProcessIdScalars.h:51