Commit e156c2bd authored by brugger's avatar brugger

I converted more filters to use avtDataRepresentations instead

of vtkDataSets.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23931 18c085ea-50e0-402c-830e-de6fd14e8384
parent 850fd887
......@@ -384,27 +384,34 @@ vtkRectilinearGrid* avtFFTFilter::ComputeFFT(std::vector<double>* data, long nDa
// Sends the specified input and output through the FFT filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: bala
// Creation: Mon Aug 15 13:48:35 PST 2011
//
// Modifications:
// Eric Brugger, Mon Jul 28 15:22:58 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtFFTFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtFFTFilter::ExecuteData(avtDataRepresentation *in_dr)
{
debug5 <<"avtFFTFilter::ExecuteData() - Entering." <<std::endl;
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
// Check if the input dataset is a rectilinear grid.
if (in_ds->GetDataObjectType() != VTK_RECTILINEAR_GRID) {
debug3 << "avtFFTFilter::ExecuteData() ERROR: Input dataset is not of type VTK_RECTILINEAR_GRID." <<std::endl;
debug3 << "avtFFTFilter::ExecuteData() ERROR: Not executing FFT. Returning input dataset." << std::endl;
return in_ds;
return in_dr;
}
// Convert input dataset to a rectilinear grid for easier access
......@@ -414,7 +421,7 @@ avtFFTFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
if(rGrid == NULL) {
debug3 << "avtFFTFilter::ExecuteData() ERROR: Input dataset when safely down cast to VTK_RECTILINEAR_GRID is NULL." <<std::endl;
debug3 << "avtFFTFilter::ExecuteData() ERROR: Not executing FFT. Returning input dataset." << std::endl;
return in_ds;
return in_dr;
}
// Check if the input dataset dimension is X/1/1
......@@ -422,7 +429,7 @@ avtFFTFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
if ((dims[1] != 1) || (dims[2] != 1)) {
debug3 << "avtFFTFilter::ExecuteData() ERROR: The dimension of the input dataset is not 1 (i.e., [x][1][1])." <<std::endl;
debug3 << "avtFFTFilter::ExecuteData() ERROR: Not executing FFT. Returning input dataset." << std::endl;
return in_ds;
return in_dr;
}
// Get the scalars.
......@@ -433,7 +440,7 @@ avtFFTFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
if (nPts <= 1) {
debug3 << "avtFFTFilter::ExecuteData() ERROR: Number of tuples in the input dataset is <= 1." <<std::endl;
debug3 << "avtFFTFilter::ExecuteData() ERROR: Not executing FFT. Returning input dataset." << std::endl;
return in_ds;
return in_dr;
}
// Get the Y Axis values
......@@ -473,10 +480,12 @@ avtFFTFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
// Returning output dataset.
debug5 <<"avtFFTFilter::ExecuteData() - Returning" <<std::endl;
ManageMemory(outGrid);
avtDataRepresentation *out_dr = new avtDataRepresentation(outGrid,
in_dr->GetDomain(), in_dr->GetLabel());
outGrid->Delete();
return outGrid;
return out_dr;
#endif
}
......
......@@ -43,12 +43,10 @@
#ifndef AVT_FFT_FILTER_H
#define AVT_FFT_FILTER_H
#include <avtPluginDataTreeIterator.h>
#include <FFTAttributes.h>
#include <FFTAttributes.h>
class vtkDataSet;
class vtkRectilinearGrid;
......@@ -61,6 +59,10 @@ class vtkRectilinearGrid;
// Programmer: bala -- generated by xml2avt
// Creation: Thu Aug 18 09:28:06 PDT 2011
//
// Modifications:
// Eric Brugger, Mon Jul 28 15:22:04 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class avtFFTFilter : public avtPluginDataTreeIterator
......@@ -81,7 +83,7 @@ class avtFFTFilter : public avtPluginDataTreeIterator
protected:
FFTAttributes atts;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void);
private:
......
......@@ -286,20 +286,27 @@ void avtFiveFoldTetSubdivisionFilter::addBranchIds(vtkIdType vtxIds[4], vtkDataA
// Sends the specified input and output through the FiveFoldTetSubdivision filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: ghweber -- generated by xml2avt
// Creation: Mon Jun 20 14:54:18 PST 2011
//
// Modifications:
// Eric Brugger, Mon Jul 28 15:28:00 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtFiveFoldTetSubdivisionFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtFiveFoldTetSubdivisionFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
vtkPoints *points = vtkPoints::New();
int dims[3];
if (vtkRectilinearGrid* rgrid = dynamic_cast<vtkRectilinearGrid*>(in_ds))
......@@ -321,7 +328,7 @@ avtFiveFoldTetSubdivisionFilter::ExecuteData(vtkDataSet *in_ds, int, std::string
{
EXCEPTION1(ImproperUseException, "Mesh must be rectilinear or structured!");
points->Delete();
return in_ds;
return in_dr;
}
#if 0
......@@ -474,5 +481,10 @@ avtFiveFoldTetSubdivisionFilter::ExecuteData(vtkDataSet *in_ds, int, std::string
}
}
return ugrid;
avtDataRepresentation *out_dr = new avtDataRepresentation(ugrid,
in_dr->GetDomain(), in_dr->GetLabel());
ugrid->Delete();
return out_dr;
}
......@@ -43,12 +43,13 @@
#ifndef AVT_FiveFoldTetSubdivision_FILTER_H
#define AVT_FiveFoldTetSubdivision_FILTER_H
#include <avtPluginDataTreeIterator.h>
#include <FiveFoldTetSubdivisionAttributes.h>
#include "Branch.h"
#include <Branch.h>
#include <vtkType.h>
#include <vtkDataSet.h>
// ****************************************************************************
// Class: avtFiveFoldTetSubdivisionFilter
......@@ -59,6 +60,10 @@
// Programmer: ghweber -- generated by xml2avt
// Creation: Mon Jun 20 14:54:18 PST 2011
//
// Modifications:
// Eric Brugger, Mon Jul 28 15:27:33 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class avtFiveFoldTetSubdivisionFilter : public avtPluginDataTreeIterator
......@@ -87,7 +92,7 @@ class avtFiveFoldTetSubdivisionFilter : public avtPluginDataTreeIterator
virtual avtContract_p ModifyContract(avtContract_p);
virtual void PreExecute(void);
void addBranchIds(vtkIdType [4], vtkDataArray *, vtkDataArray *, vtkDataArray *, vtkDataArray *, vtkDataArray *, vtkDataArray *, vtkDataArray *);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
};
#endif
......@@ -344,11 +344,9 @@ avtIndexSelectFilter::Equivalent(const AttributeGroup *a)
// Sends the specified input and output through the IndexSelect filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: childs -- generated by xml2info
// Creation: Wed Jun 5 09:09:11 PDT 2002
......@@ -410,13 +408,23 @@ avtIndexSelectFilter::Equivalent(const AttributeGroup *a)
// Kathleen Biagas, Wed Jan 11 13:59:21 PST 2012
// Remove hack that converts vtkPolyVertex cells to vtkVertex cells.
//
// Eric Brugger, Mon Jul 28 15:33:52 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
avtDataRepresentation *
avtIndexSelectFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
vtkDataSet *out_ds = NULL;
avtDataRepresentation *out_dr = NULL;
int topoDim = GetInput()->GetInfo().GetAttributes().
GetTopologicalDimension();
......@@ -497,7 +505,7 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
"the index select operator was not applied.");
haveIssuedWarning = true;
}
return in_ds;
return in_dr;
}
else
{
......@@ -536,7 +544,7 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
"being applied.");
haveIssuedWarning = true;
}
return in_ds;
return in_dr;
}
if (removeGhostCells != NULL)
......@@ -548,7 +556,8 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
{
out_ds = (vtkDataSet *) rv->NewInstance();
out_ds->ShallowCopy(rv);
ManageMemory(out_ds);
out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ds->Delete();
}
}
......@@ -571,7 +580,7 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
"applied.");
haveIssuedWarning = true;
}
return in_ds;
return in_dr;
}
vtkUnsignedIntArray *dims = (vtkUnsignedIntArray *)
......@@ -586,7 +595,7 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
"applied.");
haveIssuedWarning = true;
}
return in_ds;
return in_dr;
}
int d[3];
d[0] = dims->GetValue(0);
......@@ -703,7 +712,8 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
shouldDelete = true;
}
ManageMemory(out_ds);
out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ug->Delete();
if (shouldDelete)
out_ds->Delete();
......@@ -723,11 +733,12 @@ avtIndexSelectFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
dstype != VTK_POLY_DATA && dstype != VTK_UNSTRUCTURED_GRID )
{
out_ds = Replicate( out_ds, wrap );
ManageMemory(out_ds);
out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ds->Delete();
}
return out_ds;
return out_dr;
}
......
......@@ -43,10 +43,9 @@
#ifndef AVT_IndexSelect_FILTER_H
#define AVT_IndexSelect_FILTER_H
#include <avtPluginDataTreeIterator.h>
#include <IndexSelectAttributes.h>
#include <IndexSelectAttributes.h>
class vtkDataSet;
class vtkMaskPoints;
......@@ -55,6 +54,7 @@ class vtkVisItExtractRectilinearGrid;
class vtkRectilinearGrid;
class vtkDataArray;
// ****************************************************************************
// Class: avtIndexSelectFilter
//
......@@ -89,6 +89,9 @@ class vtkDataArray;
// Kathleen Bonnell, Thu Jun 21 16:31:59 PDT 2007
// Added amrLevel, amrMesh, int* arg to PrepareFilters.
//
// Eric Brugger, Mon Jul 28 15:33:34 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class avtIndexSelectFilter : public avtPluginDataTreeIterator
......@@ -122,7 +125,7 @@ class avtIndexSelectFilter : public avtPluginDataTreeIterator
void PrepareFilters(int [3], int *);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void PreExecute(void);
virtual void PostExecute(void);
virtual void UpdateDataObjectInfo(void);
......
......@@ -142,11 +142,9 @@ avtInverseGhostZoneFilter::Equivalent(const AttributeGroup *a)
// Sends the specified input and output through the InverseGhostZone filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: childs -- generated by xml2info
// Creation: Thu Jan 8 09:27:11 PDT 2004
......@@ -169,11 +167,19 @@ avtInverseGhostZoneFilter::Equivalent(const AttributeGroup *a)
// Reimplement routine to allow for selecting individual types of ghost
// cells.
//
// Eric Brugger, Wed Jul 30 18:29:34 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtInverseGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtInverseGhostZoneFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
vtkDataArray *gz = in_ds->GetCellData()->GetArray("avtGhostZones");
if (gz == NULL)
{
......@@ -261,11 +267,15 @@ avtInverseGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
out_ds->GetPointData()->SetActiveScalars(
in_ds->GetPointData()->GetScalars()->GetName());
retainThese->Delete();
ManageMemory(out_ds);
t->Delete();
if (out_ds->GetNumberOfCells() == 0)
return NULL;
return out_ds;
out_ds = NULL;
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
t->Delete();
return out_dr;
}
......
......@@ -43,12 +43,9 @@
#ifndef AVT_InverseGhostZone_FILTER_H
#define AVT_InverseGhostZone_FILTER_H
#include <avtPluginDataTreeIterator.h>
#include <InverseGhostZoneAttributes.h>
class vtkDataSet;
#include <InverseGhostZoneAttributes.h>
// ****************************************************************************
......@@ -64,6 +61,9 @@ class vtkDataSet;
// Cyrus Harrison, Thu Jul 8 13:08:24 PDT 2010
// Added ModifyContract.
//
// Eric Brugger, Wed Jul 30 18:28:57 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class avtInverseGhostZoneFilter : public avtPluginDataTreeIterator
......@@ -87,7 +87,7 @@ class avtInverseGhostZoneFilter : public avtPluginDataTreeIterator
virtual avtContract_p
ModifyContract(avtContract_p);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void);
};
......
......@@ -174,6 +174,9 @@ avtIsovolumeFilter::Equivalent(const AttributeGroup *a)
// Hank Childs, Sat Sep 29 11:24:12 PDT 2007
// Pass in vtkDataArrays to the clipper, not "float *".
//
// Eric Brugger, Wed Jul 30 18:49:46 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
......@@ -226,7 +229,7 @@ avtIsovolumeFilter::ExecuteSingleClip(vtkDataSet *in_ds, float val, bool flip)
clipper->SetInputData(in_ds);
clipper->Update();
vtkDataSet *out_ds = clipper->GetOutput();
ManageMemory(out_ds);
out_ds->Register(NULL);
clipper->Delete();
//
......@@ -279,11 +282,9 @@ inline void IsovolumeMinMax(double &min, double &max, Accessor access)
// Sends the specified input and output through the Isovolume filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: Jeremy Meredith
// Creation: January 30, 2004
......@@ -320,11 +321,19 @@ inline void IsovolumeMinMax(double &min, double &max, Accessor access)
// Check whether data set is empty before performing max clip to prevent
// crash in border case.
//
// Eric Brugger, Wed Jul 30 18:49:46 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtIsovolumeFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtIsovolumeFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
//
// Start off by calculating the range of the dataset.
//
......@@ -335,7 +344,7 @@ avtIsovolumeFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
vals = in_ds->GetCellData()->GetScalars();
if (vals == NULL)
return in_ds;
return in_dr;
double min, max;
if(vals->GetDataType() == VTK_FLOAT)
......@@ -380,6 +389,7 @@ avtIsovolumeFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
//
if (out_ds->GetNumberOfCells() <= 0)
{
out_ds->Delete();
out_ds = NULL;
}
......@@ -389,7 +399,6 @@ avtIsovolumeFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
// necessarily have a ugrid, since it might be that we didn't process the
// dataset.
//
bool shouldDelete = false;
if (in_ds->GetDataObjectType() == VTK_POLY_DATA && out_ds != NULL &&
out_ds->GetDataObjectType() == VTK_UNSTRUCTURED_GRID)
{
......@@ -407,15 +416,17 @@ avtIsovolumeFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
ugrid->GetCellPoints(i, npts, pts);
out_pd->InsertNextCell(celltype, npts, pts);
}
out_ds->Delete();
out_ds = out_pd;
shouldDelete = true;
}
ManageMemory(out_ds);
if (shouldDelete)
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
if (out_ds != NULL)
out_ds->Delete();
return out_ds;
return out_dr;
}
......
......@@ -43,13 +43,13 @@
#ifndef AVT_Isovolume_FILTER_H
#define AVT_Isovolume_FILTER_H
#include <avtPluginDataTreeIterator.h>
#include <IsovolumeAttributes.h>
#include <IsovolumeAttributes.h>
class vtkDataSet;
// ****************************************************************************
// Class: avtIsovolumeFilter
//
......@@ -71,6 +71,9 @@ class vtkDataSet;
// Hank Childs, Wed Aug 11 09:23:17 PDT 2004
// Added ModifyContract.
//
// Eric Brugger, Wed Jul 30 18:47:23 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class avtIsovolumeFilter : public avtPluginDataTreeIterator
......@@ -91,7 +94,7 @@ class avtIsovolumeFilter : public avtPluginDataTreeIterator
protected:
IsovolumeAttributes atts;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void);
virtual avtContract_p
......
......@@ -148,11 +148,9 @@ avtMetricThresholdFilter::Equivalent(const AttributeGroup *a)
// Sends the specified input and output through the MetricThreshold filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: haddox1 -- generated by xml2info
// Creation: Fri Jun 14 15:42:05 PST 2002
......@@ -162,11 +160,19 @@ avtMetricThresholdFilter::Equivalent(const AttributeGroup *a)
// Hank Cihlds, Wed Sep 11 08:50:24 PDT 2002
// Fixed memory leak.
//
// Eric Brugger, Wed Jul 30 19:15:53 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtMetricThresholdFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtMetricThresholdFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
//Get ahold of the data we'll be looking at
vtkDataArray *scalars = in_ds->GetCellData()->GetScalars();
......@@ -176,7 +182,15 @@ avtMetricThresholdFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
if (scalars != NULL)
{
avtCallback::IssueWarning("No cell data found, using point data.");
return ExecuteOnScalarData(in_ds, scalars);
vtkDataSet *out_ds = ExecuteOnScalarData(in_ds, scalars);
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ds->Delete();
return out_dr;
}
else
EXCEPTION0(ImproperUseException);
......@@ -244,7 +258,12 @@ avtMetricThresholdFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
// Move over point data
results->GetPointData()->PassData(in_ds->GetPointData());
return results;
avtDataRepresentation *out_dr = new avtDataRepresentation(results,
in_dr->GetDomain(), in_dr->GetLabel());
results->Delete();
return out_dr;
}
// ****************************************************************************
......@@ -393,6 +412,10 @@ avtMetricThresholdFilter::PassesTest(int type, double value)
// Programmer: Akira Haddox
// Creation: 7/2/02
//
// Modifications:
// Eric Brugger, Wed Jul 30 19:15:53 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
......@@ -474,8 +497,5 @@ avtMetricThresholdFilter::ExecuteOnScalarData(vtkDataSet *in_ds,
// Move over point data
results->GetPointData()->PassData(in_ds->GetPointData());
ManageMemory(results);
results->Delete();
return results;
}
......@@ -43,8 +43,8 @@
#ifndef AVT_MetricThreshold_FILTER_H
#define AVT_MetricThreshold_FILTER_H
#include <avtPluginDataTreeIterator.h>
#include <MetricThresholdAttributes.h>
class vtkDataSet;
......@@ -62,6 +62,10 @@ class vtkRectilinearGrid;
// Programmer: haddox1 -- generated by xml2info
// Creation: Fri Jun 14 15:42:05 PST 2002
//
// Modifications:
// Eric Brugger, Wed Jul 30 19:15:25 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class avtMetricThresholdFilter : public avtPluginDataTreeIterator
......@@ -82,7 +86,7 @@ class avtMetricThresholdFilter : public avtPluginDataTreeIterator
protected:
MetricThresholdAttributes atts;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo();
vtkDataSet *ExecuteOnScalarData(vtkDataSet *, vtkDataArray *);
......
......@@ -142,15 +142,17 @@ avtModelFitFilter::Equivalent(const AttributeGroup *a)
// Sends the specified input and output through the ModelFit filter.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// in_dr The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: rob -- generated by xml2avt
// Creation: Wed Feb 3 16:15:29 PST 2010
//
// Modifications:
// Eric Brugger, Wed Jul 30 19:34:44 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
#include<vtkDataArray.h>
#include<vtkDoubleArray.h>
......@@ -161,9 +163,14 @@ avtModelFitFilter::Equivalent(const AttributeGroup *a)
#include<avtDatabase.h>
#include<avtDatabaseMetaData.h>
vtkDataSet *
avtModelFitFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtModelFitFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
intVector numTups = atts.GetNumTups();
intVector numVars = atts.GetNumVars();
stringVector Vars = atts.GetVars();
......@@ -267,7 +274,7 @@ avtModelFitFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
}
out_ds.push_back(in_ds);
return in_ds;
return in_dr;
}