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