本文整理汇总了C++中avtDataObject_p类的典型用法代码示例。如果您正苦于以下问题:C++ avtDataObject_p类的具体用法?C++ avtDataObject_p怎么用?C++ avtDataObject_p使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了avtDataObject_p类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: avtMatrix
void
avtMinMaxQuery::Preparation(avtDataObject_p inData)
{
avtDataRequest_p dataRequest = inData->GetOriginatingSource()
->GetGeneralContract()->GetDataRequest();
src = inData->GetQueryableSource();
intVector dlist;
dataRequest->GetSIL().GetDomainList(dlist);
if (dlist.size() == 1 && dataRequest->UsesAllDomains())
singleDomain = true;
else
singleDomain = false;
avtDataAttributes &inAtts = inData->GetInfo().GetAttributes();
if (inAtts.HasInvTransform() && inAtts.GetCanUseInvTransform())
{
invTransform = new avtMatrix(*(inAtts.GetInvTransform()));
}
else
{
invTransform = NULL;
}
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:25,代码来源:avtMinMaxQuery.C
示例2:
void
avtPseudocolorPlot::SetCellCountMultiplierForSRThreshold(
const avtDataObject_p dob)
{
if (dob->GetInfo().GetAttributes().GetTopologicalDimension() > 0)
{
// Not a point var, no multiplier.
cellCountMultiplierForSRThreshold = 1.0;
}
else
{
//
// Actual polygon count can change on-the-fly based on point type,
// and does not require re-execution of the engine (where the
// cell count is important, and queried from.)
// Using the current polgyon count doesn't make sense,
// the default point-type is 'Point' which does not do any
// glyhing. If we return 1, then we may never switch into SR
// mode even when necessary (if user changes type to icosahedron
// in 3D, which adds 20 polys per point).
// Always using the maximum may be overkill, but it seems best
// under the circumstances.
//
if (dob->GetInfo().GetAttributes().GetSpatialDimension() == 3)
cellCountMultiplierForSRThreshold = 20.0;
else
cellCountMultiplierForSRThreshold = 12.0;
}
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:29,代码来源:avtPseudocolorPlot.C
示例3: CopyTo
void
avtNullDataSink::SetTypedInput(avtDataObject_p in)
{
if (*in != NULL &&
(strcmp(in->GetType(), "avtNullData") != 0) &&
(strcmp(in->GetType(), AVT_NULL_IMAGE_MSG) != 0) &&
(strcmp(in->GetType(), AVT_NULL_DATASET_MSG) != 0))
{
EXCEPTION0(ImproperUseException);
}
CopyTo(input, in);
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:14,代码来源:avtNullDataSink.C
示例4: AddSelectionProperties
void
avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob,
const SelectionProperties &selProps, avtNamedSelectionExtension *ext)
{
const char *mName = "avtNamedSelectionManager::CreateNamedSelection: ";
StackTimer t0("CreateNamedSelection");
if (strcmp(dob->GetType(), "avtDataset") != 0)
{
EXCEPTION1(VisItException, "Named selections only work on data sets");
}
// Save the selection properties.
AddSelectionProperties(selProps);
// Augment the contract based on the selection properties.
avtContract_p c0 = dob->GetContractFromPreviousExecution();
bool needsUpdate = false;
avtContract_p contract = ext->ModifyContract(c0, selProps, needsUpdate);
//
// Let the input try to create the named selection ... some have special
// logic, for example the parallel coordinates filter.
//
const std::string &selName = selProps.GetName();
avtNamedSelection *ns = NULL;
if(selProps.GetSelectionType() == SelectionProperties::BasicSelection)
{
ns = dob->GetSource()->CreateNamedSelection(contract, selName);
if (ns != NULL)
{
int curSize = selList.size();
selList.resize(curSize+1);
selList[curSize] = ns;
//
// Save out the named selection in case of engine crash /
// save/restore session, etc.
//
SaveNamedSelection(selName, true);
return;
}
}
//
// Call into the extension to get the per-processor named selection.
//
TimedCodeBlock("Creating selection in extension",
ns = ext->GetSelection(dob, selProps, cache);
);
开发者ID:EricAlex,项目名称:ThirdParty-dev,代码行数:50,代码来源:avtNamedSelectionManager.C
示例5: CopyTo
void
avtImageSink::SetTypedInput(avtDataObject_p in)
{
if (*in != NULL && strcmp(in->GetType(), "avtImage") != 0)
{
//
// Should create a new exception here, but I'm under time constraints.
//
debug1 << "Looking for avtImage, but found type \""
<< in->GetType() << "\"." << endl;
EXCEPTION0(ImproperUseException);
}
CopyTo(input, in);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:15,代码来源:avtImageSink.C
示例6:
void
avtDisplacePluginFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
outAtts.AddFilterMetaData("Displace");
}
开发者ID:ahota,项目名称:visit_intel,代码行数:7,代码来源:avtDisplacePluginFilter.C
示例7: avtStaggeringFilter
avtDataObject_p
avtPseudocolorPlot::ApplyOperators(avtDataObject_p input)
{
avtDataObject_p dob = input;
if (staggeringFilter != NULL) {
delete staggeringFilter;
staggeringFilter = NULL;
}
staggeringFilter = new avtStaggeringFilter();
staggeringFilter->SetInput(dob);
dob = staggeringFilter->GetOutput();
if (input->GetInfo().GetAttributes().GetTopologicalDimension() == 0)
{
if (pcfilter != NULL)
{
delete pcfilter;
}
pcfilter = new avtPseudocolorFilter();
pcfilter->SetInput(dob);
pcfilter->SetPlotAtts(&atts);
dob = pcfilter->GetOutput();
}
return dob;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:27,代码来源:avtPseudocolorPlot.C
示例8:
void
avtExternalSurfaceFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
outAtts.AddFilterMetaData("ExternalSurface");
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:7,代码来源:avtExternalSurfaceFilter.C
示例9: SNPRINTF
void
avtTransformFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
const TransformAttributes &tf = ((const avtTransformFilter *)This)->atts;
char tmp[200];
std::string scale, translate, rotate;
if(tf.GetDoScale())
{
SNPRINTF(tmp, 200, "scale=%lg,%lg,%lg ",
tf.GetScaleX(), tf.GetScaleY(), tf.GetScaleZ());
scale = tmp;
}
if(tf.GetDoTranslate())
{
SNPRINTF(tmp, 200, "translate=%lg,%lg,%lg ",
tf.GetTranslateX(), tf.GetTranslateY(), tf.GetTranslateZ());
translate = tmp;
}
if(tf.GetDoRotate())
{
SNPRINTF(tmp, 200, "rotateOrigin=%lg,%lg,%lg rotateAxis=%lg,%lg,%lg rotateAmount=%lg",
tf.GetRotateOrigin()[0], tf.GetRotateOrigin()[1], tf.GetRotateOrigin()[2],
tf.GetRotateAxis()[0], tf.GetRotateAxis()[1], tf.GetRotateAxis()[2],
tf.GetRotateAmount());
rotate = tmp;
}
outAtts.AddFilterMetaData("Transform", scale + translate + rotate);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:31,代码来源:avtTransformFilter.C
示例10: Preparation
avtDataObject_p
avtOriginalDataMinMaxQuery::ApplyFilters(avtDataObject_p inData)
{
Preparation(inData);
avtDataRequest_p dataRequest =
inData->GetOriginatingSource()->GetFullDataRequest();
if (dataRequest->GetVariable() != queryAtts.GetVariables()[0] ||
dataRequest->GetTimestep() != queryAtts.GetTimeStep() ||
timeVarying)
{
dataRequest = new avtDataRequest(queryAtts.GetVariables()[0].c_str(),
queryAtts.GetTimeStep(),
dataRequest->GetRestriction());
}
avtContract_p contract =
new avtContract(dataRequest, queryAtts.GetPipeIndex());
if (ParallelizingOverTime())
{
// Make sure we set up our request to do streaming.
contract->SetOnDemandStreaming(true);
contract->UseLoadBalancing(false);
}
avtDataObject_p temp;
CopyTo(temp, inData);
eef->SetInput(temp);
avtDataObject_p retObj = eef->GetOutput();
retObj->Update(contract);
return retObj;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:33,代码来源:avtOriginalDataMinMaxQuery.C
示例11: Preparation
avtDataObject_p
avtActualDataMinMaxQuery::ApplyFilters(avtDataObject_p inData)
{
Preparation(inData);
bool zonesPreserved = GetInput()->GetInfo().GetValidity().GetZonesPreserved();
zonesPreserved = (bool)UnifyMinimumValue((int)zonesPreserved);
if (!timeVarying && zonesPreserved)
{
avtContract_p contract =
inData->GetOriginatingSource()->GetGeneralContract();
avtDataset_p ds;
CopyTo(ds, inData);
avtSourceFromAVTDataset termsrc(ds);
avtDataObject_p obj = termsrc.GetOutput();
condense->SetInput(obj);
avtDataObject_p retObj = condense->GetOutput();
retObj->Update(contract);
return retObj;
}
else
{
avtDataRequest_p oldSpec = inData->GetOriginatingSource()->
GetGeneralContract()->GetDataRequest();
avtDataRequest_p newDS = new
avtDataRequest(oldSpec, querySILR);
newDS->SetTimestep(queryAtts.GetTimeStep());
newDS->SetVariable(queryAtts.GetVariables()[0].c_str());
if (!zonesPreserved)
newDS->TurnZoneNumbersOn();
avtContract_p contract =
new avtContract(newDS, queryAtts.GetPipeIndex());
avtDataObject_p temp;
CopyTo(temp, inData);
condense->SetInput(temp);
avtDataObject_p retObj = condense->GetOutput();
retObj->Update(contract);
return retObj;
}
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:46,代码来源:avtActualDataMinMaxQuery.C
示例12: CopyTo
// ****************************************************************************
// Method: avtConnComponentsWeightedVariableQuery::ApplyFilters
//
// Purpose:
// Applies the filters to the input.
//
// Programmer: Cyrus Harrison
// Creation: February 2, 2007
//
// Modifications:
// Cyrus Harrison, Mon Jun 6 17:04:12 PDT 2011
// Support lines.
//
// ****************************************************************************
avtDataObject_p
avtConnComponentsWeightedVariableQuery::ApplyFilters(avtDataObject_p inData)
{
//
// Create an artificial pipeline.
//
avtDataset_p ds;
CopyTo(ds, inData);
avtSourceFromAVTDataset termsrc(ds);
avtDataObject_p dob = termsrc.GetOutput();
// add either lengthFilter, areaFilter, or volumeFilter based on input dimension
int topo = GetInput()->GetInfo().GetAttributes().GetTopologicalDimension();
if (topo == 1)
{
debug5 << "ConnComponentsWeightedVariable query using length" << endl;
lengthFilter->SetInput(dob);
dob = lengthFilter->GetOutput();
}
else if (topo == 2)
{
if (GetInput()->GetInfo().GetAttributes().GetMeshCoordType()== AVT_XY)
{
debug5 << "ConnComponentsWeightedVariable query using "
<< "Area" << endl;
areaFilter->SetInput(dob);
dob = areaFilter->GetOutput();
}
else
{
debug5 << "ConnComponentsWeightedVariable query using "
<< "RevolvedVolume" << endl;
revolvedVolumeFilter->SetInput(dob);
dob = revolvedVolumeFilter->GetOutput();
}
}
else
{
debug5 << "ConnComponentsWeightedVariable query using "
<< "Volume" << endl;
volumeFilter->SetInput(dob);
dob = volumeFilter->GetOutput();
}
cclFilter->SetInput(dob);
dob = cclFilter->GetOutput();
avtContract_p contract =
inData->GetOriginatingSource()->GetGeneralContract();
cclFilter->GetOutput()->Update(contract);
return cclFilter->GetOutput();
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:71,代码来源:avtConnComponentsWeightedVariableQuery.C
示例13:
avtDataObject_p
avtHistogramPlot::ApplyOperators(avtDataObject_p input)
{
#ifdef ENGINE
if (HistogramFilter != NULL)
delete HistogramFilter;
if (amountFilter != NULL)
delete amountFilter;
avtDataAttributes &in_atts = input->GetInfo().GetAttributes();
avtExpressionFilter *af = NULL;
if (in_atts.GetTopologicalDimension() == 3)
{
af = new avtVMetricVolume;
}
else
{
if (in_atts.GetSpatialDimension() == 2)
{
if (input->GetInfo().GetAttributes().GetMeshCoordType() == AVT_XY)
af = new avtVMetricArea;
else
af = new avtRevolvedVolume;
}
else
af = new avtVMetricArea;
}
af->SetOutputVariableName("_amounts");
af->SetInput(input);
amountFilter = af;
HistogramFilter = new avtHistogramFilter;
HistogramFilter->SetAttributes(atts);
if (atts.GetHistogramType() != HistogramAttributes::Frequency)
HistogramFilter->SetInput(af->GetOutput());
else
HistogramFilter->SetInput(input);
return HistogramFilter->GetOutput();
#endif
return input;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:42,代码来源:avtHistogramPlot.C
示例14: SNPRINTF
void
avtResamplePluginFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
const ResampleAttributes &rs = ((const avtResamplePluginFilter *)This)->atts;
char params[200];
SNPRINTF(params, 200, "nx=%d ny=%d nz=%d",
rs.GetSamplesX(), rs.GetSamplesY(), rs.GetSamplesZ());
outAtts.AddFilterMetaData("Resample", params);
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:12,代码来源:avtResamplePluginFilter.C
示例15: CopyTo
avtDataObject_p
avtLocalizedCompactnessFactorQuery::ApplyFilters(avtDataObject_p inData)
{
//
// Create an artificial pipeline.
//
avtDataset_p ds;
CopyTo(ds, inData);
avtSourceFromAVTDataset termsrc(ds);
avtDataObject_p dob = termsrc.GetOutput();
double extents[6] = { 0, 0, 0, 0, 0, 0 };
avtDatasetExaminer::GetSpatialExtents(ds, extents);
avtConstantCreatorExpression ccf;
ccf.SetValue(1.0);
ccf.SetInput(dob);
ccf.SetOutputVariableName("is_material");
dob = ccf.GetOutput();
InternalResampleAttributes res_atts;
res_atts.SetDefaultVal(0.);
bool is2D = (dob->GetInfo().GetAttributes().GetSpatialDimension() < 3);
int res = (is2D ? 250000 : 2000000);
res_atts.SetTargetVal(res);
res_atts.SetUseTargetVal(true);
res_atts.SetUseBounds(true);
res_atts.SetMinX(extents[0]);
res_atts.SetMaxX(extents[1]);
res_atts.SetMinY(extents[2]);
res_atts.SetMaxY(extents[3]);
res_atts.SetMinZ(extents[4]);
res_atts.SetMaxZ(extents[5]);
avtResampleFilter resf(&res_atts);
resf.SetInput(dob);
dob = resf.GetOutput();
avtLocalizedCompactnessExpression lce;
lce.SetInput(dob);
lce.SetOutputVariableName("lce");
lce.AddInputVariableName("is_material");
dob = lce.GetOutput();
//
// Cause our artificial pipeline to execute.
//
avtContract_p contract =
inData->GetOriginatingSource()->GetGeneralContract();
contract->GetDataRequest()->AddSecondaryVariable("is_material");
dob->Update(contract);
return dob;
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:52,代码来源:avtLocalizedCompactnessFactorQuery.C
示例16: avtShiftCenteringFilter
avtDataObject_p
avtStreamlinePlot::ApplyOperators(avtDataObject_p input)
{
#ifdef ENGINE
avtDataObject_p dob = input;
// Try to determine the centering. If we have an expression, we won't
// be able to. So be conservative and assume the worst.
avtCentering centering = AVT_ZONECENT;
if (input->GetInfo().GetAttributes().ValidVariable(varname))
centering = input->GetInfo().GetAttributes().GetCentering(varname);
//Convert from zonal to nodal, if requested.
if(centering == AVT_ZONECENT && atts.GetForceNodeCenteredData())
{
if(shiftCenteringFilter != NULL)
delete shiftCenteringFilter;
shiftCenteringFilter = new avtShiftCenteringFilter(AVT_NODECENT);
shiftCenteringFilter->SetInput(input);
dob = shiftCenteringFilter->GetOutput();
if(removeGhostZonesFilter != NULL)
delete removeGhostZonesFilter;
removeGhostZonesFilter = new avtGhostZoneFilter();
removeGhostZonesFilter->GhostDataMustBeRemoved();
removeGhostZonesFilter->SetInput(dob);
dob = removeGhostZonesFilter->GetOutput();
}
// Add the streamline filter.
streamlineFilter->SetInput(dob);
dob = streamlineFilter->GetOutput();
return dob;
#else
return input;
#endif
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:38,代码来源:avtStreamlinePlot.C
示例17: CopyTo
avtDataObject_p
avtWatertightQuery::ApplyFilters(avtDataObject_p inData)
{
avtContract_p contract =
inData->GetOriginatingSource()->GetGeneralContract();
//
// Create an artificial pipeline.
//
avtDataset_p ds;
CopyTo(ds, inData);
avtSourceFromAVTDataset termsrc(ds);
avtDataObject_p dob = termsrc.GetOutput();
external_nodes->SetInput(dob);
avtDataObject_p objOut = external_nodes->GetOutput();
objOut->Update(contract);
return objOut;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:18,代码来源:avtWatertightQuery.C
示例18: GetGeneralContract
avtDataObject_p
avtOriginalDataSpatialExtentsQuery::ApplyFilters(avtDataObject_p inData)
{
avtDataRequest_p dataRequest = inData->GetOriginatingSource()->
GetGeneralContract()->GetDataRequest();
std::string dbVar = ParsingExprList::GetRealVariable(
queryAtts.GetVariables()[0]);
avtDataRequest_p new_dataRequest = new avtDataRequest(dataRequest,
dbVar.c_str());
avtContract_p contract =
new avtContract(new_dataRequest, queryAtts.GetPipeIndex());
avtDataObject_p retObj;
CopyTo(retObj, inData);
retObj->Update(contract);
return retObj;
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:19,代码来源:avtOriginalDataSpatialExtentsQuery.C
示例19: if
void
avtIsosurfaceFilter::UpdateDataObjectInfoCB(avtDataObject_p &input,
avtDataObject_p &output, void *This)
{
avtDataAttributes &outAtts = output->GetInfo().GetAttributes();
const IsosurfaceAttributes &iso = ((const avtIsosurfaceFilter *)This)->atts;
char tmp[200];
std::string params;
if(iso.GetContourMethod() == IsosurfaceAttributes::Level)
{
SNPRINTF(tmp, 200, "contourNLevels=%d", iso.GetContourNLevels());
params = tmp;
}
else if(iso.GetContourMethod() == IsosurfaceAttributes::Value)
{
params = "contourValue=";
for(size_t i = 0; i < iso.GetContourValue().size(); ++i)
{
SNPRINTF(tmp, 200, "%lg", iso.GetContourValue()[i]);
params += tmp;
if(i < iso.GetContourValue().size()-1)
params += ", ";
}
}
else if(iso.GetContourMethod() == IsosurfaceAttributes::Percent)
{
params = "contourPercent=";
for(size_t i = 0; i < iso.GetContourPercent().size(); ++i)
{
SNPRINTF(tmp, 200, "%lg", iso.GetContourPercent()[i]);
params += tmp;
if(i < iso.GetContourValue().size()-1)
params += ", ";
}
}
outAtts.AddFilterMetaData("Isosurface", params);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:38,代码来源:avtIsosurfaceFilter.C
示例20: CopyTo
// ****************************************************************************
// Method: avtConnComponentsLengthQuery::ApplyFilters
//
// Purpose:
// Constructs an artificial pipeline with the connected components and
// area filters necessary to obtain per component area.
//
// Programmer: Cyrus Harrison
// Creation: Wed Jun 15 13:09:43 PDT 2011
//
// ****************************************************************************
avtDataObject_p
avtConnComponentsLengthQuery::ApplyFilters(avtDataObject_p inData)
{
// Create an artificial pipeline.
avtDataset_p ds;
CopyTo(ds, inData);
avtSourceFromAVTDataset termsrc(ds);
avtDataObject_p dob = termsrc.GetOutput();
// add the area filter to the pipeline
lengthFilter->SetInput(dob);
dob = lengthFilter->GetOutput();
// add the ccl filter to the pipeline
cclFilter->SetInput(dob);
dob = cclFilter->GetOutput();
avtContract_p contract =
inData->GetOriginatingSource()->GetGeneralContract();
cclFilter->GetOutput()->Update(contract);
return cclFilter->GetOutput();
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt26RC_Trunk,代码行数:35,代码来源:avtConnComponentsLengthQuery.C
注:本文中的avtDataObject_p类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论