OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkCollectPolyData.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkCollectPolyData.h,v $
5   Language:  C++
6   Date:      $Date: 2002/08/12 15:20:30 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
17 =========================================================================*/
18 // .NAME vtkCollectPolyData - Collect distributed polydata.
19 // .DESCRIPTION
20 // This filter has code to collect polydat from across processes onto node 0.
21 // This collection can be controlled by the size of the data.  If the
22 // final data size will be above the threshold, then it will not be collected.
23
24
25 #ifndef __vtkCollectPolyData_h
26 #define __vtkCollectPolyData_h
27
28 #include "vtkPolyDataToPolyDataFilter.h"
29
30 class vtkMultiProcessController;
31
32 class VTK_PARALLEL_EXPORT vtkCollectPolyData : public vtkPolyDataToPolyDataFilter
33 {
34 public:
35   static vtkCollectPolyData *New();
36   vtkTypeRevisionMacro(vtkCollectPolyData, vtkPolyDataToPolyDataFilter);
37   void PrintSelf(ostream& os, vtkIndent indent);
38   
39   // Description:
40   // By defualt this filter uses the global controller,
41   // but this method can be used to set another instead.
42   virtual void SetController(vtkMultiProcessController*);
43   vtkGetObjectMacro(Controller, vtkMultiProcessController);
44
45   // Description:
46   // Threshold that determines whether data will be collected.
47   // If the total size of the data in kilobytes is less than this threshold, 
48   // then the data remains distributed.
49   vtkSetMacro(Threshold, unsigned long);
50   vtkGetMacro(Threshold, unsigned long);
51   
52   // Description:
53   // This flag is set based on whether the data was collected to process 0 or not.
54   vtkGetMacro(Collected, int);
55
56 protected:
57   vtkCollectPolyData();
58   ~vtkCollectPolyData();
59
60   // Data generation method
61   void ComputeInputUpdateExtents(vtkDataObject *output);
62   void Execute();
63   void ExecuteInformation();
64
65   unsigned long Threshold;
66   int Collected;
67
68   vtkMultiProcessController *Controller;
69
70 private:
71   vtkCollectPolyData(const vtkCollectPolyData&); // Not implemented
72   void operator=(const vtkCollectPolyData&); // Not implemented
73 };
74
75 #endif