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

vtkPieceScalars.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPieceScalars.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00043 #ifndef __vtkPieceScalars_h
00044 #define __vtkPieceScalars_h
00045 
00046 #include "vtkDataSetToDataSetFilter.h"
00047 
00048 class vtkFloatArray;
00049 class vtkIntArray;
00050 
00051 class VTK_PARALLEL_EXPORT vtkPieceScalars : public vtkDataSetToDataSetFilter
00052 {
00053 public:
00054   static vtkPieceScalars *New();
00055 
00056   vtkTypeRevisionMacro(vtkPieceScalars,vtkDataSetToDataSetFilter);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00062   void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
00063   void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
00064   int GetScalarMode() {return this->CellScalarsFlag;}
00066   
00067   // Dscription:
00068   // This option uses a random mapping between pieces and scalar values.
00069   // The scalar values are choosen between 0 and 1.  By default, random mode is off.
00070   vtkSetMacro(RandomMode, int);
00071   vtkGetMacro(RandomMode, int);
00072   vtkBooleanMacro(RandomMode, int);
00073   
00074 protected:
00075   vtkPieceScalars();
00076   ~vtkPieceScalars();
00077   
00078   // Append the pieces.
00079   void Execute();
00080   
00081   vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars);
00082   vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
00083   
00084   vtkSetMacro(CellScalarsFlag,int);
00085   int CellScalarsFlag;
00086   int RandomMode;
00087 private:
00088   vtkPieceScalars(const vtkPieceScalars&);  // Not implemented.
00089   void operator=(const vtkPieceScalars&);  // Not implemented.
00090 };
00091 
00092 #endif