Commit 078f6726 authored by Berk Geveci's avatar Berk Geveci

ENH: Changed the examples to fit the new pipeline. Also extended the API of...

ENH: Changed the examples to fit the new pipeline. Also extended the API of certain filters to allow for easier creation of connections
parent 9f2c4d61
......@@ -23,7 +23,7 @@ vtkPointDataToCellData p2c
p2c SetInputConnection [reader GetOutputPort]
p2c PassPointDataOn
vtkWarpVector warp
warp SetInput [p2c GetUnstructuredGridOutput]
warp SetInputConnection [p2c GetOutputPort]
vtkThreshold thresh
thresh SetInputConnection [warp GetOutputPort]
thresh ThresholdBetween 0.25 0.75
......
......@@ -200,7 +200,7 @@ $menubar add cascade -label "Model" -menu $model_menu
set texture_menu [menu $menubar.texture]
set gui_vars(texture_reader,filename) \
[[[texture GetInput] GetSource] GetFileName]
[[[texture GetInputConnection 0 0] GetProducer] GetFileName]
foreach texture $textures {
set filename "$VTK_DATA_ROOT/Data/$texture"
......@@ -228,7 +228,7 @@ $menubar add cascade -label "Texture" -menu $texture_menu
set texture_mapper_type_menu [menu $menubar.texture_mapper_type]
set gui_vars(texture_mapper_type) \
[[[transform_texture GetInput] GetSource] GetClassName]
[[[transform_texture GetInputConnection 0 0] GetProducer] GetClassName]
foreach texture_mapper_type $texture_mapper_types {
$texture_mapper_type_menu add radio \
......@@ -239,8 +239,8 @@ foreach texture_mapper_type $texture_mapper_types {
}
proc use_texture_mapper_type {texture_mapper_type} {
transform_texture SetInput \
[[string tolower $texture_mapper_type] GetOutput]
transform_texture SetInputConnection \
[[string tolower $texture_mapper_type] GetOutputPort]
renWin Render
}
......
......@@ -22,8 +22,8 @@ vtkWarpScalar warp
# Use vtkMergeFilter to combine the original image with the warped geometry.
#
vtkMergeFilter merge
merge SetGeometry [warp GetOutput]
merge SetScalars [reader GetOutput]
merge SetGeometryConnection [warp GetOutputPort]
merge SetScalarsConnection [reader GetOutputPort]
vtkDataSetMapper mapper
mapper SetInputConnection [merge GetOutputPort]
mapper SetScalarRange 0 255
......
......@@ -34,13 +34,14 @@ set maxTime [expr 35.0 * $length / $maxVelocity]
# IntegrationStepLength specifies the integration step length as a
# fraction of the cell size that the streamline is in.
vtkRungeKutta4 integ
vtkStreamLine streamer
vtkStreamTracer streamer
streamer SetInputConnection [reader GetOutputPort]
streamer SetStartPosition 0.1 2.1 0.5
streamer SetMaximumPropagationTime 500
streamer SetStepLength 0.5
streamer SetIntegrationStepLength 0.05
streamer SetIntegrationDirectionToIntegrateBothDirections
streamer SetMaximumPropagation 500
streamer SetMaximumPropagationUnitToTimeUnit
streamer SetInitialIntegrationStep 0.05
streamer SetInitialIntegrationStepUnitToCellLengthUnit
streamer SetIntegrationDirectionToBoth
streamer SetIntegrator integ
# The tube is wrapped around the generated streamline. By varying the radius
......@@ -48,6 +49,7 @@ vtkStreamLine streamer
# proportional to mass flux (in incompressible flow).
vtkTubeFilter streamTube
streamTube SetInputConnection [streamer GetOutputPort]
streamTube SetInputArrayToProcess 1 0 0 vtkDataObject::FIELD_ASSOCIATION_POINTS vectors
streamTube SetRadius 0.02
streamTube SetNumberOfSides 12
streamTube SetVaryRadiusToVaryRadiusByVector
......
......@@ -40,13 +40,14 @@ vtkPointSource seeds
eval seeds SetCenter 0.1 2.1 0.5
seeds SetNumberOfPoints 6
vtkRungeKutta4 integ
vtkStreamLine streamer
streamer SetInputConnection [reader GetOutputPort]
streamer SetSource [seeds GetOutput]
streamer SetMaximumPropagationTime 500
streamer SetStepLength 0.5
streamer SetIntegrationStepLength 0.05
streamer SetIntegrationDirectionToIntegrateBothDirections
vtkStreamTracer streamer
streamer SetInputConnection [reader GetOutputPort]
streamer SetSourceConnection [seeds GetOutputPort]
streamer SetMaximumPropagation 500
streamer SetMaximumPropagationUnitToTimeUnit
streamer SetInitialIntegrationStep 0.05
streamer SetInitialIntegrationStepUnitToCellLengthUnit
streamer SetIntegrationDirectionToBoth
streamer SetIntegrator integ
# The tube is wrapped around the generated streamline. By varying the radius
......@@ -54,6 +55,7 @@ vtkStreamLine streamer
# proportional to mass flux (in incompressible flow).
vtkTubeFilter streamTube
streamTube SetInputConnection [streamer GetOutputPort]
streamTube SetInputArrayToProcess 1 0 0 vtkDataObject::FIELD_ASSOCIATION_POINTS vectors
streamTube SetRadius 0.02
streamTube SetNumberOfSides 12
streamTube SetVaryRadiusToVaryRadiusByVector
......
......@@ -64,18 +64,18 @@ vtkActor tpd3Actor
[tpd3Actor GetProperty] SetColor 0 0 0
vtkAppendPolyData appendF
appendF AddInput [tpd1 GetOutput]
appendF AddInput [tpd2 GetOutput]
appendF AddInput [tpd3 GetOutput]
appendF AddInputConnection [tpd1 GetOutputPort]
appendF AddInputConnection [tpd2 GetOutputPort]
appendF AddInputConnection [tpd3 GetOutputPort]
# The vtkProbeFilter takes two inputs. One is a dataset to use as the probe
# geometry (SetInput); the other is the data to probe (SetSource). The output
# dataset structure (geometry and topology) of the probe is the same as the
# structure of the input. The probing process generates new data values
# resampled from the source.
# geometry (SetInputConnection); the other is the data to probe
# (SetSourceConnection). The output dataset structure (geometry and
# topology) of the probe is the same as the structure of the input. The
# probing process generates new data values resampled from the source.
vtkProbeFilter probe
probe SetInputConnection [appendF GetOutputPort]
probe SetSource [pl3d GetOutput]
probe SetInputConnection [appendF GetOutputPort]
probe SetSourceConnection [pl3d GetOutputPort]
vtkContourFilter contour
contour SetInputConnection [probe GetOutputPort]
......
......@@ -46,13 +46,13 @@ vtkTransformPolyDataFilter transformF
transformF SetInputConnection [cone GetOutputPort]
transformF SetTransform transform
# vtkGlyph3D takes two inputs: the input point set (SetInput) which can be
# any vtkDataSet; and the glyph (SetSource) which must be a vtkPolyData.
# We are interested in orienting the glyphs by the surface normals that
# we previosuly generated.
# vtkGlyph3D takes two inputs: the input point set (SetInputConnection)
# which can be any vtkDataSet; and the glyph (SetSourceConnection) which
# must be a vtkPolyData. We are interested in orienting the glyphs by the
# surface normals that we previosuly generated.
vtkGlyph3D glyph
glyph SetInputConnection [ptMask GetOutputPort]
glyph SetSource [transformF GetOutput]
glyph SetInputConnection [ptMask GetOutputPort]
glyph SetSourceConnection [transformF GetOutputPort]
glyph SetVectorModeToUseNormal
glyph SetScaleModeToScaleByVector
glyph SetScaleFactor 0.004
......
......@@ -33,14 +33,15 @@ vtkActor rakeActor
rakeActor SetMapper rakeMapper
vtkRungeKutta4 integ
vtkStreamLine sl
vtkStreamTracer sl
sl SetInputConnection [pl3d GetOutputPort]
sl SetSource [rake GetOutput]
sl SetSourceConnection [rake GetOutputPort]
sl SetIntegrator integ
sl SetMaximumPropagationTime 0.1
sl SetIntegrationStepLength 0.1
sl SetMaximumPropagation 0.1
sl SetMaximumPropagationUnitToTimeUnit
sl SetInitialIntegrationStep 0.1
sl SetInitialIntegrationStepUnitToCellLengthUnit
sl SetIntegrationDirectionToBackward
sl SetStepLength 0.001
#
# The ruled surface stiches together lines with triangle strips.
......
......@@ -43,16 +43,16 @@ vtkStructuredGridGeometryFilter plane3
# using a single pipeline and actor.
#
vtkAppendPolyData appendF
appendF AddInput [plane GetOutput]
appendF AddInput [plane2 GetOutput]
appendF AddInput [plane3 GetOutput]
appendF AddInputConnection [plane GetOutputPort]
appendF AddInputConnection [plane2 GetOutputPort]
appendF AddInputConnection [plane3 GetOutputPort]
vtkWarpScalar warp
warp SetInputConnection [appendF GetOutputPort]
warp UseNormalOn
warp SetNormal 1.0 0.0 0.0
warp SetScaleFactor 2.5
vtkPolyDataNormals normals
normals SetInput [warp GetPolyDataOutput]
normals SetInputConnection [warp GetOutputPort]
normals SetFeatureAngle 60
vtkPolyDataMapper planeMapper
planeMapper SetInputConnection [normals GetOutputPort]
......
......@@ -36,7 +36,7 @@
#include <vtkstd/set>
#include <vtkstd/vector>
vtkCxxRevisionMacro(vtkAlgorithm, "1.34");
vtkCxxRevisionMacro(vtkAlgorithm, "1.35");
vtkStandardNewMacro(vtkAlgorithm);
vtkCxxSetObjectMacro(vtkAlgorithm,Information,vtkInformation);
......@@ -184,6 +184,65 @@ void vtkAlgorithm::SetInputArrayToProcess(int idx, int port, int connection,
this->Modified();
}
//----------------------------------------------------------------------------
void vtkAlgorithm::SetInputArrayToProcess(
int idx, int port, int connection,
const char* fieldAssociation,
const char* fieldAttributeTypeOrName)
{
if (!fieldAssociation)
{
vtkErrorMacro("Association is requied");
return;
}
if (!fieldAttributeTypeOrName)
{
vtkErrorMacro("Attribute type or array name is required");
return ;
}
int i;
// Try to convert the string argument to an enum value
int association = -1;
for (i=0; i<vtkDataObject::NUMBER_OF_ASSOCIATIONS; i++)
{
if (strcmp(fieldAssociation,
vtkDataObject::GetAssociationTypeAsString(i)) == 0)
{
association = i;
break;
}
}
if (association == -1)
{
vtkErrorMacro("Unrecognized association type: " << fieldAssociation);
return;
}
int attributeType = -1;
for (i=0; i<vtkDataSetAttributes::NUM_ATTRIBUTES; i++)
{
if (strcmp(fieldAttributeTypeOrName,
vtkDataSetAttributes::GetLongAttributeTypeAsString(i)) == 0)
{
attributeType = i;
break;
}
}
if (attributeType == -1)
{
// Set by association and array name
this->SetInputArrayToProcess(
idx, port, connection, association, fieldAttributeTypeOrName);
return;
}
// Set by association and attribute type
this->SetInputArrayToProcess(
idx, port, connection, association, attributeType);
}
//----------------------------------------------------------------------------
void vtkAlgorithm::SetInputArrayToProcess(int idx, int port, int connection,
int fieldAssociation,
......@@ -780,6 +839,10 @@ void vtkAlgorithm::SetInputConnection(int port, vtkAlgorithmOutput* input)
}
//----------------------------------------------------------------------------
void vtkAlgorithm::AddInputConnection(vtkAlgorithmOutput* input)
{
this->AddInputConnection(0, input);
}
void vtkAlgorithm::AddInputConnection(int port, vtkAlgorithmOutput* input)
{
if(!this->InputPortIndexInRange(port, "connect"))
......
......@@ -201,6 +201,32 @@ public:
int fieldAttributeType);
void SetInputArrayToProcess(int idx, vtkInformation *info);
// Description:
// String based versions of SetInputArrayToProcess(). Because
// fieldAssociation and fieldAttributeType are enums, they cannot be
// easily accessed from scripting language. These methods provides an
// easy and safe way of passing association and attribute type
// information. Field association is one of the following:
// @verbatim
// vtkDataObject::FIELD_ASSOCIATION_POINTS
// vtkDataObject::FIELD_ASSOCIATION_CELLS
// vtkDataObject::FIELD_ASSOCIATION_NONE
// vtkDataObject::FIELD_ASSOCIATION_POINTS_THEN_CELLS
// @endverbatim
// Attribute type is one of the following:
// @verbatim
// vtkDataSetAttributes::SCALARS
// vtkDataSetAttributes::VECTORS
// vtkDataSetAttributes::NORMALS
// vtkDataSetAttributes::TCOORDS
// vtkDataSetAttributes::TENSORS
// @endverbatim
// If the last argument is not an attribute type, it is assumed to
// be an array name.
void SetInputArrayToProcess(int idx, int port, int connection,
const char* fieldAssociation,
const char* attributeTypeorName);
// Description:
// Get the info object for the specified input array to this algorithm
vtkInformation *GetInputArrayInformation(int idx);
......@@ -234,7 +260,6 @@ public:
virtual void SetInputConnection(vtkAlgorithmOutput* input);
// Description:
// Add a connection to the given input port index. See
// SetInputConnection() for details on input connections. This
// method is the complement to RemoveInputConnection() in that it
......@@ -243,9 +268,9 @@ public:
//
// filter2->AddInputConnection(0, filter1->GetOutputPort(0)).
virtual void AddInputConnection(int port, vtkAlgorithmOutput* input);
virtual void AddInputConnection(vtkAlgorithmOutput* input);
// Description:
// Remove a connection from the given input port index. See
// SetInputConnection() for details on input connection. This
// method is the complement to AddInputConnection() in that it
......
......@@ -34,7 +34,7 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkInformationVector.h"
#include "vtkDataSetAttributes.h"
vtkCxxRevisionMacro(vtkDataObject, "1.29");
vtkCxxRevisionMacro(vtkDataObject, "1.30");
vtkStandardNewMacro(vtkDataObject);
vtkCxxSetObjectMacro(vtkDataObject,Information,vtkInformation);
......@@ -95,6 +95,15 @@ public:
// after use by filter
static int vtkDataObjectGlobalReleaseDataFlag = 0;
const char vtkDataObject
::AssociationNames[vtkDataObject::NUMBER_OF_ASSOCIATIONS][55] =
{
"vtkDataObject::FIELD_ASSOCIATION_POINTS",
"vtkDataObject::FIELD_ASSOCIATION_CELLS",
"vtkDataObject::FIELD_ASSOCIATION_NONE",
"vtkDataObject::FIELD_ASSOCIATION_POINTS_THEN_CELLS"
};
//----------------------------------------------------------------------------
vtkDataObject::vtkDataObject()
{
......@@ -1377,3 +1386,14 @@ vtkDataObject* vtkDataObject::GetData(vtkInformationVector* v, int i)
{
return vtkDataObject::GetData(v->GetInformationObject(i));
}
//----------------------------------------------------------------------------
const char* vtkDataObject::GetAssociationTypeAsString(int associationType)
{
if (associationType < 0 || associationType >= NUMBER_OF_ASSOCIATIONS)
{
vtkGenericWarningMacro("Bad association type.");
return NULL;
}
return vtkDataObject::AssociationNames[associationType];
}
......@@ -422,7 +422,8 @@ public:
FIELD_ASSOCIATION_POINTS,
FIELD_ASSOCIATION_CELLS,
FIELD_ASSOCIATION_NONE,
FIELD_ASSOCIATION_POINTS_THEN_CELLS
FIELD_ASSOCIATION_POINTS_THEN_CELLS,
NUMBER_OF_ASSOCIATIONS
};
//ETX
......@@ -438,6 +439,11 @@ public:
};
//ETX
// Description:
// Given an integer association type, this static method returns a string type
// for the attribute (i.e. type = 0: returns "Points").
static const char* GetAssociationTypeAsString(int associationType);
static vtkInformationStringKey* DATA_TYPE_NAME();
static vtkInformationDataObjectKey* DATA_OBJECT();
static vtkInformationIntegerKey* DATA_EXTENT_TYPE();
......@@ -509,6 +515,9 @@ protected:
//BTX
friend class vtkStreamingDemandDrivenPipelineToDataObjectFriendship;
//ETX
static const char AssociationNames[NUMBER_OF_ASSOCIATIONS][55];
private:
// Helper method for the ShallowCopy and DeepCopy methods.
void InternalDataObjectCopy(vtkDataObject *src);
......
......@@ -30,7 +30,7 @@
#include "vtkIdTypeArray.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkDataSetAttributes, "1.12");
vtkCxxRevisionMacro(vtkDataSetAttributes, "1.13");
vtkStandardNewMacro(vtkDataSetAttributes);
//--------------------------------------------------------------------------
......@@ -43,6 +43,15 @@ const char vtkDataSetAttributes
"Tensors",
"GlobalIds" };
const char vtkDataSetAttributes
::LongAttributeNames[vtkDataSetAttributes::NUM_ATTRIBUTES][35] =
{ "vtkDataSetAttributes::SCALARS",
"vtkDataSetAttributes::VECTORS",
"vtkDataSetAttributes::NORMALS",
"vtkDataSetAttributes::TCOORDS",
"vtkDataSetAttributes::TENSORS",
"vtkDataSetAttributes::GLOBALIDS" };
//--------------------------------------------------------------------------
// Construct object with copying turned on for all data.
vtkDataSetAttributes::vtkDataSetAttributes()
......@@ -1701,4 +1710,14 @@ const char* vtkDataSetAttributes::GetAttributeTypeAsString(int attributeType)
return vtkDataSetAttributes::AttributeNames[attributeType];
}
//--------------------------------------------------------------------------
const char* vtkDataSetAttributes::GetLongAttributeTypeAsString(int attributeType)
{
if (attributeType < 0 || attributeType >= NUM_ATTRIBUTES)
{
vtkGenericWarningMacro("Bad attribute type.");
return NULL;
}
return vtkDataSetAttributes::LongAttributeNames[attributeType];
}
......@@ -189,6 +189,7 @@ public:
// Given an integer attribute type, this static method returns a string type
// for the attribute (i.e. type = 0: returns "Scalars").
static const char* GetAttributeTypeAsString(int attributeType);
static const char* GetLongAttributeTypeAsString(int attributeType);
// -- attribute copy properties ------------------------------------------
......@@ -505,6 +506,7 @@ protected:
static const int NumberOfAttributeComponents[NUM_ATTRIBUTES];
static const int AttributeLimits[NUM_ATTRIBUTES];
static const char AttributeNames[NUM_ATTRIBUTES][10];
static const char LongAttributeNames[NUM_ATTRIBUTES][35];
private:
int SetAttribute(vtkDataArray* da, int attributeType);
......
......@@ -149,6 +149,7 @@ IF (VTK_USE_RENDERING AND VTK_USE_DISPLAY)
nacaBinary
officeStreamPoints
polyConn
probe
probeComb
progGlyphs
progGlyphsBySource
......
......@@ -24,7 +24,7 @@ vtkCutter planeCut
planeCut SetCutFunction plane
vtkProbeFilter probe
probe SetInputConnection [planeCut GetOutputPort]
probe SetSource [pl3d GetOutput]
probe SetSourceConnection [pl3d GetOutputPort]
vtkDataSetMapper cutMapper
cutMapper SetInputConnection [probe GetOutputPort]
eval cutMapper SetScalarRange \
......
......@@ -29,7 +29,7 @@
#include "vtkTransform.h"
#include "vtkUnsignedCharArray.h"
vtkCxxRevisionMacro(vtkGlyph3D, "1.123");
vtkCxxRevisionMacro(vtkGlyph3D, "1.124");
vtkStandardNewMacro(vtkGlyph3D);
//----------------------------------------------------------------------------
......@@ -645,6 +645,33 @@ int vtkGlyph3D::RequestData(
return 1;
}
//----------------------------------------------------------------------------
// Specify a source object at a specified table location.
void vtkGlyph3D::SetSourceConnection(int id, vtkAlgorithmOutput* algOutput)
{
if (id < 0)
{
vtkErrorMacro("Bad index " << id << " for source.");
return;
}
int numConnections = this->GetNumberOfInputConnections(1);
if (id < numConnections)
{
this->SetNthInputConnection(1, id, algOutput);
}
else if (id == numConnections && algOutput)
{
this->AddInputConnection(1, algOutput);
}
else if (algOutput)
{
vtkWarningMacro("The source id provided is larger than the maximum "
"source id, using " << numConnections << " instead.");
this->AddInputConnection(1, algOutput);
}
}
//----------------------------------------------------------------------------
// Specify a source object at a specified table location.
void vtkGlyph3D::SetSource(int id, vtkPolyData *pd)
......
......@@ -105,13 +105,24 @@ public:
static vtkGlyph3D *New();
// Description:
// Set the source to use for he glyph.
// Set the source to use for he glyph. Old style. See SetSourceConnection.
void SetSource(vtkPolyData *pd) {this->SetSource(0,pd);};
// Description:
// Specify a source object at a specified table location.
// Old style. See SetSourceConnection.
void SetSource(int id, vtkPolyData *pd);
// Description:
// Specify a source object at a specified table location. New style.
// Source connection is stored in port 1. This method is equivalent
// to SetInputConnection(1, id, outputPort).
void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
void SetSourceConnection(vtkAlgorithmOutput* algOutput)
{
this->SetSourceConnection(0, algOutput);
}
// Description:
// Get a pointer to a source object at a specified table location.
vtkPolyData *GetSource(int id=0);
......
......@@ -35,38 +35,94 @@ public:
// Description:
// Specify object from which to extract geometry information.
// Old style. Use SetGeometryConnection() instead.
void SetGeometry(vtkDataSet *input) {this->SetInput(input);};
vtkDataSet *GetGeometry();
// Description:
// Specify object from which to extract geometry information.
// Equivalent to SetInputConnection(0, algOutput)
void SetGeometryConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(algOutput);
}
// Description:
// Specify object from which to extract scalar information.
// Old style. Use SetScalarsConnection() instead.
void SetScalars(vtkDataSet *);
vtkDataSet *GetScalars();
// Description:
// Specify object from which to extract scalar information.
// Equivalent to SetInputConnection(1, algOutput)
void SetScalarsConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(1, algOutput);
}
// Description:
// Set / get the object from which to extract vector information.
// Old style. Use SetVectorsConnection() instead.
void SetVectors(vtkDataSet *);
vtkDataSet *GetVectors();
// Description:
// Set the connection from which to extract vector information.
// Equivalent to SetInputConnection(2, algOutput)
void SetVectorsConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(2, algOutput);
}
// Description:
// Set / get the object from which to extract normal information.
// Old style. Use SetNormalsConnection() instead.
void SetNormals(vtkDataSet *);
vtkDataSet *GetNormals();
// Description:
// Set the connection from which to extract normal information.
// Equivalent to SetInputConnection(3, algOutput)
void SetNormalsConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(3, algOutput);
}
// Description:
// Set / get the object from which to extract texture coordinates
// information.
// Old style. Use SetTCoordsConnection() instead.
void SetTCoords(vtkDataSet *);
vtkDataSet *GetTCoords();
// Description:
// Set the connection from which to extract texture coordinates
// information.
// Equivalent to SetInputConnection(4, algOutput)
void SetTCoordsConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(4, algOutput);
}
// Description:
// Set / get the object from which to extract tensor data.
// Old style. Use SetTensorsConnection() instead.
void SetTensors(vtkDataSet *);
vtkDataSet *GetTensors();
// Description:
// Set the connection from which to extract tensor data.
// Equivalent to SetInputConnection(5, algOutput)
void SetTensorsConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(5, algOutput);
}
// Description:
// Set the object from which to extract a field and the name
// of the field
// of the field. Note that this does not create pipeline
// connectivity.
void AddField(const char* name, vtkDataSet* input);
protected:
......
......@@ -23,7 +23,7 @@
#include "vtkPointData.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro(vtkProbeFilter, "1.84");
vtkCxxRevisionMacro(vtkProbeFilter, "1.85");
vtkStandardNewMacro(vtkProbeFilter);
//----------------------------------------------------------------------------
......@@ -41,6 +41,12 @@ vtkProbeFilter::~vtkProbeFilter()
this->ValidPoints = NULL;
}
//----------------------------------------------------------------------------
void vtkProbeFilter::SetSourceConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(1, algOutput);
}
//----------------------------------------------------------------------------
void vtkProbeFilter::SetSource(vtkDataObject *input)
{
......
......@@ -44,10 +44,15 @@ public:
// Description:
// Specify the point locations used to probe input. Any geometry
// can be used.
// can be used. Old style. Do not use unless for backwards compatibility.
void SetSource(vtkDataObject *source);
vtkDataObject *GetSource();
// Description:
// Specify the point locations used to probe input. Any geometry
// can be used. New style. Equivalent to SetInputConnection(1, algOutput).
void SetSourceConnection(vtkAlgorithmOutput* algOutput);
// Description:
// This flag is used only when a piece is requested to update. By default
// the flag is off. Because no spatial correspondence between input pieces
......
......@@ -40,7 +40,7 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkRungeKutta45.h"
#include "vtkSmartPointer.h"
vtkCxxRevisionMacro(vtkStreamTracer, "1.40");
vtkCxxRevisionMacro(vtkStreamTracer, "1.41");
vtkStandardNewMacro(vtkStreamTracer);
vtkCxxSetObjectMacro(vtkStreamTracer,Integrator,vtkInitialValueProblemSolver);
vtkCxxSetObjectMacro(vtkStreamTracer,InterpolatorPrototype,vtkInterpolatedVelocityField);
......@@ -95,6 +95,11 @@ vtkStreamTracer::~vtkStreamTracer()
this->SetInterpolatorPrototype(0);
}
void vtkStreamTracer::SetSourceConnection(vtkAlgorithmOutput* algOutput)
{
this->SetInputConnection(1, algOutput);
}
void vtkStreamTracer::SetSource(vtkDataSet *source)
{
this->SetInput(1, source);
......
......@@ -97,9 +97,15 @@ public:
// Description:
// Specify the source object used to generate starting points.
// Old style. Do not use.
void SetSource(vtkDataSet *source);
vtkDataSet *GetSource();
// Description:
// Specify the source object used to generate starting points.
// New style.
void SetSourceConnection(vtkAlgorithmOutput* algOutput);