AppendF.hh 3.43 KB
Newer Older
Will Schroeder's avatar
Will Schroeder committed
1
2
/*=========================================================================

Ken Martin's avatar
Ken Martin committed
3
  Program:   Visualization Toolkit
Will Schroeder's avatar
Will Schroeder committed
4
5
6
7
8
  Module:    AppendF.hh
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

Ken Martin's avatar
Ken Martin committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

Copyright (c) 1993-1995 Ken Martin, Will Schroeder, Bill Lorensen.

This software is copyrighted by Ken Martin, Will Schroeder and Bill Lorensen.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files. This copyright specifically does
not apply to the related textbook "The Visualization Toolkit" ISBN
013199837-4 published by Prentice Hall which is covered by its own copyright.

The authors hereby grant permission to use, copy, and distribute this
software and its documentation for any purpose, provided that existing
copyright notices are retained in all copies and that this notice is included
verbatim in any distributions. Additionally, the authors grant permission to
modify this software and its documentation for any purpose, provided that
such modifications are not distributed without the explicit consent of the
authors and that existing copyright notices are retained in all copies. Some
of the algorithms implemented by this software are patented, observe all
applicable patent law.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Will Schroeder's avatar
Will Schroeder committed
38
39
40
41
42
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.


=========================================================================*/
Ken Martin's avatar
Ken Martin committed
43
// .NAME vtkAppendFilter - appends one or more datasets together into a single unstructured grid
Will Schroeder's avatar
Will Schroeder committed
44
// .SECTION Description
Ken Martin's avatar
Ken Martin committed
45
// vtkAppendFilter is a filter that appends one of more datasets into a single
Will Schroeder's avatar
Will Schroeder committed
46
47
48
49
50
51
// unstructured grid. All geometry is extracted and appended, but point 
// attributes (i.e., scalars, vectors, normals) are extracted and appended
// only if all datasets have the point attributes available. (For example, 
// if one dataset has scalars but another does not, scalars will not be 
// appended.)

Ken Martin's avatar
Ken Martin committed
52
53
#ifndef __vtkAppendFilter_h
#define __vtkAppendFilter_h
Will Schroeder's avatar
Will Schroeder committed
54
55
56
57
58

#include "UGrid.hh"
#include "Filter.hh"
#include "DataSetC.hh"

Ken Martin's avatar
Ken Martin committed
59
class vtkAppendFilter : public vtkUnstructuredGrid, public vtkFilter
Will Schroeder's avatar
Will Schroeder committed
60
61
{
public:
Ken Martin's avatar
Ken Martin committed
62
63
64
65
  vtkAppendFilter();
  ~vtkAppendFilter();
  char *GetClassName() {return "vtkAppendFilter";};
  void PrintSelf(ostream& os, vtkIndent indent);
Will Schroeder's avatar
Will Schroeder committed
66

Ken Martin's avatar
Ken Martin committed
67
68
69
70
71
  void AddInput(vtkDataSet *in);
  void AddInput(vtkDataSet& in) {this->AddInput(&in);};
  void RemoveInput(vtkDataSet *in);
  void RemoveInput(vtkDataSet& in) {this->RemoveInput(&in);};
  vtkDataSetCollection *GetInput() {return &(this->InputList);};
Will Schroeder's avatar
Will Schroeder committed
72
73
74
75
76
77
78
79

  // filter interface
  void Update();

protected:
  // Usual data generation method
  void Execute();
  // list of data sets to append together
Ken Martin's avatar
Ken Martin committed
80
  vtkDataSetCollection InputList;
Will Schroeder's avatar
Will Schroeder committed
81
82
83
  //Filter interface
  int GetDataReleased();
  void SetDataReleased(int flag);
Will Schroeder's avatar
Will Schroeder committed
84
85
86
87
88
};

#endif