Commit bd33996b authored by Amy Squillacote's avatar Amy Squillacote

ENH: creating a vtkDataSetToPolyDataAlgorithm subclass of vtkPolyDataAlgorithm

parent 35e004fa
......@@ -45,6 +45,7 @@ vtkDataSetCollection.cxx
vtkDataSetSource.cxx
vtkDataSetToDataSetFilter.cxx
vtkDataSetToImageFilter.cxx
vtkDataSetToPolyDataAlgorithm.cxx
vtkDataSetToPolyDataFilter.cxx
vtkDataSetToStructuredGridFilter.cxx
vtkDataSetToStructuredPointsFilter.cxx
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDataSetToPolyDataAlgorithm.cxx
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.
=========================================================================*/
#include "vtkDataSetToPolyDataAlgorithm.h"
#include "vtkInformation.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkDataSetToPolyDataAlgorithm, "1.1");
vtkStandardNewMacro(vtkDataSetToPolyDataAlgorithm);
//----------------------------------------------------------------------------
int vtkDataSetToPolyDataAlgorithm::FillInputPortInformation(
int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
//----------------------------------------------------------------------------
void vtkDataSetToPolyDataAlgorithm::PrintSelf(ostream &os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDataSetToPolyDataAlgorithm.h
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 vtkDataSetToPolyDataAlgorithm - subclass of vtkPolyDataAlgorithm that takes vtkDataSet as input
// .SECTION Description
// The only thing overriden from vtkPolyDataAlgorithm in this class is the
// method FillInputPortInformation. It sets the required input data type to
// vtkDataSet instead of vtkPolyData.
#ifndef __vtkDataSetToPolyDataAlgorithm_h
#define __vtkDataSetToPolyDataAlgorithm_h
#include "vtkPolyDataAlgorithm.h"
class VTK_FILTERING_EXPORT vtkDataSetToPolyDataAlgorithm : public vtkPolyDataAlgorithm
{
public:
static vtkDataSetToPolyDataAlgorithm* New();
vtkTypeRevisionMacro(vtkDataSetToPolyDataAlgorithm, vtkPolyDataAlgorithm);
void PrintSelf(ostream &os, vtkIndent indent);
protected:
vtkDataSetToPolyDataAlgorithm() {}
~vtkDataSetToPolyDataAlgorithm() {}
virtual int FillInputPortInformation(int, vtkInformation *);
private:
vtkDataSetToPolyDataAlgorithm(const vtkDataSetToPolyDataAlgorithm&); // Not implemented.
void operator=(const vtkDataSetToPolyDataAlgorithm&); // Not implemented.
};
#endif
......@@ -25,7 +25,7 @@
#include "vtkPolyData.h"
#include "vtkCellArray.h"
vtkCxxRevisionMacro(vtkCellCenters, "1.24");
vtkCxxRevisionMacro(vtkCellCenters, "1.25");
vtkStandardNewMacro(vtkCellCenters);
// Construct object with vertex cell generation turned off.
......@@ -127,12 +127,6 @@ int vtkCellCenters::RequestData(
return 1;
}
int vtkCellCenters::FillInputPortInformation(int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
void vtkCellCenters::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
......
......@@ -32,12 +32,12 @@
#ifndef __vtkCellCenters_h
#define __vtkCellCenters_h
#include "vtkPolyDataAlgorithm.h"
#include "vtkDataSetToPolyDataAlgorithm.h"
class VTK_GRAPHICS_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
class VTK_GRAPHICS_EXPORT vtkCellCenters : public vtkDataSetToPolyDataAlgorithm
{
public:
vtkTypeRevisionMacro(vtkCellCenters,vtkPolyDataAlgorithm);
vtkTypeRevisionMacro(vtkCellCenters,vtkDataSetToPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -55,7 +55,6 @@ protected:
~vtkCellCenters() {};
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int FillInputPortInformation(int port, vtkInformation *info);
int VertexCells;
private:
......
......@@ -37,7 +37,7 @@
#include "vtkVoxel.h"
#include "vtkWedge.h"
vtkCxxRevisionMacro(vtkDataSetSurfaceFilter, "1.39");
vtkCxxRevisionMacro(vtkDataSetSurfaceFilter, "1.40");
vtkStandardNewMacro(vtkDataSetSurfaceFilter);
//----------------------------------------------------------------------------
......@@ -1438,11 +1438,3 @@ vtkIdType vtkDataSetSurfaceFilter::GetOutputPointId(vtkIdType inPtId,
return outPtId;
}
//----------------------------------------------------------------------------
int vtkDataSetSurfaceFilter::FillInputPortInformation(
int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
......@@ -25,7 +25,7 @@
#ifndef __vtkDataSetSurfaceFilter_h
#define __vtkDataSetSurfaceFilter_h
#include "vtkPolyDataAlgorithm.h"
#include "vtkDataSetToPolyDataAlgorithm.h"
class vtkPointData;
......@@ -44,11 +44,11 @@ struct vtkFastGeomQuadStruct
typedef struct vtkFastGeomQuadStruct vtkFastGeomQuad;
//ETX
class VTK_GRAPHICS_EXPORT vtkDataSetSurfaceFilter : public vtkPolyDataAlgorithm
class VTK_GRAPHICS_EXPORT vtkDataSetSurfaceFilter : public vtkDataSetToPolyDataAlgorithm
{
public:
static vtkDataSetSurfaceFilter *New();
vtkTypeRevisionMacro(vtkDataSetSurfaceFilter,vtkPolyDataAlgorithm);
vtkTypeRevisionMacro(vtkDataSetSurfaceFilter,vtkDataSetToPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -72,7 +72,6 @@ protected:
vtkInformation *inInfo);
int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output);
int DataSetExecute(vtkDataSet *input, vtkPolyData *output);
int FillInputPortInformation(int, vtkInformation *);
// Helper methods.
void ExecuteFaceStrips(vtkDataSet *input, vtkPolyData *output,
......
......@@ -26,7 +26,7 @@
#include "vtkPointData.h"
#include "vtkPolyData.h"
vtkCxxRevisionMacro(vtkEdgePoints, "1.54");
vtkCxxRevisionMacro(vtkEdgePoints, "1.55");
vtkStandardNewMacro(vtkEdgePoints);
// Construct object with contour value of 0.0.
......@@ -227,12 +227,6 @@ int vtkEdgePoints::RequestData(
return 1;
}
int vtkEdgePoints::FillInputPortInformation(int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
void vtkEdgePoints::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
......
......@@ -27,14 +27,14 @@
#ifndef __vtkEdgePoints_h
#define __vtkEdgePoints_h
#include "vtkPolyDataAlgorithm.h"
#include "vtkDataSetToPolyDataAlgorithm.h"
class vtkMergePoints;
class VTK_GRAPHICS_EXPORT vtkEdgePoints : public vtkPolyDataAlgorithm
class VTK_GRAPHICS_EXPORT vtkEdgePoints : public vtkDataSetToPolyDataAlgorithm
{
public:
vtkTypeRevisionMacro(vtkEdgePoints,vtkPolyDataAlgorithm);
vtkTypeRevisionMacro(vtkEdgePoints,vtkDataSetToPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......@@ -51,7 +51,6 @@ protected:
~vtkEdgePoints();
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int FillInputPortInformation(int, vtkInformation *);
double Value;
vtkMergePoints *Locator;
......
......@@ -27,7 +27,7 @@
#include "vtkThreshold.h"
#include "vtkUnstructuredGrid.h"
vtkCxxRevisionMacro(vtkCutMaterial, "1.15");
vtkCxxRevisionMacro(vtkCutMaterial, "1.16");
vtkStandardNewMacro(vtkCutMaterial);
// Instantiate object with no input and no defined output.
......@@ -210,12 +210,6 @@ void vtkCutMaterial::ComputeMaximumPoint(vtkDataSet *input)
this->MaximumPoint[2] = (bds[4] + bds[5]) * 0.5;
}
int vtkCutMaterial::FillInputPortInformation(int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
void vtkCutMaterial::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
......
......@@ -23,15 +23,15 @@
#ifndef __vtkCutMaterial_h
#define __vtkCutMaterial_h
#include "vtkPolyDataAlgorithm.h"
#include "vtkDataSetToPolyDataAlgorithm.h"
class vtkPlane;
class VTK_PARALLEL_EXPORT vtkCutMaterial : public vtkPolyDataAlgorithm
class VTK_PARALLEL_EXPORT vtkCutMaterial : public vtkDataSetToPolyDataAlgorithm
{
public:
void PrintSelf(ostream& os, vtkIndent indent);
vtkTypeRevisionMacro(vtkCutMaterial,vtkPolyDataAlgorithm);
vtkTypeRevisionMacro(vtkCutMaterial,vtkDataSetToPolyDataAlgorithm);
static vtkCutMaterial *New();
// Description:
......@@ -67,7 +67,6 @@ protected:
~vtkCutMaterial();
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
virtual int FillInputPortInformation(int port, vtkInformation *info);
void ComputeMaximumPoint(vtkDataSet *input);
void ComputeNormal();
......
......@@ -29,7 +29,7 @@ STRING (REGEX REPLACE
STRING (REGEX REPLACE
"vtkDataSetToPolyDataFilter"
"vtkPolyDataAlgorithm"
"vtkDataSetToPolyDataAlgorithm"
H_CONTENTS "${H_CONTENTS}")
STRING (REGEX REPLACE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment