Commit 2f0c84df 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@23820 18c085ea-50e0-402c-830e-de6fd14e8384
parent d599d82e
......@@ -107,11 +107,9 @@ avtGhostZoneFilter::~avtGhostZoneFilter()
// Sends the specified input and output through the GhostZone filter.
//
// Arguments:
// in_ds The input dataset.
// domain The domain number.
// <unused> The label associated with this dataset.
// in_ds The input data representation.
//
// Returns: The output dataset.
// Returns: The output data representation.
//
// Programmer: Kathleen Bonnell
// Creation: May 1, 2001
......@@ -156,15 +154,24 @@ avtGhostZoneFilter::~avtGhostZoneFilter()
// Bug fix: Consider ghostZoneTypesToRemove and ghostNodeTypesToRemove
// when checking if data is all ghost.
//
// Eric Brugger, Mon Jul 21 13:22:30 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
avtDataRepresentation *
avtGhostZoneFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set and domain number.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
int domain = in_dr->GetDomain();
if (in_ds->GetNumberOfCells() == 0)
{
debug5 << "No Cells in input! domain: " << domain << endl;
return in_ds;
return in_dr;
}
bool haveGhostZones =
......@@ -177,7 +184,7 @@ avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
// No ghost cells, no need to use this filter.
//
debug5 << "No Ghost Zones present! domain: " << domain << endl;
return in_ds;
return in_dr;
}
//
......@@ -237,7 +244,7 @@ avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
debug5 << "Allow rectilinear grid to travel through with ghost data;"
<< " depending on mapper to remove ghost data during render."
<< endl;
return in_ds;
return in_dr;
}
if (in_ds->GetDataObjectType() == VTK_STRUCTURED_GRID &&
......@@ -246,7 +253,7 @@ avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
debug5 << "Allow structured grid to travel through with ghost data;"
<< " depending on mapper to remove ghost data during render."
<< endl;
return in_ds;
return in_dr;
}
debug5 << "Using vtkDataSetRemoveGhostCells" << endl;
......@@ -266,16 +273,22 @@ avtGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
//
filter->Update();
vtkDataSet *outDS = filter->GetOutput();
outDS->Register(NULL);
filter->Delete();
if (outDS->GetNumberOfCells() == 0)
{
outDS->Delete();
outDS = NULL;
}
ManageMemory(outDS);
filter->Delete();
avtDataRepresentation *out_dr = new avtDataRepresentation(outDS,
in_dr->GetDomain(), in_dr->GetLabel());
if (outDS != NULL)
outDS->Delete();
return outDS;
return out_dr;
}
......
......@@ -47,9 +47,6 @@
#include <avtDataTreeIterator.h>
class vtkDataSet;
class vtkDataSetRemoveGhostCells;
// ****************************************************************************
// Class: avtGhostZoneFilter
......@@ -84,6 +81,9 @@ class vtkDataSetRemoveGhostCells;
// Hank Childs, Sun Oct 28 10:48:50 PST 2007
// Add a mode for removing only ghost zones of a certain type.
//
// Eric Brugger, Mon Jul 21 13:22:09 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class AVTFILTERS_API avtGhostZoneFilter : public avtDataTreeIterator
......@@ -118,7 +118,7 @@ class AVTFILTERS_API avtGhostZoneFilter : public avtDataTreeIterator
unsigned char ghostNodeTypesToRemove;
unsigned char ghostZoneTypesToRemove;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void);
virtual bool FilterUnderstandsTransformedRectMesh();
};
......
......@@ -671,20 +671,36 @@ avtLineScanFilter::PostExecute(void)
// Dave Bremer, Wed Dec 20 16:22:06 PST 2006
// Only use the cylindrical execute mode if we are in two dimensions.
//
// Eric Brugger, Mon Jul 21 13:32:57 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtLineScanFilter::ExecuteData(vtkDataSet *ds, int dom, std::string)
avtDataRepresentation *
avtLineScanFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
vtkDataSet *out_ds = NULL;
if (GetInput()->GetInfo().GetAttributes().GetMeshCoordType() == AVT_RZ &&
GetInput()->GetInfo().GetAttributes().GetSpatialDimension() == 2)
{
return CylindricalExecute(ds);
out_ds = CylindricalExecute(in_ds);
}
else
{
return CartesianExecute(ds);
out_ds = CartesianExecute(in_ds);
}
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ds->Delete();
return out_dr;
}
......@@ -702,6 +718,9 @@ avtLineScanFilter::ExecuteData(vtkDataSet *ds, int dom, std::string)
// Hank Childs, Mon Jun 15 22:56:06 PDT 2009
// Fix stupid off-by-one when there are more than two intersections.
//
// Eric Brugger, Mon Jul 21 13:32:57 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
......@@ -909,9 +928,6 @@ avtLineScanFilter::CartesianExecute(vtkDataSet *ds)
output->SetLines(line_cells);
line_cells->Delete();
ManageMemory(output);
output->Delete();
UpdateProgress(extraMsg*(currentNode+1), extraMsg*totalNodes);
return output;
}
......@@ -926,6 +942,10 @@ avtLineScanFilter::CartesianExecute(vtkDataSet *ds)
// Programmer: Hank Childs
// Creation: July 28, 2006
//
// Modifications:
// Eric Brugger, Mon Jul 21 13:32:57 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
......@@ -1116,9 +1136,6 @@ avtLineScanFilter::CylindricalExecute(vtkDataSet *ds)
output->SetLines(line_cells);
line_cells->Delete();
ManageMemory(output);
output->Delete();
UpdateProgress(extraMsg*(currentNode+1), extraMsg*totalNodes);
return output;
}
......
......@@ -43,11 +43,10 @@
#ifndef AVT_LINE_SCAN_FILTER_H
#define AVT_LINE_SCAN_FILTER_H
#include <filters_exports.h>
#include <avtDataTreeIterator.h>
#include <avtVector.h>
#include <filters_exports.h>
#include <string>
// ****************************************************************************
......@@ -71,6 +70,10 @@
// the same direction and evenly distributed in space. In 2D,
// use a rectangular column of rays. Rays may not cover the
// entire mesh. FYI, this is unrelated to "CylindricalExecute"
//
// Eric Brugger, Mon Jul 21 13:32:33 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class AVTFILTERS_API avtLineScanFilter : public avtDataTreeIterator
......@@ -116,7 +119,7 @@ class AVTFILTERS_API avtLineScanFilter : public avtDataTreeIterator
virtual void PreExecute(void);
virtual void PostExecute(void);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int,std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual vtkDataSet *CartesianExecute(vtkDataSet *);
virtual vtkDataSet *CylindricalExecute(vtkDataSet *);
};
......
......@@ -95,11 +95,9 @@ avtLineToPolylineFilter::~avtLineToPolylineFilter()
// Groups connected line cells into polyline cells.
//
// Arguments:
// in_ds The input dataset.
// <unused> The domain number.
// <unused> The label.
// inDR The input data representation.
//
// Returns: The output polydata.
// Returns: The output data representation.
//
// Note: The cell data copying is untested.
//
......@@ -112,6 +110,9 @@ avtLineToPolylineFilter::~avtLineToPolylineFilter()
// Break out of a loop to prevent incrementing a singular iterator.
// Use `empty' instead of 'size'.
//
// Eric Brugger, Mon Jul 21 13:51:51 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
struct edge
......@@ -148,9 +149,14 @@ struct edge
vtkIdType first, second, cellid;
};
vtkDataSet *
avtLineToPolylineFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
avtDataRepresentation *
avtLineToPolylineFilter::ExecuteData(avtDataRepresentation *inDR)
{
//
// Get the VTK data set.
//
vtkDataSet *inDS = inDR->GetDataVTK();
if (inDS->GetDataObjectType() != VTK_POLY_DATA)
{
// We only work on line data
......@@ -160,7 +166,7 @@ avtLineToPolylineFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
if (GetInput()->GetInfo().GetAttributes().GetTopologicalDimension() != 1)
{
return inDS;
return inDR;
}
int total = visitTimer->StartTimer();
......@@ -173,7 +179,7 @@ avtLineToPolylineFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
lines->Delete();
vtkCellData *inCD = input->GetCellData();
vtkCellData *outCD = output->GetCellData();
vtkCellData *outCD = output->GetCellData();
// Copy the vert cell data
for(vtkIdType i = 0; i < input->GetVerts()->GetNumberOfCells(); ++i)
......@@ -205,7 +211,6 @@ avtLineToPolylineFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
}
int grouping = visitTimer->StartTimer();
//int lineOffset = input->GetVerts()->GetNumberOfCells();
int ptsBufSize = 200;
pts = new vtkIdType[ptsBufSize];
while(!freeEdges.empty())
......@@ -309,12 +314,14 @@ avtLineToPolylineFilter::ExecuteData(vtkDataSet *inDS, int, std::string)
for(int i = 0; i < input->GetStrips()->GetNumberOfCells(); ++i)
outCD->CopyData(inCD, fromTSOffset + i, toCellId++);
ManageMemory(output);
output->Delete();
visitTimer->StopTimer(total, "avtLineToPolylineFilter::ExecuteData");
return output;
avtDataRepresentation *outDR= new avtDataRepresentation(output,
inDR->GetDomain(), inDR->GetLabel());
output->Delete();
return outDR;
}
......
......@@ -58,6 +58,8 @@
// Creation: Thu Aug 27 11:50:35 PDT 2009
//
// Modifications:
// Eric Brugger, Mon Jul 21 13:51:03 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
......@@ -72,7 +74,7 @@ class AVTFILTERS_API avtLineToPolylineFilter : virtual public avtDataTreeIterato
{ return "Grouping lines into polylines"; };
protected:
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void);
};
......
......@@ -134,11 +134,9 @@ avtLineoutFilter::avtLineoutFilter()
// Sends the specified input and output through the Lineout 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: kbonnell -- generated by xml2info
// Creation: Thu Apr 25 16:01:28 PST 2002
......@@ -164,15 +162,33 @@ avtLineoutFilter::avtLineoutFilter()
// Fix stupid mistake (missing negation of samplingOn when stripping out
// the LineoutAttributes).
//
// Eric Brugger, Mon Jul 21 14:09:11 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtLineoutFilter::ExecuteData(vtkDataSet *in_ds, int domain, std::string)
avtDataRepresentation *
avtLineoutFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set and domain number.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
int domain = in_dr->GetDomain();
vtkDataSet *out_ds = NULL;
if (!samplingOn)
return NoSampling(in_ds, domain);
out_ds = NoSampling(in_ds, domain);
else
return Sampling(in_ds, domain);
out_ds = Sampling(in_ds, domain);
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
if (out_ds != NULL)
out_ds->Delete();
return out_dr;
}
......@@ -546,6 +562,9 @@ avtLineoutFilter::CreateRGrid(vtkDataSet *ds, double *pt1, double *pt2,
// Make sure we have original cells. If we don't, back up to another lineout
// method instead of failing.
//
// Eric Brugger, Mon Jul 21 14:09:11 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
double
......@@ -741,6 +760,7 @@ avtLineoutFilter::NoSampling(vtkDataSet *in_ds, int domain)
{
debug5 << "avtIntervalTree returned empty DS for domain "
<< domain << "." << endl;
rv->Delete();
rv = NULL;
}
......@@ -753,10 +773,6 @@ avtLineoutFilter::NoSampling(vtkDataSet *in_ds, int domain)
cell->Delete();
}
ManageMemory(rv);
if (rv != NULL)
rv->Delete();
return rv;
}
......@@ -805,6 +821,9 @@ avtLineoutFilter::NoSampling(vtkDataSet *in_ds, int domain)
// Kathleen Biagas, Fri Jan 25 16:04:46 PST 2013
// Call Update on the filter, not the data object.
//
// Eric Brugger, Mon Jul 21 14:09:11 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
......@@ -822,6 +841,7 @@ avtLineoutFilter::Sampling(vtkDataSet *in_ds, int domain)
vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(filter->GetInformation(), 0);
filter->Update();
vtkPolyData *outPolys = filter->GetOutput();
outPolys->Register(NULL);
vtkDataSet *rv = outPolys;
if (outPolys->GetNumberOfCells() == 0 ||
......@@ -829,10 +849,10 @@ avtLineoutFilter::Sampling(vtkDataSet *in_ds, int domain)
{
debug5 << "vtkLineoutFilter returned empty DS for domain "
<< domain << "." << endl;
rv->Delete();
rv = NULL;
}
ManageMemory(rv);
filter->Delete();
ghosts->Delete();
......
......@@ -46,7 +46,6 @@
#include <avtPluginDataTreeIterator.h>
class vtkDataSet;
class vtkIdList;
class vtkPoints;
......@@ -95,6 +94,9 @@ class vtkRectilinearGrid;
// Kathleen Bonnell, Thu Mar 6 09:07:33 PST 2008
// Add AVT_FILTERS_API for build on windows.
//
// Eric Brugger, Mon Jul 21 14:08:32 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class AVTFILTERS_API avtLineoutFilter : public avtDataTreeIterator
......@@ -123,7 +125,7 @@ class AVTFILTERS_API avtLineoutFilter : public avtDataTreeIterator
bool samplingOn;
int numberOfSamplePoints;
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void PostExecute(void);
virtual void VerifyInput(void);
virtual void UpdateDataObjectInfo(void);
......
......@@ -178,33 +178,41 @@ avtMeshLogFilter_ScaleValuesHelper(vtkDataArray *a, bool inv,
// Kathleen Biagas, Fri Mar 23 18:34:01 MST 2012
// Use new templated methods for scaling.
//
// Eric Brugger, Mon Jul 21 14:26:26 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtMeshLogFilter::ExecuteData(vtkDataSet *ds, int, std::string)
avtDataRepresentation *
avtMeshLogFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
if (xScaleMode == LINEAR && yScaleMode == LINEAR)
return ds;
return in_dr;
vtkDataSet *rv = ds->NewInstance();
rv->ShallowCopy(ds);
vtkDataSet *out_ds = in_ds->NewInstance();
out_ds->ShallowCopy(in_ds);
if (rv->GetDataObjectType() == VTK_RECTILINEAR_GRID)
if (out_ds->GetDataObjectType() == VTK_RECTILINEAR_GRID)
{
if (xScaleMode == LOG)
{
avtMeshLogFilter_ScaleValuesHelper(
((vtkRectilinearGrid*)rv)->GetXCoordinates(), useInvLogX);
((vtkRectilinearGrid*)out_ds)->GetXCoordinates(), useInvLogX);
}
if (yScaleMode == LOG)
{
avtMeshLogFilter_ScaleValuesHelper(
((vtkRectilinearGrid*)rv)->GetYCoordinates(), useInvLogY);
((vtkRectilinearGrid*)out_ds)->GetYCoordinates(), useInvLogY);
}
}
else
{
vtkDataArray *points = ((vtkPointSet*)rv)->GetPoints()->GetData();
vtkDataArray *points = ((vtkPointSet*)out_ds)->GetPoints()->GetData();
if (xScaleMode == LOG)
{
avtMeshLogFilter_ScaleValuesHelper(points, useInvLogX, 0, 3);
......@@ -214,8 +222,13 @@ avtMeshLogFilter::ExecuteData(vtkDataSet *ds, int, std::string)
avtMeshLogFilter_ScaleValuesHelper(points, useInvLogY, 1, 3);
}
}
ManageMemory(rv);
return rv;
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
out_ds->Delete();
return out_dr;
}
......
......@@ -42,12 +42,14 @@
#ifndef AVT_MESH_LOG_FILTER_H
#define AVT_MESH_LOG_FILTER_H
#include <filters_exports.h>
#include <filters_exports.h>
#include <avtDataTreeIterator.h>
#include <enumtypes.h>
// ****************************************************************************
// Class: avtMeshLogFilter
//
......@@ -58,6 +60,8 @@
// Creation: March 6, 2007
//
// Modifications:
// Eric Brugger, Mon Jul 21 14:26:01 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
......@@ -84,7 +88,7 @@ class AVTFILTERS_API avtMeshLogFilter : public avtDataTreeIterator
bool useInvLogY;
virtual void PostExecute(void);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void UpdateDataObjectInfo(void);
private:
......
......@@ -224,9 +224,9 @@ avtMissingDataFilter::PreExecute()
// Remove missing data for a single domain.
//
// Arguments:
// in_ds : The input dataset for which we're removing missing data.
// in_dr The input data representation.
//
// Returns: A new dataset that does not contain the missing data.
// Returns: The new data representation.
//
// Note:
//
......@@ -238,11 +238,19 @@ avtMissingDataFilter::PreExecute()
// Gunther H. Weber, Thu Feb 16 19:38:05 PST 2012
// Recompute "missing" if necessary in second pass.
//
// Eric Brugger, Mon Jul 21 14:41:07 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtMissingDataFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
avtDataRepresentation *
avtMissingDataFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
vtkDataSet *out_ds = NULL;
if(contract->GetDataRequest()->MissingDataBehavior() ==
......@@ -288,8 +296,6 @@ avtMissingDataFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
missingData->Delete();
input2 = newds;
ManageMemory(input2);
input2->Delete();
debug5 << "Missing data has been identified" << endl;
}
......@@ -374,7 +380,7 @@ avtMissingDataFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
}
thres->Update();
out_ds = thres->GetOutput();
ManageMemory(out_ds);
out_ds->Register(NULL);
thres->Delete();
// Remove the missing data array from the out_ds.
......@@ -412,7 +418,13 @@ avtMissingDataFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
}
}
return out_ds;
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
if (out_ds != in_ds)
out_ds->Delete();
return out_dr;
}
// ****************************************************************************
......
......@@ -37,10 +37,12 @@
*****************************************************************************/
#ifndef AVT_MISSING_DATA_FILTER_H
#define AVT_MISSING_DATA_FILTER_H
#include <filters_exports.h>
#include <avtDataTreeIterator.h>
#include <avtDatabaseMetaData.h>
#include <avtDataTreeIterator.h>
// ****************************************************************************
// Class: avtMissingDataFilter
......@@ -59,6 +61,9 @@
// Added canDoCollectiveCommunication flag to detect and handle when we
// are streaming.
//
// Eric Brugger, Mon Jul 21 14:40:46 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
class AVTFILTERS_API avtMissingDataFilter : public avtDataTreeIterator
......@@ -77,7 +82,7 @@ public:
protected:
virtual void PreExecute(void);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual avtDataRepresentation *ExecuteData(avtDataRepresentation *);
virtual void PostExecute(void);
virtual avtContract_p ModifyContract(avtContract_p);
......
......@@ -89,11 +89,9 @@ avtNamedSelectionFilter::~avtNamedSelectionFilter()
// Sends the specified input and output through the NamedSelection 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: Hank Childs
// Creation: February 2, 2009
......@@ -108,19 +106,27 @@ avtNamedSelectionFilter::~avtNamedSelectionFilter()
// Dave Pugmire, Thu Mar 15 10:55:22 EDT 2012
// Support for location named selections.
//
// Eric Brugger, Mon Jul 21 16:42:08 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
avtNamedSelectionFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
avtDataRepresentation *
avtNamedSelectionFilter::ExecuteData(avtDataRepresentation *in_dr)
{
//
// Get the VTK data set.
//
vtkDataSet *in_ds = in_dr->GetDataVTK();
//
// See if the input reader applied the named selection on read.
//
if (selectionId >= 0)
if (GetInput()->GetInfo().GetAttributes().GetSelectionApplied(selectionId))
return in_ds;
return in_dr;
vtkDataSet *rv = NULL;
vtkDataSet *out_ds = NULL;
avtNamedSelectionManager *nsm = avtNamedSelectionManager::GetInstance();
avtNamedSelection *ns = nsm->GetNamedSelection(selName);
if(ns == NULL)
......@@ -131,10 +137,16 @@ avtNamedSelectionFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
{
std::vector<vtkIdType> ids;
ns->GetMatchingIds(in_ds, ids);
rv = SelectedData(in_ds, ids);
out_ds = SelectedData(in_ds, ids);
}
return rv;
avtDataRepresentation *out_dr = new avtDataRepresentation(out_ds,
in_dr->GetDomain(), in_dr->GetLabel());
if (out_ds != NULL)
out_ds->Delete();
return out_dr;
}
// ****************************************************************************
......@@ -159,6 +171,9 @@ avtNamedSelectionFilter::ExecuteData(vtkDataSet *in_ds, int dom, std::string)
// Kathleen Biagas, Mon Jan 28 10:56:30 PST 2013
// Call upate on filter not data object.
//
// Eric Brugger, Mon Jul 21 16:42:08 PDT 2014
// Modified the class to work with avtDataRepresentation.
//
// ****************************************************************************
vtkDataSet *
......@@ -188,7 +203,7 @@ avtNamedSelectionFilter::SelectedData(vtkDataSet *in_ds,
vtkDataObject::FIELD_ASSOCIATION_CELLS, "_avt_thresh_var");