VTK
vtkPieceScalars.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPieceScalars.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 vtkPieceScalars_h
29 #define vtkPieceScalars_h
30 
31 #include "vtkFiltersParallelModule.h" // For export macro
32 #include "vtkDataSetAlgorithm.h"
33 
34 class vtkFloatArray;
35 class vtkIntArray;
36 
37 class VTKFILTERSPARALLEL_EXPORT vtkPieceScalars : public vtkDataSetAlgorithm
38 {
39 public:
40  static vtkPieceScalars *New();
41 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
48  void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
49  void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
50  int GetScalarMode() {return this->CellScalarsFlag;}
51 
52  // Dscription:
53  // This option uses a random mapping between pieces and scalar values.
54  // The scalar values are chosen between 0 and 1. By default, random mode is off.
55  vtkSetMacro(RandomMode, vtkTypeBool);
56  vtkGetMacro(RandomMode, vtkTypeBool);
57  vtkBooleanMacro(RandomMode, vtkTypeBool);
58 
59 protected:
61  ~vtkPieceScalars() override;
62 
63  // Append the pieces.
65 
66  vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars);
67  vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
68 
69  vtkSetMacro(CellScalarsFlag,int);
70  int CellScalarsFlag;
72 private:
73  vtkPieceScalars(const vtkPieceScalars&) = delete;
74  void operator=(const vtkPieceScalars&) = delete;
75 };
76 
77 #endif
void SetScalarModeToCellData()
Option to centerate cell scalars of points scalars.
vtkTypeBool RandomMode
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:35
int vtkIdType
Definition: vtkType.h:347
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
a simple class to control print indentation
Definition: vtkIndent.h:33
Sets all cell scalars from the update piece.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetScalarModeToPointData()
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()