1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkCollectPolyData.h,v $
6 Date: $Date: 2002/08/12 15:20:30 $
7 Version: $Revision: 1.4 $
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 vtkCollectPolyData - Collect distributed polydata.
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.
25 #ifndef __vtkCollectPolyData_h
26 #define __vtkCollectPolyData_h
28 #include "vtkPolyDataToPolyDataFilter.h"
30 class vtkMultiProcessController;
32 class VTK_PARALLEL_EXPORT vtkCollectPolyData : public vtkPolyDataToPolyDataFilter
35 static vtkCollectPolyData *New();
36 vtkTypeRevisionMacro(vtkCollectPolyData, vtkPolyDataToPolyDataFilter);
37 void PrintSelf(ostream& os, vtkIndent indent);
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);
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);
53 // This flag is set based on whether the data was collected to process 0 or not.
54 vtkGetMacro(Collected, int);
58 ~vtkCollectPolyData();
60 // Data generation method
61 void ComputeInputUpdateExtents(vtkDataObject *output);
63 void ExecuteInformation();
65 unsigned long Threshold;
68 vtkMultiProcessController *Controller;
71 vtkCollectPolyData(const vtkCollectPolyData&); // Not implemented
72 void operator=(const vtkCollectPolyData&); // Not implemented