[Paraview] Programmatically create a Contour filter
mathieu.westphal at gmail.com
mathieu.westphal at gmail.com
Mon Feb 10 12:15:25 EST 2014
Hello
The following code give me a segfault, can't find why :
// input port
QMap< QString, QList< pqOutputPort* > > input;
input.insert( QString( "Input" ), arrivalTimes->getOutputPorts() );
pqObjectBuilder* builder =
pqApplicationCore::instance()->getObjectBuilder();
pqPipelineSource* waveFront = builder->createFilter( "filters","Contour", input, server );
vtkSMProxy * locator = builder->createProxy( "incremental_point_locators", "NonMergingPointLocator", server, "Locator", "WaveFrontLocator" );
if( waveFront )
{
// Edit other properties
vtkSMPropertyHelper( waveFront->getProxy(), "SelectInputScalars" ).Set( arrivalTimesOutput.toAscii().data() );
vtkSMPropertyHelper( waveFront->getProxy(), "ComputeNormals" ).Set( true );
vtkSMPropertyHelper( waveFront->getProxy(), "ComputeGradients" ).Set( false );
vtkSMPropertyHelper( waveFront->getProxy(), "ComputeScalars" ).Set( false );
vtkSMPropertyHelper( waveFront->getProxy(), "GenerateTriangles" ).Set( true );
vtkSMPropertyHelper( waveFront->getProxy(), "ContourValues" ).Set( 0 );
vtkSMPropertyHelper( waveFront->getProxy(), "Locator" ).Set( &locator, 1 );
}
return waveFront;
More information about the ParaView
mailing list