Commit 955d20f9 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@23825 18c085ea-50e0-402c-830e-de6fd14e8384
parent 943fbc96
...@@ -116,10 +116,9 @@ avtShiftCenteringFilter::~avtShiftCenteringFilter() ...@@ -116,10 +116,9 @@ avtShiftCenteringFilter::~avtShiftCenteringFilter()
// necessary. // necessary.
// //
// Arguments: // Arguments:
// inDS The input dataset. // inDR The input data representation.
// <unused> The domain number.
// //
// Returns: The output dataset. // Returns: The output data representation.
// //
// Programmer: Kathleen Bonnell // Programmer: Kathleen Bonnell
// Creation: April 19, 2001 // Creation: April 19, 2001
...@@ -173,12 +172,20 @@ avtShiftCenteringFilter::~avtShiftCenteringFilter() ...@@ -173,12 +172,20 @@ avtShiftCenteringFilter::~avtShiftCenteringFilter()
// Kathleen Biagas, Thu Sep 6 15:18:27 MST 2012 // Kathleen Biagas, Thu Sep 6 15:18:27 MST 2012
// Preserve data type. // Preserve data type.
// //
// Eric Brugger, Tue Jul 22 08:01:18 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * avtDataRepresentation *
avtShiftCenteringFilter::ExecuteData(vtkDataSet *inDS, int, std::string) avtShiftCenteringFilter::ExecuteData(avtDataRepresentation *inDR)
{ {
size_t i, j, k; //
// Get the VTK data set.
//
vtkDataSet *inDS = inDR->GetDataVTK();
size_t i, j, k;
vtkDataSet *newDS = (vtkDataSet *) inDS->NewInstance(); vtkDataSet *newDS = (vtkDataSet *) inDS->NewInstance();
newDS->ShallowCopy(inDS); newDS->ShallowCopy(inDS);
...@@ -411,13 +418,12 @@ avtShiftCenteringFilter::ExecuteData(vtkDataSet *inDS, int, std::string) ...@@ -411,13 +418,12 @@ avtShiftCenteringFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
outDS = inDS; outDS = inDS;
} }
if (outDS == newDS) avtDataRepresentation *outDR = new avtDataRepresentation(outDS,
{ inDR->GetDomain(), inDR->GetLabel());
ManageMemory(outDS);
}
newDS->Delete(); newDS->Delete();
return outDS; return outDR;
} }
......
...@@ -48,11 +48,6 @@ ...@@ -48,11 +48,6 @@
#include <avtDataTreeIterator.h> #include <avtDataTreeIterator.h>
class vtkDataSet;
class vtkCellDataToPointData;
class vtkPointDataToCellData;
// **************************************************************************** // ****************************************************************************
// Class: avtShiftCenteringFilter // Class: avtShiftCenteringFilter
// //
...@@ -85,6 +80,9 @@ class vtkPointDataToCellData; ...@@ -85,6 +80,9 @@ class vtkPointDataToCellData;
// For ease of reading code, I forced the argument to be avtCentering, not // For ease of reading code, I forced the argument to be avtCentering, not
// integer. // integer.
// //
// Eric Brugger, Tue Jul 22 08:00:59 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
class AVTFILTERS_API avtShiftCenteringFilter : public avtDataTreeIterator class AVTFILTERS_API avtShiftCenteringFilter : public avtDataTreeIterator
...@@ -100,7 +98,7 @@ class AVTFILTERS_API avtShiftCenteringFilter : public avtDataTreeIterator ...@@ -100,7 +98,7 @@ class AVTFILTERS_API avtShiftCenteringFilter : public avtDataTreeIterator
protected: protected:
avtCentering centeringTarget; avtCentering centeringTarget;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string); virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void); virtual void UpdateDataObjectInfo(void);
virtual avtContract_p virtual avtContract_p
ModifyContract(avtContract_p); ModifyContract(avtContract_p);
......
...@@ -120,11 +120,9 @@ avtSmoothPolyDataFilter::SetSmoothingLevel(int sl) ...@@ -120,11 +120,9 @@ avtSmoothPolyDataFilter::SetSmoothingLevel(int sl)
// Sends the specified input and output through the SmoothPolyData filter. // Sends the specified input and output through the SmoothPolyData filter.
// //
// Arguments: // Arguments:
// in_ds The input dataset. // inDR The input data representation.
// <unused> The domain number.
// <unused> The label.
// //
// Returns: The output geometry. // Returns: The output data representation.
// //
// Programmer: Jeremy Meredith // Programmer: Jeremy Meredith
// Creation: December 6, 2002 // Creation: December 6, 2002
...@@ -140,17 +138,25 @@ avtSmoothPolyDataFilter::SetSmoothingLevel(int sl) ...@@ -140,17 +138,25 @@ avtSmoothPolyDataFilter::SetSmoothingLevel(int sl)
// Kathleen Biagas, Fri Jan 25 16:04:46 PST 2013 // Kathleen Biagas, Fri Jan 25 16:04:46 PST 2013
// Call Update on the filter, not the data object. // Call Update on the filter, not the data object.
// //
// Eric Brugger, Tue Jul 22 08:24:19 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * avtDataRepresentation *
avtSmoothPolyDataFilter::ExecuteData(vtkDataSet *inDS, int, string) avtSmoothPolyDataFilter::ExecuteData(avtDataRepresentation *inDR)
{ {
//
// Get the VTK data set.
//
vtkDataSet *inDS = inDR->GetDataVTK();
// Detect no-ops // Detect no-ops
if (smoothingLevel == 0 || if (smoothingLevel == 0 ||
GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() != 2 || GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() != 2 ||
GetInput()->GetInfo().GetAttributes().GetSpatialDimension() != 3) GetInput()->GetInfo().GetAttributes().GetSpatialDimension() != 3)
{ {
return inDS; return inDR;
} }
// We only work on surface data // We only work on surface data
...@@ -202,11 +208,13 @@ avtSmoothPolyDataFilter::ExecuteData(vtkDataSet *inDS, int, string) ...@@ -202,11 +208,13 @@ avtSmoothPolyDataFilter::ExecuteData(vtkDataSet *inDS, int, string)
outDS = newDS; outDS = newDS;
} }
ManageMemory(outDS); avtDataRepresentation *outDR = new avtDataRepresentation(outDS,
inDR->GetDomain(), inDR->GetLabel());
newDS->Delete(); newDS->Delete();
smoothPolyData->Delete(); smoothPolyData->Delete();
if (geom) if (geom)
geom->Delete(); geom->Delete();
return outDS; return outDR;
} }
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
// Moved inlined constructor and destructor definitions to .C files // Moved inlined constructor and destructor definitions to .C files
// because certain compilers have problems with them. // because certain compilers have problems with them.
// //
// Eric Brugger, Tue Jul 22 08:23:57 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
class AVTFILTERS_API avtSmoothPolyDataFilter : public avtDataTreeIterator class AVTFILTERS_API avtSmoothPolyDataFilter : public avtDataTreeIterator
...@@ -81,7 +84,7 @@ class AVTFILTERS_API avtSmoothPolyDataFilter : public avtDataTreeIterator ...@@ -81,7 +84,7 @@ class AVTFILTERS_API avtSmoothPolyDataFilter : public avtDataTreeIterator
protected: protected:
int smoothingLevel; int smoothingLevel;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string); virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
}; };
......
...@@ -89,25 +89,29 @@ avtStaggeringFilter::~avtStaggeringFilter() ...@@ -89,25 +89,29 @@ avtStaggeringFilter::~avtStaggeringFilter()
// offsets. If no offsets, or offsets are zero, returns input dataset. // offsets. If no offsets, or offsets are zero, returns input dataset.
// //
// Arguments: // Arguments:
// inDS The input dataset. // inDR The input data representation.
// <unused> The domain number.
// <unused> The label.
// //
// Returns: The input dataset adjusted for node offsets // Returns: The input data representation adjusted for node offsets
// //
// Programmer: Marc Durant // Programmer: Marc Durant
// Creation: April 24, 2012 // Creation: April 24, 2012
// //
// Modifications: // Modifications:
// Eric Brugger, Tue Jul 22 08:56:41 PDT 2014
// Modified the class to work with avtDataRepresentation.
// //
// **************************************************************************** // ****************************************************************************
vtkDataSet * avtDataRepresentation *
avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string) avtStaggeringFilter::ExecuteData(avtDataRepresentation *inDR)
{ {
//
// Get the VTK data set.
//
vtkDataSet *inDS = inDR->GetDataVTK();
if (!inDS) { if (!inDS) {
return inDS; return inDR;
} }
vtkDataSet* outDS = NULL; vtkDataSet* outDS = NULL;
...@@ -120,14 +124,14 @@ avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string) ...@@ -120,14 +124,14 @@ avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
if (!velData) { if (!velData) {
debug5 <<"avtStaggeringFilter::ExecuteData() - Unable to find scalar data on mesh, returning input dataset." <<std::endl; debug5 <<"avtStaggeringFilter::ExecuteData() - Unable to find scalar data on mesh, returning input dataset." <<std::endl;
return inDS; return inDR;
} }
vtkInformation* info = velData->GetInformation(); vtkInformation* info = velData->GetInformation();
if (!info->Has(avtVariableCache::OFFSET_3())) { if (!info->Has(avtVariableCache::OFFSET_3())) {
debug5 <<"avtStaggeringFilter::ExecuteData() - scalars have NO offset information, returning input dataset." <<std::endl; debug5 <<"avtStaggeringFilter::ExecuteData() - scalars have NO offset information, returning input dataset." <<std::endl;
return inDS; return inDR;
} }
//Extract the offset information from the dataset //Extract the offset information from the dataset
...@@ -203,7 +207,6 @@ avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string) ...@@ -203,7 +207,6 @@ avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
} }
outDS = newGrid; outDS = newGrid;
ManageMemory(outDS);
} }
break; break;
...@@ -220,10 +223,15 @@ avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string) ...@@ -220,10 +223,15 @@ avtStaggeringFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
} //end switch(dstype) } //end switch(dstype)
if (outDS) { if (outDS) {
return outDS; avtDataRepresentation *outDR = new avtDataRepresentation(outDS,
inDR->GetDomain(), inDR->GetLabel());
outDS->Delete();
return outDR;
} }
return inDS; return inDR;
} }
// **************************************************************************** // ****************************************************************************
......
...@@ -37,17 +37,19 @@ ...@@ -37,17 +37,19 @@
*****************************************************************************/ *****************************************************************************/
// ************************************************************************* // // ************************************************************************* //
// avtStaggeringFilter.h // // avtStaggeringFilter.h //
// ************************************************************************* // // ************************************************************************* //
#ifndef AVT_STAGGERING_FILTER_H #ifndef AVT_STAGGERING_FILTER_H
#define AVT_STAGGERING_FILTER_H #define AVT_STAGGERING_FILTER_H
#include <filters_exports.h> #include <filters_exports.h>
#include <avtDataTreeIterator.h> #include <avtDataTreeIterator.h>
#include <string> #include <string>
// **************************************************************************** // ****************************************************************************
// Class: avtStaggeringFilter // Class: avtStaggeringFilter
// //
...@@ -57,6 +59,8 @@ ...@@ -57,6 +59,8 @@
// Creation: April 24, 2012 // Creation: April 24, 2012
// //
// Modifications: // Modifications:
// Eric Brugger, Tue Jul 22 08:56:12 PDT 2014
// Modified the class to work with avtDataRepresentation.
// //
// **************************************************************************** // ****************************************************************************
...@@ -71,7 +75,7 @@ class AVTFILTERS_API avtStaggeringFilter : public avtDataTreeIterator ...@@ -71,7 +75,7 @@ class AVTFILTERS_API avtStaggeringFilter : public avtDataTreeIterator
{ return "Preparing pipeline"; }; { return "Preparing pipeline"; };
protected: protected:
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string); virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void); virtual void UpdateDataObjectInfo(void);
virtual avtContract_p virtual avtContract_p
ModifyContract(avtContract_p); ModifyContract(avtContract_p);
......
...@@ -199,11 +199,9 @@ avtSurfaceFilter::Equivalent(const AttributeGroup *a) ...@@ -199,11 +199,9 @@ avtSurfaceFilter::Equivalent(const AttributeGroup *a)
// to a scaled version of the point/cell data. // to a scaled version of the point/cell data.
// //
// Arguments: // Arguments:
// inDS The input dataset. // inDR The input data representation.
// <unused> The domain number.
// <unused> The label as a string.
// //
// Returns: The output dataset. // Returns: The output data representation.
// //
// Programmer: Kathleen Bonnell // Programmer: Kathleen Bonnell
// Creation: March 05, 2001 // Creation: March 05, 2001
...@@ -287,11 +285,19 @@ avtSurfaceFilter::Equivalent(const AttributeGroup *a) ...@@ -287,11 +285,19 @@ avtSurfaceFilter::Equivalent(const AttributeGroup *a)
// Kathleen Biagas, Fri Sep 7 13:13:09 MST 2012 // Kathleen Biagas, Fri Sep 7 13:13:09 MST 2012
// Preserve scalars data type when using input scalars. // Preserve scalars data type when using input scalars.
// //
// Eric Brugger, Tue Jul 22 09:07:32 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * avtDataRepresentation *
avtSurfaceFilter::ExecuteData(vtkDataSet *inDS, int, std::string) avtSurfaceFilter::ExecuteData(avtDataRepresentation *inDR)
{ {
//
// Get the VTK data set.
//
vtkDataSet *inDS = inDR->GetDataVTK();
vtkDataArray *inScalars = NULL; vtkDataArray *inScalars = NULL;
vtkDataArray *outScalars = NULL; vtkDataArray *outScalars = NULL;
bool zf = atts.GetZeroFlag(); bool zf = atts.GetZeroFlag();
...@@ -443,12 +449,14 @@ avtSurfaceFilter::ExecuteData(vtkDataSet *inDS, int, std::string) ...@@ -443,12 +449,14 @@ avtSurfaceFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
if (cd2pd != NULL) if (cd2pd != NULL)
cd2pd->Delete(); cd2pd->Delete();
ManageMemory(outUG);
outUG->Delete();
filter->Delete(); filter->Delete();
return (vtkDataSet*) outUG; avtDataRepresentation *outDR = new avtDataRepresentation(outUG,
inDR->GetDomain(), inDR->GetLabel());
outUG->Delete();
return outDR;
} }
......
...@@ -50,10 +50,6 @@ ...@@ -50,10 +50,6 @@
#include <SurfaceFilterAttributes.h> #include <SurfaceFilterAttributes.h>
class vtkDataSet;
class vtkSurfaceFilter;
// **************************************************************************** // ****************************************************************************
// Class: avtSurfaceFilter // Class: avtSurfaceFilter
// //
...@@ -103,6 +99,9 @@ class vtkSurfaceFilter; ...@@ -103,6 +99,9 @@ class vtkSurfaceFilter;
// Hank Childs, Fri Mar 4 08:47:07 PST 2005 // Hank Childs, Fri Mar 4 08:47:07 PST 2005
// Removed cd2pd. // Removed cd2pd.
// //
// Eric Brugger, Tue Jul 22 09:06:43 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
class AVTFILTERS_API avtSurfaceFilter : public avtDataTreeIterator class AVTFILTERS_API avtSurfaceFilter : public avtDataTreeIterator
...@@ -133,7 +132,7 @@ class AVTFILTERS_API avtSurfaceFilter : public avtDataTreeIterator ...@@ -133,7 +132,7 @@ class AVTFILTERS_API avtSurfaceFilter : public avtDataTreeIterator
double SkewTheValue(const double); double SkewTheValue(const double);
void CalculateScaleValues(double *, double*); void CalculateScaleValues(double *, double*);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string); virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void); virtual void UpdateDataObjectInfo(void);
virtual void VerifyInput(void); virtual void VerifyInput(void);
virtual void PreExecute(void); virtual void PreExecute(void);
......
...@@ -251,9 +251,7 @@ avtTransform::~avtTransform() ...@@ -251,9 +251,7 @@ avtTransform::~avtTransform()
// Executes the transform on the specified domain. // Executes the transform on the specified domain.
// //
// Arguments: // Arguments:
// in_ds The input dataset. // in_dr The input data representation.
// <unnamed> The domain number.
// <unnamed> The label.
// //
// Programmer: Hank Childs // Programmer: Hank Childs
// Creation: November 27, 2000 // Creation: November 27, 2000
...@@ -293,21 +291,36 @@ avtTransform::~avtTransform() ...@@ -293,21 +291,36 @@ avtTransform::~avtTransform()
// Kathleen Biagas, Fri Jan 25 16:39:17 PST 2013 // Kathleen Biagas, Fri Jan 25 16:39:17 PST 2013
// Call Update on filter, not data object. // Call Update on filter, not data object.
// //
// Eric Brugger, Tue Jul 22 12:07:56 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * avtDataRepresentation *
avtTransform::ExecuteData(vtkDataSet *in_ds, int, std::string) avtTransform::ExecuteData(avtDataRepresentation *in_dr)
{ {
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
vtkMatrix4x4 *mat = GetTransform(); vtkMatrix4x4 *mat = GetTransform();
if (IsIdentity(mat)) if (IsIdentity(mat))
{ {
return in_ds; return in_dr;
} }
int datatype = in_ds->GetDataObjectType(); int datatype = in_ds->GetDataObjectType();
if (datatype == VTK_RECTILINEAR_GRID) if (datatype == VTK_RECTILINEAR_GRID)
{ {
return TransformRectilinear((vtkRectilinearGrid *) in_ds); vtkDataSet *out_ds = TransformRectilinear((vtkRectilinearGrid *) in_ds);
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ds->Delete();
return out_dr;
} }
vtkTransformFilter *transform = vtkTransformFilter::New(); vtkTransformFilter *transform = vtkTransformFilter::New();
...@@ -337,10 +350,12 @@ avtTransform::ExecuteData(vtkDataSet *in_ds, int, std::string) ...@@ -337,10 +350,12 @@ avtTransform::ExecuteData(vtkDataSet *in_ds, int, std::string)
transform->Update(); transform->Update();
vtkPointSet *out_ds = transform->GetOutput(); vtkPointSet *out_ds = transform->GetOutput();
ManageMemory(out_ds); avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
transform->Delete(); transform->Delete();
return out_ds; return out_dr;
} }
...@@ -362,6 +377,9 @@ avtTransform::ExecuteData(vtkDataSet *in_ds, int, std::string) ...@@ -362,6 +377,9 @@ avtTransform::ExecuteData(vtkDataSet *in_ds, int, std::string)
// to change to polydata or something else, just store the transform so // to change to polydata or something else, just store the transform so
// we can do the right thing later. // we can do the right thing later.
// //
// Eric Brugger, Tue Jul 22 12:07:56 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * vtkDataSet *
...@@ -405,9 +423,6 @@ avtTransform::TransformRectilinear(vtkRectilinearGrid *rgrid) ...@@ -405,9 +423,6 @@ avtTransform::TransformRectilinear(vtkRectilinearGrid *rgrid)
ct->SetTuple1(i, t->GetElement(i / 4, i % 4)); ct->SetTuple1(i, t->GetElement(i / 4, i % 4));
out->GetFieldData()->AddArray(ct); out->GetFieldData()->AddArray(ct);
ManageMemory(out);
out->Delete();
rv = out; rv = out;
} }
else else
...@@ -491,6 +506,9 @@ avtTransform::OutputIsRectilinear(vtkMatrix4x4 *mat) ...@@ -491,6 +506,9 @@ avtTransform::OutputIsRectilinear(vtkMatrix4x4 *mat)
// Kathleen Bonnell, Fri Dec 13 14:07:15 PST 2002 // Kathleen Bonnell, Fri Dec 13 14:07:15 PST 2002
// Use NewInstance instead of MakeObject, to match new vtk api. // Use NewInstance instead of MakeObject, to match new vtk api.
// //
// Eric Brugger, Tue Jul 22 12:07:56 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * vtkDataSet *
...@@ -554,14 +572,6 @@ avtTransform::TransformRectilinearToRectilinear(vtkRectilinearGrid *rgrid) ...@@ -554,14 +572,6 @@ avtTransform::TransformRectilinearToRectilinear(vtkRectilinearGrid *rgrid)
out->SetZCoordinates(z_new); out->SetZCoordinates(z_new);
z_new->Delete(); z_new->Delete();
//
// We want to reduce the reference count of this dataset so it doesn't get
// leaked. But where to store it? Fortunately, our base class handles
// this for us.
//
ManageMemory(out);
out->Delete();
return out; return out;
} }
...@@ -604,6 +614,9 @@ avtTransform::TransformRectilinearToRectilinear(vtkRectilinearGrid *rgrid) ...@@ -604,6 +614,9 @@ avtTransform::TransformRectilinearToRectilinear(vtkRectilinearGrid *rgrid)
// Kathleen Biagas, Tue Aug 21 16:49:12 MST 2012 // Kathleen Biagas, Tue Aug 21 16:49:12 MST 2012
// Preserve coordinate type. // Preserve coordinate type.
// //
// Eric Brugger, Tue Jul 22 12:07:56 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
vtkDataSet * vtkDataSet *
...@@ -721,14 +734,7 @@ avtTransform::TransformRectilinearToCurvilinear(vtkRectilinearGrid *rgrid) ...@@ -721,14 +734,7 @@ avtTransform::TransformRectilinearToCurvilinear(vtkRectilinearGrid *rgrid)
arr->Delete(); arr->Delete();
} }
//
// We want to reduce the reference count of this dataset so it doesn't get
// leaked. But where to store it? Fortunately, our base class handles
// this for us.
//
ManageMemory(out);
trans->Delete(); trans->Delete();
out->Delete();
return out; return out;
} }
......
...@@ -95,6 +95,9 @@ class vtkRectilinearGrid; ...@@ -95,6 +95,9 @@ class vtkRectilinearGrid;
// Dave Pugmire, Fri May 14 08:04:43 EDT 2010 // Dave Pugmire, Fri May 14 08:04:43 EDT 2010
// Flag for vector transformations. // Flag for vector transformations.
// //
// Eric Brugger, Tue Jul 22 12:07:11 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// **************************************************************************** // ****************************************************************************
class AVTFILTERS_API avtTransform : public virtual avtDataTreeIterator class AVTFILTERS_API avtTransform : public virtual avtDataTreeIterator
...@@ -106,13 +109,13 @@ class AVTFILTERS_API avtTransform : public virtual avtDataTreeIterator ...@@ -106,13 +109,13 @@ class AVTFILTERS_API avtTransform : public virtual avtDataTreeIterator
virtual const char *GetType(void) { return "avtTransform"; }; virtual const char *GetType(void) { return "avtTransform"; };
virtual const char *GetDescription(void) virtual const char *GetDescription(void)
{ return "Transforming data"; }; { return "Transforming data"; };
void SetVectorTransform(bool b) void SetVectorTransform(bool b)
{ transformVectors = b; } { transformVectors = b; }
protected: protected:
bool transformVectors; bool transformVectors;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string); virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual vtkMatrix4x4 *GetTransform() = 0; virtual vtkMatrix4x4 *GetTransform() = 0;
virtual void UpdateDataObjectInfo(void); virtual void UpdateDataObjectInfo(void);
......
...@@ -101,11 +101,9 @@ avtVertexNormalsFilter::~avtVertexNormalsFilter() ...@@ -101,11 +101,9 @@ avtVertexNormalsFilter::~avtVertexNormalsFilter()
// Sends the specified input and output through the VertexNormals filter. // Sends the specified input and output through the VertexNormals filter.
// //
// Arguments: // Argu