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