1 2 3 4 5 6 7 8 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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkDataSetToDataSetFilter.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkDataSetToDataSetFilter - abstract filter class
// .SECTION Description
// vtkDataSetToDataSetFilter is an abstract filter class. Subclasses of
// vtkDataSetToDataSetFilter take a dataset as input and create a dataset as
// output. The form of the input geometry is not changed in these filters,
// only the point attributes (e.g. scalars, vectors, etc.).
//
// This is an abstract filter type. What that means is that the output of the
// filter is an abstract type (i.e., vtkDataSet), no matter what the input of
// the filter is. This can cause problems connecting together filters due to
// the change in dataset type. (For example, in a series of filters
// processing vtkPolyData, when a vtkDataSetToDataSetFilter or subclass is
// introduced into the pipeline, if the filter downstream of it takes
// vtkPolyData as input, the pipeline connection cannot be made.) To get
// around this problem, use one of the convenience methods to return a
// concrete type (e.g., vtkGetPolyDataOutput(), GetStructuredPointsOutput(),
// etc.).
// .SECTION See Also
// vtkBrownianPoints vtkProbeFilter vtkThresholdTextureCoords vtkDicer
// vtkElevationFilter vtkImplicitTextureCoords vtkTextureMapToBox
// vtkTextureMapToPlane vtkVectorDot vtkVectorNorm
#ifndef __vtkDataSetToDataSetFilter_h
#define __vtkDataSetToDataSetFilter_h
#include "vtkDataSetSource.h"
class vtkDataSet;
class vtkPolyData;
class vtkRectilinearGrid;
class vtkStructuredGrid;
class vtkStructuredPoints;
class vtkUnstructuredGrid;
class VTK_FILTERING_EXPORT vtkDataSetToDataSetFilter : public vtkDataSetSource
{
public:
vtkTypeRevisionMacro(vtkDataSetToDataSetFilter,vtkDataSetSource);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Specify the input data or filter.
void SetInput(vtkDataSet *input);
// Description:
// Get the output of this filter. If output is NULL then input
// hasn't been set which is necessary for abstract objects.
vtkDataSet *GetOutput();
vtkDataSet *GetOutput(int idx);
// Description:
// Get the output as vtkPolyData.
virtual vtkPolyData *GetPolyDataOutput();
// Description:
// Get the output as vtkStructuredPoints.
virtual vtkStructuredPoints *GetStructuredPointsOutput();
// Description:
// Get the output as vtkStructuredGrid.
virtual vtkStructuredGrid *GetStructuredGridOutput();
// Description:
// Get the output as vtkUnstructuredGrid.
virtual vtkUnstructuredGrid *GetUnstructuredGridOutput();
// Description:
// Get the output as vtkRectilinearGrid.
virtual vtkRectilinearGrid *GetRectilinearGridOutput();
// Description:
// Get the input data or filter.
vtkDataSet *GetInput();
// Description:
// By default copy the output update extent to the input
virtual void ComputeInputUpdateExtents( vtkDataObject *output );
// Description:
// Transform pipeline requests from executives into old-style
// pipeline calls. This works with the
// vtkStreamingDemandDrivenPipeline executive to maintain backward
// compatibility for filters written as subclasses of vtkSource.
virtual int ProcessRequest(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
protected:
vtkDataSetToDataSetFilter();
~vtkDataSetToDataSetFilter();
void ExecuteInformation();
virtual int FillInputPortInformation(int, vtkInformation*);
// This is called by the superclass.
// This is the method you should override.
virtual int RequestDataObject(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
private:
vtkDataSetToDataSetFilter(const vtkDataSetToDataSetFilter&); // Not implemented.
void operator=(const vtkDataSetToDataSetFilter&); // Not implemented.
};
#endif
|