Commit 4c4d6f73 authored by hrchilds's avatar hrchilds

Reimplement InverseGhostZone operator to have controls over different ghost types.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@13382 18c085ea-50e0-402c-830e-de6fd14e8384
parent 98578449
......@@ -82,7 +82,7 @@ ${VISIT_INCLUDE_DIR}/visitpy/visitpy
)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${QT_LIBRARY_DIR} ${MESA_LIBRARY_DIR} ${GLEW_LIBRARY_DIR} ${VTK_LIBRARY_DIRS})
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${QT_LIBRARY_DIR} ${GLEW_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} )
ADD_LIBRARY(IInverseGhostZoneOperator ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(IInverseGhostZoneOperator visitcommon)
......@@ -124,6 +124,5 @@ IF(VISIT_PARALLEL)
ENDIF(VISIT_PARALLEL)
VISIT_INSTALL_OPERATOR_PLUGINS(${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_PREFIX(${INSTALLTARGETS})
<?xml version="1.0"?>
<Plugin name="InverseGhostZone" type="operator" label="Inverse Ghost Zone" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="InverseGhostZone.xpm" category="Debugging">
<Attribute name="InverseGhostZoneAttributes" purpose="This class contains attributes for the inverse ghost zone operator." persistent="true" keyframe="true" exportAPI="" exportInclude="">
<Enum name="ShowType">
GhostZonesOnly
GhostZonesAndRealZones
</Enum>
<Field name="requestGhostZones" label="Request Ghost Zones" type="bool">
true
</Field>
<Field name="showType" label="Zones to Display:" type="enum" subtype="ShowType">
GhostZonesOnly
<Field name="showDuplicated" label="Show Zones That Are Duplicated At Domain Boundaries" type="bool">
true
</Field>
<Field name="showEnhancedConnectivity" label="Show Enhanced Connectivity Zones" type="bool">
true
</Field>
<Field name="showReducedConnectivity" label="Show Reduced Connectivity Zones" type="bool">
true
</Field>
<Field name="showAMRRefined" label="Show zones refined out by finer patches (AMR)" type="bool">
true
</Field>
<Field name="showExterior" label="Show cells on exterior of data set" type="bool">
true
</Field>
<Field name="showNotApplicable" label="Show zones deemed not applicable to problem" type="bool">
true
</Field>
</Attribute>
</Plugin>
......@@ -38,7 +38,6 @@
#ifndef INVERSEGHOSTZONEATTRIBUTES_H
#define INVERSEGHOSTZONEATTRIBUTES_H
#include <string>
#include <AttributeSubject.h>
......@@ -60,12 +59,6 @@
class InverseGhostZoneAttributes : public AttributeSubject
{
public:
enum ShowType
{
GhostZonesOnly,
GhostZonesAndRealZones
};
// These constructors are for objects of this class
InverseGhostZoneAttributes();
InverseGhostZoneAttributes(const InverseGhostZoneAttributes &obj);
......@@ -94,22 +87,26 @@ public:
// Property setting methods
void SetRequestGhostZones(bool requestGhostZones_);
void SetShowType(ShowType showType_);
void SetShowDuplicated(bool showDuplicated_);
void SetShowEnhancedConnectivity(bool showEnhancedConnectivity_);
void SetShowReducedConnectivity(bool showReducedConnectivity_);
void SetShowAMRRefined(bool showAMRRefined_);
void SetShowExterior(bool showExterior_);
void SetShowNotApplicable(bool showNotApplicable_);
// Property getting methods
bool GetRequestGhostZones() const;
ShowType GetShowType() const;
bool GetShowDuplicated() const;
bool GetShowEnhancedConnectivity() const;
bool GetShowReducedConnectivity() const;
bool GetShowAMRRefined() const;
bool GetShowExterior() const;
bool GetShowNotApplicable() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
virtual void SetFromNode(DataNode *node);
// Enum conversion functions
static std::string ShowType_ToString(ShowType);
static bool ShowType_FromString(const std::string &, ShowType &);
protected:
static std::string ShowType_ToString(int);
public:
// Keyframing methods
virtual std::string GetFieldName(int index) const;
......@@ -121,18 +118,28 @@ public:
// IDs that can be used to identify fields in case statements
enum {
ID_requestGhostZones = 0,
ID_showType,
ID_showDuplicated,
ID_showEnhancedConnectivity,
ID_showReducedConnectivity,
ID_showAMRRefined,
ID_showExterior,
ID_showNotApplicable,
ID__LAST
};
private:
bool requestGhostZones;
int showType;
bool showDuplicated;
bool showEnhancedConnectivity;
bool showReducedConnectivity;
bool showAMRRefined;
bool showExterior;
bool showNotApplicable;
// Static class format string for type map.
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define INVERSEGHOSTZONEATTRIBUTES_TMFS "bi"
#define INVERSEGHOSTZONEATTRIBUTES_TMFS "bbbbbbb"
#endif
......@@ -59,19 +59,19 @@ import llnl.visit.Plugin;
public class InverseGhostZoneAttributes extends AttributeSubject implements Plugin
{
private static int InverseGhostZoneAttributes_numAdditionalAtts = 2;
// Enum values
public final static int SHOWTYPE_GHOSTZONESONLY = 0;
public final static int SHOWTYPE_GHOSTZONESANDREALZONES = 1;
private static int InverseGhostZoneAttributes_numAdditionalAtts = 7;
public InverseGhostZoneAttributes()
{
super(InverseGhostZoneAttributes_numAdditionalAtts);
requestGhostZones = true;
showType = SHOWTYPE_GHOSTZONESONLY;
showDuplicated = true;
showEnhancedConnectivity = true;
showReducedConnectivity = true;
showAMRRefined = true;
showExterior = true;
showNotApplicable = true;
}
public InverseGhostZoneAttributes(int nMoreFields)
......@@ -79,7 +79,12 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
super(InverseGhostZoneAttributes_numAdditionalAtts + nMoreFields);
requestGhostZones = true;
showType = SHOWTYPE_GHOSTZONESONLY;
showDuplicated = true;
showEnhancedConnectivity = true;
showReducedConnectivity = true;
showAMRRefined = true;
showExterior = true;
showNotApplicable = true;
}
public InverseGhostZoneAttributes(InverseGhostZoneAttributes obj)
......@@ -87,7 +92,12 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
super(InverseGhostZoneAttributes_numAdditionalAtts);
requestGhostZones = obj.requestGhostZones;
showType = obj.showType;
showDuplicated = obj.showDuplicated;
showEnhancedConnectivity = obj.showEnhancedConnectivity;
showReducedConnectivity = obj.showReducedConnectivity;
showAMRRefined = obj.showAMRRefined;
showExterior = obj.showExterior;
showNotApplicable = obj.showNotApplicable;
SelectAll();
}
......@@ -106,7 +116,12 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
{
// Create the return value
return ((requestGhostZones == obj.requestGhostZones) &&
(showType == obj.showType));
(showDuplicated == obj.showDuplicated) &&
(showEnhancedConnectivity == obj.showEnhancedConnectivity) &&
(showReducedConnectivity == obj.showReducedConnectivity) &&
(showAMRRefined == obj.showAMRRefined) &&
(showExterior == obj.showExterior) &&
(showNotApplicable == obj.showNotApplicable));
}
public String GetName() { return "InverseGhostZone"; }
......@@ -119,15 +134,50 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
Select(0);
}
public void SetShowType(int showType_)
public void SetShowDuplicated(boolean showDuplicated_)
{
showType = showType_;
showDuplicated = showDuplicated_;
Select(1);
}
public void SetShowEnhancedConnectivity(boolean showEnhancedConnectivity_)
{
showEnhancedConnectivity = showEnhancedConnectivity_;
Select(2);
}
public void SetShowReducedConnectivity(boolean showReducedConnectivity_)
{
showReducedConnectivity = showReducedConnectivity_;
Select(3);
}
public void SetShowAMRRefined(boolean showAMRRefined_)
{
showAMRRefined = showAMRRefined_;
Select(4);
}
public void SetShowExterior(boolean showExterior_)
{
showExterior = showExterior_;
Select(5);
}
public void SetShowNotApplicable(boolean showNotApplicable_)
{
showNotApplicable = showNotApplicable_;
Select(6);
}
// Property getting methods
public boolean GetRequestGhostZones() { return requestGhostZones; }
public int GetShowType() { return showType; }
public boolean GetShowDuplicated() { return showDuplicated; }
public boolean GetShowEnhancedConnectivity() { return showEnhancedConnectivity; }
public boolean GetShowReducedConnectivity() { return showReducedConnectivity; }
public boolean GetShowAMRRefined() { return showAMRRefined; }
public boolean GetShowExterior() { return showExterior; }
public boolean GetShowNotApplicable() { return showNotApplicable; }
// Write and read methods.
public void WriteAtts(CommunicationBuffer buf)
......@@ -135,7 +185,17 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
if(WriteSelect(0, buf))
buf.WriteBool(requestGhostZones);
if(WriteSelect(1, buf))
buf.WriteInt(showType);
buf.WriteBool(showDuplicated);
if(WriteSelect(2, buf))
buf.WriteBool(showEnhancedConnectivity);
if(WriteSelect(3, buf))
buf.WriteBool(showReducedConnectivity);
if(WriteSelect(4, buf))
buf.WriteBool(showAMRRefined);
if(WriteSelect(5, buf))
buf.WriteBool(showExterior);
if(WriteSelect(6, buf))
buf.WriteBool(showNotApplicable);
}
public void ReadAtts(int index, CommunicationBuffer buf)
......@@ -146,7 +206,22 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
SetRequestGhostZones(buf.ReadBool());
break;
case 1:
SetShowType(buf.ReadInt());
SetShowDuplicated(buf.ReadBool());
break;
case 2:
SetShowEnhancedConnectivity(buf.ReadBool());
break;
case 3:
SetShowReducedConnectivity(buf.ReadBool());
break;
case 4:
SetShowAMRRefined(buf.ReadBool());
break;
case 5:
SetShowExterior(buf.ReadBool());
break;
case 6:
SetShowNotApplicable(buf.ReadBool());
break;
}
}
......@@ -155,18 +230,23 @@ public class InverseGhostZoneAttributes extends AttributeSubject implements Plug
{
String str = new String();
str = str + boolToString("requestGhostZones", requestGhostZones, indent) + "\n";
str = str + indent + "showType = ";
if(showType == SHOWTYPE_GHOSTZONESONLY)
str = str + "SHOWTYPE_GHOSTZONESONLY";
if(showType == SHOWTYPE_GHOSTZONESANDREALZONES)
str = str + "SHOWTYPE_GHOSTZONESANDREALZONES";
str = str + "\n";
str = str + boolToString("showDuplicated", showDuplicated, indent) + "\n";
str = str + boolToString("showEnhancedConnectivity", showEnhancedConnectivity, indent) + "\n";
str = str + boolToString("showReducedConnectivity", showReducedConnectivity, indent) + "\n";
str = str + boolToString("showAMRRefined", showAMRRefined, indent) + "\n";
str = str + boolToString("showExterior", showExterior, indent) + "\n";
str = str + boolToString("showNotApplicable", showNotApplicable, indent) + "\n";
return str;
}
// Attributes
private boolean requestGhostZones;
private int showType;
private boolean showDuplicated;
private boolean showEnhancedConnectivity;
private boolean showReducedConnectivity;
private boolean showAMRRefined;
private boolean showExterior;
private boolean showNotApplicable;
}
......@@ -44,7 +44,7 @@
//
// Functions exposed to the VisIt module.
//
#define INVERSEGHOSTZONEATTRIBUTES_NMETH 6
#define INVERSEGHOSTZONEATTRIBUTES_NMETH 16
void PyInverseGhostZoneAttributes_StartUp(InverseGhostZoneAttributes *subj, void *data);
void PyInverseGhostZoneAttributes_CloseDown();
PyMethodDef * PyInverseGhostZoneAttributes_GetMethodTable(int *nMethods);
......
......@@ -132,22 +132,35 @@ QvisInverseGhostZoneWindow::CreateWindowContents()
this, SLOT(requestGhostZonesChanged(bool)));
mainLayout->addWidget(requestGhostZones, 0,0);
showTypeLabel = new QLabel(tr("Zones to Display:"), central);
mainLayout->addWidget(showTypeLabel,1,0);
showType = new QWidget(central);
showTypeButtonGroup= new QButtonGroup(showType);
QHBoxLayout *showTypeLayout = new QHBoxLayout(showType);
showTypeLayout->setMargin(0);
showTypeLayout->setSpacing(10);
QRadioButton *showTypeShowTypeGhostZonesOnly = new QRadioButton(tr("GhostZonesOnly"), showType);
showTypeButtonGroup->addButton(showTypeShowTypeGhostZonesOnly,0);
showTypeLayout->addWidget(showTypeShowTypeGhostZonesOnly);
QRadioButton *showTypeShowTypeGhostZonesAndRealZones = new QRadioButton(tr("GhostZonesAndRealZones"), showType);
showTypeButtonGroup->addButton(showTypeShowTypeGhostZonesAndRealZones,1);
showTypeLayout->addWidget(showTypeShowTypeGhostZonesAndRealZones);
connect(showTypeButtonGroup, SIGNAL(buttonClicked(int)),
this, SLOT(showTypeChanged(int)));
mainLayout->addWidget(showType, 1,1);
showDuplicated = new QCheckBox(tr("Show Zones That Are Duplicated At Domain Boundaries"), central);
connect(showDuplicated, SIGNAL(toggled(bool)),
this, SLOT(showDuplicatedChanged(bool)));
mainLayout->addWidget(showDuplicated, 1,0);
showEnhancedConnectivity = new QCheckBox(tr("Show Enhanced Connectivity Zones"), central);
connect(showEnhancedConnectivity, SIGNAL(toggled(bool)),
this, SLOT(showEnhancedConnectivityChanged(bool)));
mainLayout->addWidget(showEnhancedConnectivity, 2,0);
showReducedConnectivity = new QCheckBox(tr("Show Reduced Connectivity Zones"), central);
connect(showReducedConnectivity, SIGNAL(toggled(bool)),
this, SLOT(showReducedConnectivityChanged(bool)));
mainLayout->addWidget(showReducedConnectivity, 3,0);
showAMRRefined = new QCheckBox(tr("Show zones refined out by finer patches (AMR)"), central);
connect(showAMRRefined, SIGNAL(toggled(bool)),
this, SLOT(showAMRRefinedChanged(bool)));
mainLayout->addWidget(showAMRRefined, 4,0);
showExterior = new QCheckBox(tr("Show cells on exterior of data set"), central);
connect(showExterior, SIGNAL(toggled(bool)),
this, SLOT(showExteriorChanged(bool)));
mainLayout->addWidget(showExterior, 5,0);
showNotApplicable = new QCheckBox(tr("Show zones deemed not applicable to problem"), central);
connect(showNotApplicable, SIGNAL(toggled(bool)),
this, SLOT(showNotApplicableChanged(bool)));
mainLayout->addWidget(showNotApplicable, 6,0);
}
......@@ -188,11 +201,35 @@ QvisInverseGhostZoneWindow::UpdateWindow(bool doAll)
requestGhostZones->setChecked(atts->GetRequestGhostZones());
requestGhostZones->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showType:
showTypeButtonGroup->blockSignals(true);
if(showTypeButtonGroup->button((int)atts->GetShowType()) != 0)
showTypeButtonGroup->button((int)atts->GetShowType())->setChecked(true);
showTypeButtonGroup->blockSignals(false);
case InverseGhostZoneAttributes::ID_showDuplicated:
showDuplicated->blockSignals(true);
showDuplicated->setChecked(atts->GetShowDuplicated());
showDuplicated->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showEnhancedConnectivity:
showEnhancedConnectivity->blockSignals(true);
showEnhancedConnectivity->setChecked(atts->GetShowEnhancedConnectivity());
showEnhancedConnectivity->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showReducedConnectivity:
showReducedConnectivity->blockSignals(true);
showReducedConnectivity->setChecked(atts->GetShowReducedConnectivity());
showReducedConnectivity->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showAMRRefined:
showAMRRefined->blockSignals(true);
showAMRRefined->setChecked(atts->GetShowAMRRefined());
showAMRRefined->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showExterior:
showExterior->blockSignals(true);
showExterior->setChecked(atts->GetShowExterior());
showExterior->blockSignals(false);
break;
case InverseGhostZoneAttributes::ID_showNotApplicable:
showNotApplicable->blockSignals(true);
showNotApplicable->setChecked(atts->GetShowNotApplicable());
showNotApplicable->blockSignals(false);
break;
}
}
......@@ -235,14 +272,56 @@ QvisInverseGhostZoneWindow::requestGhostZonesChanged(bool val)
void
QvisInverseGhostZoneWindow::showTypeChanged(int val)
QvisInverseGhostZoneWindow::showDuplicatedChanged(bool val)
{
if(val != atts->GetShowType())
{
atts->SetShowType(InverseGhostZoneAttributes::ShowType(val));
SetUpdate(false);
Apply();
}
atts->SetShowDuplicated(val);
SetUpdate(false);
Apply();
}
void
QvisInverseGhostZoneWindow::showEnhancedConnectivityChanged(bool val)
{
atts->SetShowEnhancedConnectivity(val);
SetUpdate(false);
Apply();
}
void
QvisInverseGhostZoneWindow::showReducedConnectivityChanged(bool val)
{
atts->SetShowReducedConnectivity(val);
SetUpdate(false);
Apply();
}
void
QvisInverseGhostZoneWindow::showAMRRefinedChanged(bool val)
{
atts->SetShowAMRRefined(val);
SetUpdate(false);
Apply();
}
void
QvisInverseGhostZoneWindow::showExteriorChanged(bool val)
{
atts->SetShowExterior(val);
SetUpdate(false);
Apply();
}
void
QvisInverseGhostZoneWindow::showNotApplicableChanged(bool val)
{
atts->SetShowNotApplicable(val);
SetUpdate(false);
Apply();
}
......@@ -87,12 +87,20 @@ class QvisInverseGhostZoneWindow : public QvisOperatorWindow
virtual void GetCurrentValues(int which_widget);
private slots:
void requestGhostZonesChanged(bool val);
void showTypeChanged(int val);
void showDuplicatedChanged(bool val);
void showEnhancedConnectivityChanged(bool val);
void showReducedConnectivityChanged(bool val);
void showAMRRefinedChanged(bool val);
void showExteriorChanged(bool val);
void showNotApplicableChanged(bool val);
private:
QCheckBox *requestGhostZones;
QWidget *showType;
QButtonGroup *showTypeButtonGroup;
QLabel *showTypeLabel;
QCheckBox *showDuplicated;
QCheckBox *showEnhancedConnectivity;
QCheckBox *showReducedConnectivity;
QCheckBox *showAMRRefined;
QCheckBox *showExterior;
QCheckBox *showNotApplicable;
InverseGhostZoneAttributes *atts;
};
......
......@@ -44,7 +44,11 @@
#include <vtkCellData.h>
#include <vtkDataSet.h>
#include <vtkFloatArray.h>
#include <vtkPointData.h>
#include <vtkThreshold.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
// ****************************************************************************
......@@ -160,6 +164,10 @@ avtInverseGhostZoneFilter::Equivalent(const AttributeGroup *a)
// Sean Ahern, Thu Aug 21 14:25:51 EDT 2008
// When there are no ghost zones, the inverse is a NULL mesh.
//
// Hank Childs, Wed Dec 29 18:04:21 PST 2010
// Reimplement routine to allow for selecting individual types of ghost
// cells.
//
// ****************************************************************************
vtkDataSet *
......@@ -174,34 +182,88 @@ avtInverseGhostZoneFilter::ExecuteData(vtkDataSet *in_ds, int, std::string)
//
// Make an output that is identical to the input.
//
vtkDataSet *out_ds = (vtkDataSet *) in_ds->NewInstance();
out_ds->ShallowCopy(in_ds);
vtkDataSet *temp_ds = (vtkDataSet *) in_ds->NewInstance();
temp_ds->ShallowCopy(in_ds);
temp_ds->GetCellData()->RemoveArray("avtGhostZones");
if (atts.GetShowType() == InverseGhostZoneAttributes::GhostZonesOnly)
unsigned int mask = 0;
if (atts.GetShowDuplicated())
{
int m = 1;
for (int i = 0 ; i < DUPLICATED_ZONE_INTERNAL_TO_PROBLEM ; i++)
m *= 2;
mask |= m;
}
if (atts.GetShowEnhancedConnectivity())
{
int m = 1;
for (int i = 0 ; i < ENHANCED_CONNECTIVITY_ZONE ; i++)
m *= 2;
mask |= m;
}
if (atts.GetShowReducedConnectivity())
{
int m = 1;
for (int i = 0 ; i < REDUCED_CONNECTIVITY_ZONE ; i++)
m *= 2;
mask |= m;
}
if (atts.GetShowAMRRefined())
{
int m = 1;
for (int i = 0 ; i < REFINED_ZONE_IN_AMR_GRID ; i++)
m *= 2;
mask |= m;
}
if (atts.GetShowExterior())
{
int nCells = in_ds->GetNumberOfCells();
unsigned char *gza = ((vtkUnsignedCharArray*)gz)->GetPointer(0);
vtkUnsignedCharArray *ghostZones = vtkUnsignedCharArray::New();
ghostZones->SetName("avtGhostZones");
ghostZones->Allocate(nCells);
for (int i = 0 ; i < nCells ; i++)
{
unsigned char ghost = (gza[i] == 0 ? 1 : 0);
ghostZones->InsertNextValue(ghost);
}
out_ds->GetCellData()->RemoveArray("avtGhostZones");
if (out_ds->GetFieldData()->GetArray("avtRealDims") != NULL)
out_ds->GetFieldData()->RemoveArray("avtRealDims");
out_ds->GetCellData()->AddArray(ghostZones);
ghostZones->Delete();
int m = 1;
for (int i = 0 ; i < ZONE_EXTERIOR_TO_PROBLEM ; i++)
m *= 2;
mask |= m;
}
else
if (atts.GetShowNotApplicable())
{
out_ds->GetCellData()->RemoveArray("avtGhostZones");
int m = 1;
for (int i = 0 ; i < ZONE_NOT_APPLICABLE_TO_PROBLEM ; i++)
m *= 2;
mask |= m;
}
int nCells = in_ds->GetNumberOfCells();
unsigned char *gza = ((vtkUnsignedCharArray*)gz)->GetPointer(0);
vtkFloatArray *retainThese = vtkFloatArray::New();
retainThese->SetName("avtRetainThese");
retainThese->Allocate(nCells);
for (int i = 0 ; i < nCells ; i++)
{
retainThese->InsertNextValue(gza[i] & mask ? 1.0 : 0.0);
}
temp_ds->GetCellData()->RemoveArray("avtGhostZones");
if (temp_ds->GetFieldData()->GetArray("avtRealDims") != NULL)
temp_ds->GetFieldData()->RemoveArray("avtRealDims");
temp_ds->GetCellData()->AddArray(retainThese);
temp_ds->GetCellData()->SetActiveScalars("avtRetainThese");
vtkThreshold *t = vtkThreshold::New();
t->ThresholdBetween(0.5, 1.5);
t->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_CELLS,
"avtRetainThese");
t->SetInput(temp_ds);
vtkDataSet *out_ds = t->GetOutput();
out_ds->Update();
out_ds->GetCellData()->RemoveArray("avtRetainThese");
if (in_ds->GetCellData()->GetScalars() != NULL)
out_ds->GetCellData()->SetActiveScalars(
in_ds->GetCellData()->GetScalars()->GetName());
if (in_ds->GetPointData()->GetScalars() != NULL)
out_ds->GetPointData()->SetActiveScalars(
in_ds->GetPointData()->GetScalars()->GetName());
retainThese->Delete();
ManageMemory(out_ds);
out_ds->Delete();
t->Delete();
if (out_ds->GetNumberOfCells() == 0)
return NULL;
return out_ds;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment