Commit 3ca2c566 authored by brugger's avatar brugger

I modified all the vtk classes that inherit from vtDataSetToPolyDataFilter

to inherit from vtkPolyDataAlgorithm, since vtkDataSetToPolyDataFilter
is deprecated and isn't in VTK6.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@19996 18c085ea-50e0-402c-830e-de6fd14e8384
parent e921decd
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include <vtkCellData.h> #include <vtkCellData.h>
#include <vtkCellDataToPointData.h> #include <vtkCellDataToPointData.h>
#include <vtkIdTypeArray.h> #include <vtkIdTypeArray.h>
#include <vtkInformation.h>
#include <vtkInformationVector.h>
#include <vtkLineSource.h> #include <vtkLineSource.h>
#include <vtkMath.h> #include <vtkMath.h>
#include <vtkObjectFactory.h> #include <vtkObjectFactory.h>
...@@ -54,16 +56,18 @@ ...@@ -54,16 +56,18 @@
vtkStandardNewMacro(vtkLineoutFilter); vtkStandardNewMacro(vtkLineoutFilter);
//====================================================================== // ****************************************************************************
// Constructor // Constructor:
// //
// Modifications: // Modifications:
// Kathleen Bonnell, Fri Jul 12 17:19:40 PDT 2002 // Kathleen Bonnell, Fri Jul 12 17:19:40 PDT 2002
// Removed YScale, no longer needed. // Removed YScale, no longer needed.
// //
// Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008 // Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008
// Removed cd2pd, use VisIt version of vtkProbeFilter. // Removed cd2pd, use VisIt version of vtkProbeFilter.
//====================================================================== //
// ****************************************************************************
vtkLineoutFilter::vtkLineoutFilter() vtkLineoutFilter::vtkLineoutFilter()
{ {
this->Point1[0] = this->Point1[1] = this->Point1[2] = 0.; this->Point1[0] = this->Point1[1] = this->Point1[2] = 0.;
...@@ -73,13 +77,15 @@ vtkLineoutFilter::vtkLineoutFilter() ...@@ -73,13 +77,15 @@ vtkLineoutFilter::vtkLineoutFilter()
this->Probe = vtkVisItProbeFilter::New(); this->Probe = vtkVisItProbeFilter::New();
} }
//====================================================================== // ****************************************************************************
// Destructor // Destructor:
// //
// Modifications: // Modifications:
// Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008 // Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008
// Removed cd2pd. // Removed cd2pd.
//====================================================================== //
// ****************************************************************************
vtkLineoutFilter::~vtkLineoutFilter() vtkLineoutFilter::~vtkLineoutFilter()
{ {
if (this->LineSource != NULL) if (this->LineSource != NULL)
...@@ -94,35 +100,53 @@ vtkLineoutFilter::~vtkLineoutFilter() ...@@ -94,35 +100,53 @@ vtkLineoutFilter::~vtkLineoutFilter()
} }
} }
//====================================================================== // ****************************************************************************
// Standard Execute method. // Method: vtkLineoutFilter::RequestData.
//
// Modifications:
// Kathleen Bonnell, Tue Jun 4 09:17:56 PDT 2002
// Copy point data is happening from wrong source. Use
// probe->GetOutput->GetPointData().
// //
// Modifications: // Kathleen Bonnell, Fri Jul 12 17:19:40 PDT 2002
// Kathleen Bonnell, Tue Jun 4 09:17:56 PDT 2002 // Removed YScale, no longer needed.
// Copy point data is happening from wrong source. Use
// probe->GetOutput->GetPointData().
// //
// Kathleen Bonnell, Fri Jul 12 17:19:40 PDT 2002 // Kathleen Bonnell, Tue Dec 23 10:18:06 PST 2003
// Removed YScale, no longer needed. // Slight rework to consider ghost levels.
//
// Kathleen Bonnell, Tue Dec 23 10:18:06 PST 2003
// Slight rework to consider ghost levels.
//
// Hank Childs, Fri Aug 27 15:15:20 PDT 2004
// Rename ghost data array.
// //
// Hank Childs, Sun Mar 13 09:19:30 PST 2005 // Hank Childs, Fri Aug 27 15:15:20 PDT 2004
// Fix memory leak. // Rename ghost data array.
// //
// Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008 // Hank Childs, Sun Mar 13 09:19:30 PST 2005
// Removed cd2pd. // Fix memory leak.
// //
//====================================================================== // Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008
void // Removed cd2pd.
vtkLineoutFilter::Execute() //
// Eric Brugger, Thu Jan 10 09:51:08 PST 2013
// Modified to inherit from vtkPolyDataAlgorithm.
//
// ****************************************************************************
int
vtkLineoutFilter::RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{ {
vtkDebugMacro(<<"Executing vtkLineoutFilter"); vtkDebugMacro(<<"Executing vtkLineoutFilter");
vtkDataSet *inDS = this->GetInput();
// get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
//
// Initialize some frequently used values.
//
vtkDataSet *inDS = vtkDataSet::SafeDownCast(
inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkPolyData *outPolys = vtkPolyData::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
this->LineSource->SetPoint1(this->Point1); this->LineSource->SetPoint1(this->Point1);
this->LineSource->SetPoint2(this->Point2); this->LineSource->SetPoint2(this->Point2);
...@@ -133,7 +157,7 @@ vtkLineoutFilter::Execute() ...@@ -133,7 +157,7 @@ vtkLineoutFilter::Execute()
if (inDS->GetCellData()->GetScalars() == NULL) if (inDS->GetCellData()->GetScalars() == NULL)
{ {
vtkErrorMacro(<<"No Scalars to probe!"); vtkErrorMacro(<<"No Scalars to probe!");
return; return 1;
} }
this->Probe->SetCellData(1); this->Probe->SetCellData(1);
} }
...@@ -153,10 +177,9 @@ vtkLineoutFilter::Execute() ...@@ -153,10 +177,9 @@ vtkLineoutFilter::Execute()
{ {
probeOut->Delete(); probeOut->Delete();
vtkDebugMacro(<<"Probe did not find any valid points"); vtkDebugMacro(<<"Probe did not find any valid points");
return; return 1;
} }
vtkPolyData *outPolys = this->GetOutput();
vtkPoints *inPts = probeOut->GetPoints(); vtkPoints *inPts = probeOut->GetPoints();
vtkIdType i, index, numPoints = validPoints->GetNumberOfTuples(); vtkIdType i, index, numPoints = validPoints->GetNumberOfTuples();
...@@ -176,7 +199,7 @@ vtkLineoutFilter::Execute() ...@@ -176,7 +199,7 @@ vtkLineoutFilter::Execute()
{ {
probeOut->Delete(); probeOut->Delete();
vtkErrorMacro(<<"Probe did not return point data scalars"); vtkErrorMacro(<<"Probe did not return point data scalars");
return; return 1;
} }
unsigned char* ghosts = 0; unsigned char* ghosts = 0;
...@@ -236,13 +259,31 @@ vtkLineoutFilter::Execute() ...@@ -236,13 +259,31 @@ vtkLineoutFilter::Execute()
// //
probeOut->Delete(); probeOut->Delete();
nonGhostValidPoints->Delete(); nonGhostValidPoints->Delete();
return 1;
} }
//====================================================================== // ****************************************************************************
// Modifications: // Method: vtkLineoutFilter::FillInputPortInformation
// Kathleen Bonnell, Fri Jul 12 17:19:40 PDT 2002 //
// Removed YScale, no longer needed. // ****************************************************************************
//======================================================================
int
vtkLineoutFilter::FillInputPortInformation(int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
// ****************************************************************************
// Method: vtkLineoutFilter::PrintSelf
//
// Modifications:
// Kathleen Bonnell, Fri Jul 12 17:19:40 PDT 2002
// Removed YScale, no longer needed.
//
// ****************************************************************************
void void
vtkLineoutFilter::PrintSelf(ostream& os, vtkIndent indent) vtkLineoutFilter::PrintSelf(ostream& os, vtkIndent indent)
{ {
...@@ -256,8 +297,3 @@ vtkLineoutFilter::PrintSelf(ostream& os, vtkIndent indent) ...@@ -256,8 +297,3 @@ vtkLineoutFilter::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "Number of Sample points: " os << indent << "Number of Sample points: "
<< this->NumberOfSamplePoints << "\n"; << this->NumberOfSamplePoints << "\n";
} }
...@@ -51,24 +51,31 @@ ...@@ -51,24 +51,31 @@
#ifndef __vtkLineoutFilter_h #ifndef __vtkLineoutFilter_h
#define __vtkLineoutFilter_h #define __vtkLineoutFilter_h
#include <vtkDataSetToPolyDataFilter.h>
#include <visit_vtk_exports.h> #include <visit_vtk_exports.h>
#include <vtkPolyDataAlgorithm.h>
class vtkCellDataToPointData; class vtkCellDataToPointData;
class vtkLineSource; class vtkLineSource;
class vtkVisItProbeFilter; class vtkVisItProbeFilter;
//---------------------------------------------------------------------------- // ***************************************************************************
// Class: vtkLineoutFilter
//
// Modifications: // Modifications:
// Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008 // Kathleen Bonnell, Fri Mar 28 12:09:01 PDT 2008
// Removed cd2pd, use VisIt version of vtkProbeFilter. // Removed cd2pd, use VisIt version of vtkProbeFilter.
//---------------------------------------------------------------------------- //
class VISIT_VTK_API vtkLineoutFilter : public vtkDataSetToPolyDataFilter // Eric Brugger, Thu Jan 10 09:45:55 PST 2013
// Modified to inherit from vtkPolyDataAlgorithm.
//
// ***************************************************************************
class VISIT_VTK_API vtkLineoutFilter : public vtkPolyDataAlgorithm
{ {
public: public:
static vtkLineoutFilter *New(); static vtkLineoutFilter *New();
vtkTypeMacro(vtkLineoutFilter,vtkDataSetToPolyDataFilter); vtkTypeMacro(vtkLineoutFilter,vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent); void PrintSelf(ostream& os, vtkIndent indent);
// Description: // Description:
...@@ -82,15 +89,17 @@ public: ...@@ -82,15 +89,17 @@ public:
vtkSetMacro(NumberOfSamplePoints, int); vtkSetMacro(NumberOfSamplePoints, int);
vtkGetMacro(NumberOfSamplePoints, int); vtkGetMacro(NumberOfSamplePoints, int);
protected: protected:
vtkLineoutFilter(); vtkLineoutFilter();
~vtkLineoutFilter() ; ~vtkLineoutFilter();
vtkLineSource *LineSource; vtkLineSource *LineSource;
vtkVisItProbeFilter *Probe; vtkVisItProbeFilter *Probe;
void Execute(); virtual int RequestData(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int FillInputPortInformation(int port, vtkInformation *info);
private: private:
double Point1[3]; double Point1[3];
...@@ -102,5 +111,3 @@ private: ...@@ -102,5 +111,3 @@ private:
}; };
#endif #endif
This diff is collapsed.
...@@ -20,15 +20,23 @@ ...@@ -20,15 +20,23 @@
#ifndef __vtkSlicer_h #ifndef __vtkSlicer_h
#define __vtkSlicer_h #define __vtkSlicer_h
#include <visit_vtk_exports.h> #include <visit_vtk_exports.h>
#include "vtkDataSetToPolyDataFilter.h"
#include "vtkPolyDataAlgorithm.h"
// ***************************************************************************
// Class: vtkSlicer
//
// Modifications:
// Eric Brugger, Thu Jan 10 10:19:26 PST 2013
// Modified to inherit from vtkPolyDataAlgorithm.
//
// ***************************************************************************
class VISIT_VTK_API vtkSlicer : public vtkDataSetToPolyDataFilter class VISIT_VTK_API vtkSlicer : public vtkPolyDataAlgorithm
{ {
public: public:
vtkTypeMacro(vtkSlicer,vtkDataSetToPolyDataFilter); vtkTypeMacro(vtkSlicer,vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent); void PrintSelf(ostream& os, vtkIndent indent);
// Description: // Description:
...@@ -50,23 +58,28 @@ protected: ...@@ -50,23 +58,28 @@ protected:
vtkSlicer(); vtkSlicer();
~vtkSlicer(); ~vtkSlicer();
void Execute(); virtual int RequestData(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int FillInputPortInformation(int port, vtkInformation *info);
void RectilinearGridExecute(); void RectilinearGridExecute();
void StructuredGridExecute(); void StructuredGridExecute();
void UnstructuredGridExecute(); void UnstructuredGridExecute();
void GeneralExecute(); void GeneralExecute();
void SliceDataset(vtkDataSet *, vtkPolyData *, bool); void SliceDataset(vtkDataSet *, vtkPolyData *, bool);
vtkDataSet *input;
vtkPolyData *output;
vtkIdType *CellList; vtkIdType *CellList;
vtkIdType CellListSize; vtkIdType CellListSize;
double Normal[3]; double Normal[3];
double Origin[3]; double Origin[3];
private: private:
vtkSlicer(const vtkSlicer&); // Not implemented. vtkSlicer(const vtkSlicer&); // Not implemented.
void operator=(const vtkSlicer&); // Not implemented. void operator=(const vtkSlicer&); // Not implemented.
}; };
#endif #endif
...@@ -47,6 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -47,6 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vtkDataSet.h> #include <vtkDataSet.h>
#include <vtkDoubleArray.h> #include <vtkDoubleArray.h>
#include <vtkFloatArray.h> #include <vtkFloatArray.h>
#include <vtkInformation.h>
#include <vtkInformationVector.h>
#include <vtkObjectFactory.h> #include <vtkObjectFactory.h>
#include <vtkPointData.h> #include <vtkPointData.h>
#include <vtkPolyData.h> #include <vtkPolyData.h>
...@@ -62,35 +64,54 @@ vtkTensorReduceFilter::vtkTensorReduceFilter() ...@@ -62,35 +64,54 @@ vtkTensorReduceFilter::vtkTensorReduceFilter()
numEls = -1; numEls = -1;
} }
void
void vtkTensorReduceFilter::SetStride(int s) vtkTensorReduceFilter::SetStride(int s)
{ {
numEls = -1; numEls = -1;
stride = s; stride = s;
} }
void
void vtkTensorReduceFilter::SetNumberOfElements(int n) vtkTensorReduceFilter::SetNumberOfElements(int n)
{ {
stride = -1; stride = -1;
numEls = n; numEls = n;
} }
// **************************************************************************** // ****************************************************************************
// Modifications: // Method: vtkTensorReduceFilter::RequestData
// //
// Modifications:
// Kathleen Bonnell, Tue Aug 30 11:11:56 PDT 2005 // Kathleen Bonnell, Tue Aug 30 11:11:56 PDT 2005
// Copy other Point and Cell data. // Copy other Point and Cell data.
// //
// Kathleen Biagas, Wed Sep 5 13:10:18 MST 2012 // Kathleen Biagas, Wed Sep 5 13:10:18 MST 2012
// Preserve coordinate and tensor data types. // Preserve coordinate and tensor data types.
// //
// Eric Brugger, Thu Jan 10 12:05:20 PST 2013
// Modified to inherit from vtkPolyDataAlgorithm.
//
// **************************************************************************** // ****************************************************************************
void vtkTensorReduceFilter::Execute(void) int
vtkTensorReduceFilter::RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{ {
vtkDataSet *input = this->GetInput(); vtkDebugMacro(<<"Executing vtkTensorReduceFilter");
vtkPolyData *output = this->GetOutput();
// get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
//
// Initialize some frequently used values.
//
vtkDataSet *input = vtkDataSet::SafeDownCast(
inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkPolyData *output = vtkPolyData::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkCellData *inCd = input->GetCellData(); vtkCellData *inCd = input->GetCellData();
vtkPointData *inPd = input->GetPointData(); vtkPointData *inPd = input->GetPointData();
...@@ -106,7 +127,7 @@ void vtkTensorReduceFilter::Execute(void) ...@@ -106,7 +127,7 @@ void vtkTensorReduceFilter::Execute(void)
if (inPtensors == NULL && inCtensors == NULL) if (inPtensors == NULL && inCtensors == NULL)
{ {
vtkErrorMacro(<<"No tensors to reduce"); vtkErrorMacro(<<"No tensors to reduce");
return; return 1;
} }
int inPType = (inPtensors ? inPtensors->GetDataType() : VTK_FLOAT); int inPType = (inPtensors ? inPtensors->GetDataType() : VTK_FLOAT);
...@@ -116,7 +137,7 @@ void vtkTensorReduceFilter::Execute(void) ...@@ -116,7 +137,7 @@ void vtkTensorReduceFilter::Execute(void)
if (stride <= 0 && numEls <= 0) if (stride <= 0 && numEls <= 0)
{ {
vtkErrorMacro(<<"Invalid stride"); vtkErrorMacro(<<"Invalid stride");
return; return 1;
} }
float actingStride = stride; float actingStride = stride;
...@@ -208,11 +229,27 @@ void vtkTensorReduceFilter::Execute(void) ...@@ -208,11 +229,27 @@ void vtkTensorReduceFilter::Execute(void)
} }
} }
// ****************************************************************************
void vtkTensorReduceFilter::PrintSelf(ostream &os, vtkIndent indent) // Method: vtkTensorReduceFilter::FillInputPortInformation
//
// ****************************************************************************
int
vtkTensorReduceFilter::FillInputPortInformation(int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
// ****************************************************************************
// Method: vtkTensorReduceFilter::PrintSelf
//
// ****************************************************************************
void
vtkTensorReduceFilter::PrintSelf(ostream &os, vtkIndent indent)
{ {
this->Superclass::PrintSelf(os, indent); this->Superclass::PrintSelf(os, indent);
os << indent << "Stride: " << this->stride << "\n"; os << indent << "Stride: " << this->stride << "\n";
os << indent << "Target number of tensors: " << this->numEls << "\n"; os << indent << "Target number of tensors: " << this->numEls << "\n";
} }
...@@ -57,12 +57,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -57,12 +57,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __vtkTensorReduceFilter_h #define __vtkTensorReduceFilter_h
#include <visit_vtk_exports.h> #include <visit_vtk_exports.h>
#include "vtkDataSetToPolyDataFilter.h" #include "vtkPolyDataAlgorithm.h"
class VISIT_VTK_API vtkTensorReduceFilter : public vtkDataSetToPolyDataFilter // ***************************************************************************
// Class: vtkVisItCutter
//
// Modifications:
// Eric Brugger, Thu Jan 10 12:02:36 PST 2013
// Modified to inherit from vtkPolyDataAlgorithm.
//
// ***************************************************************************
class VISIT_VTK_API vtkTensorReduceFilter : public vtkPolyDataAlgorithm
{ {
public: public:
vtkTypeMacro(vtkTensorReduceFilter, vtkDataSetToPolyDataFilter); vtkTypeMacro(vtkTensorReduceFilter, vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent); void PrintSelf(ostream& os, vtkIndent indent);
// Description: // Description:
...@@ -76,7 +85,10 @@ protected: ...@@ -76,7 +85,10 @@ protected:
vtkTensorReduceFilter(); vtkTensorReduceFilter();
~vtkTensorReduceFilter() {}; ~vtkTensorReduceFilter() {};
void Execute(); virtual int RequestData(vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int FillInputPortInformation(int port, vtkInformation *info);
int stride; int stride;
int numEls; int numEls;
...@@ -87,5 +99,3 @@ private: ...@@ -87,5 +99,3 @@ private:
}; };
#endif #endif
...@@ -46,6 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -46,6 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vtkDataSet.h> #include <vtkDataSet.h>
#include <vtkDoubleArray.h> #include <vtkDoubleArray.h>
#include <vtkFloatArray.h> #include <vtkFloatArray.h>
#include <vtkInformation.h>
#include <vtkInformationVector.h>
#include <vtkObjectFactory.h> #include <vtkObjectFactory.h>
#include <vtkPointData.h> #include <vtkPointData.h>
#include <vtkPolyData.h> #include <vtkPolyData.h>
...@@ -67,28 +69,28 @@ vtkVectorReduceFilter::vtkVectorReduceFilter() ...@@ -67,28 +69,28 @@ vtkVectorReduceFilter::vtkVectorReduceFilter()
origOnly = true; origOnly = true;
} }
void
void vtkVectorReduceFilter::SetStride(int s) vtkVectorReduceFilter::SetStride(int s)
{ {
numEls = -1; numEls = -1;
stride = s; stride = s;
} }
void
void vtkVectorReduceFilter::SetNumberOfElements(int n) vtkVectorReduceFilter::SetNumberOfElements(int n)
{ {
stride = -1; stride = -1;
numEls = n; numEls = n;
} }
void vtkVectorReduceFilter::SetLimitToOriginal(bool lto) void
vtkVectorReduceFilter::SetLimitToOriginal(bool lto)
{ {
origOnly = lto; origOnly = lto;
} }
// **************************************************************************** // ****************************************************************************
// Modifications: // Modifications:
//
// Kathleen Bonnell, Fri Feb 8 11:03:49 PST 2002 // Kathleen Bonnell, Fri Feb 8 11:03:49 PST 2002
// vtkVectors has been deprecated in VTK 4.0, use // vtkVectors has been deprecated in VTK 4.0, use
// vtkDataArray and vtkFloatArray instead. // vtkDataArray and vtkFloatArray instead.
...@@ -112,12 +114,30 @@ void vtkVectorReduceFilter::SetLimitToOriginal(bool lto) ...@@ -112,12 +114,30 @@ void vtkVectorReduceFilter::SetLimitToOriginal(bool lto)
// Kathleen Biagas, Wed Sep 5 13:24:11 MST 2012 // Kathleen Biagas, Wed Sep 5 13:24:11 MST 2012
// Preserve coordinate and vector data types. // Preserve coordinate and vector data types.
// //
// Eric Brugger, Thu Jan 10 10:13:10 PST 2013
// Modified to inherit from vtkPolyDataAlgorithm.
//
// **************************************************************************** // ****************************************************************************
void vtkVectorReduceFilter::Execute(void) int
vtkVectorReduceFilter::RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{ {
vtkDataSet *input = this->GetInput(); vtkDebugMacro(<<"Executing vtkVectorReduceFilter");
vtkPolyData *output = this->GetOutput();
// get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
//
// Initialize some frequently used values.
//
vtkDataSet *input = vtkDataSet::SafeDownCast(
inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkPolyData *output = vtkPolyData::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkCellData *inCd = input->GetCellData(); vtkCellData *inCd = input->GetCellData();
vtkPointData *inPd = input->GetPointData(); vtkPointData *inPd = input->GetPointData();
...@@ -133,7 +153,7 @@ void vtkVectorReduceFilter::Execute(void) ...@@ -133,7 +153,7 @@ void vtkVectorReduceFilter::Execute(void)
if (inPvecs == NULL && inCvecs == NULL) if (inPvecs == NULL && inCvecs == NULL)
{ {
vtkErrorMacro(<<"No vectors to reduce");