1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkPieceScalars.h,v $
6 Date: $Date: 2002/09/30 20:35:49 $
7 Version: $Revision: 1.11 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkPieceScalars - Sets all cell scalars from the update piece.
19 // .SECTION Description
20 // vtkPieceScalars is meant to display which piece is being requested
21 // as scalar values. It is usefull for visualizing the partioning for
22 // streaming or distributed pipelines.
24 // vtkPolyDataStreamer
26 #ifndef __vtkPieceScalars_h
27 #define __vtkPieceScalars_h
29 #include "vtkDataSetToDataSetFilter.h"
34 class VTK_PARALLEL_EXPORT vtkPieceScalars : public vtkDataSetToDataSetFilter
37 static vtkPieceScalars *New();
39 vtkTypeRevisionMacro(vtkPieceScalars,vtkDataSetToDataSetFilter);
40 void PrintSelf(ostream& os, vtkIndent indent);
43 // Option to centerate cell scalars of poi9nts scalars. Default is point scalars.
44 void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
45 void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
46 int GetScalarMode() {return this->CellScalarsFlag;}
49 // This option uses a random mapping between pieces and scalar values.
50 // The scalar values are choosen between 0 and 1. By default, random mode is off.
51 vtkSetMacro(RandomMode, int);
52 vtkGetMacro(RandomMode, int);
53 vtkBooleanMacro(RandomMode, int);
62 vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars);
63 vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
65 vtkSetMacro(CellScalarsFlag,int);
69 vtkPieceScalars(const vtkPieceScalars&); // Not implemented.
70 void operator=(const vtkPieceScalars&); // Not implemented.