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

Parallel/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 =========================================================================*/
00028 #ifndef __vtkPieceScalars_h
00029 #define __vtkPieceScalars_h
00030 
00031 #include "vtkDataSetToDataSetFilter.h"
00032 
00033 class vtkFloatArray;
00034 class vtkIntArray;
00035 
00036 class VTK_PARALLEL_EXPORT vtkPieceScalars : public vtkDataSetToDataSetFilter
00037 {
00038 public:
00039   static vtkPieceScalars *New();
00040 
00041   vtkTypeRevisionMacro(vtkPieceScalars,vtkDataSetToDataSetFilter);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00047   void SetScalarModeToCellData() {this->SetCellScalarsFlag(1);}
00048   void SetScalarModeToPointData() {this->SetCellScalarsFlag(0);}
00049   int GetScalarMode() {return this->CellScalarsFlag;}
00051   
00052   // Dscription:
00053   // This option uses a random mapping between pieces and scalar values.
00054   // The scalar values are choosen between 0 and 1.  By default, random mode is off.
00055   vtkSetMacro(RandomMode, int);
00056   vtkGetMacro(RandomMode, int);
00057   vtkBooleanMacro(RandomMode, int);
00058   
00059 protected:
00060   vtkPieceScalars();
00061   ~vtkPieceScalars();
00062   
00063   // Append the pieces.
00064   void Execute();
00065   
00066   vtkIntArray *MakePieceScalars(int piece, vtkIdType numScalars);
00067   vtkFloatArray *MakeRandomScalars(int piece, vtkIdType numScalars);
00068   
00069   vtkSetMacro(CellScalarsFlag,int);
00070   int CellScalarsFlag;
00071   int RandomMode;
00072 private:
00073   vtkPieceScalars(const vtkPieceScalars&);  // Not implemented.
00074   void operator=(const vtkPieceScalars&);  // Not implemented.
00075 };
00076 
00077 #endif