Commit 045eac98 authored by Will Schroeder's avatar Will Schroeder

Test cleanup

parent 956b5591
Pipeline #7872 passed with stage
1518655052a81518ddcc67dbad573f40
86105d4788a02f09d98bcb4118866279
......@@ -73,7 +73,7 @@ gaussianKernel = vtk.vtkGaussianKernel()
#gaussianKernel.UseScalarsOn()
#gaussianKernel.UseNormalsOn()
gaussianKernel.SetSharpness(4)
gaussianKernel.SetRadius(0.25)
gaussianKernel.SetRadius(0.5)
interpolator1 = vtk.vtkPointInterpolator()
interpolator1.SetInputConnection(plane.GetOutputPort())
......@@ -108,7 +108,7 @@ outlineActor1.SetMapper(outlineMapper1)
# Shepard kernel-------------------------------------------------------
shepardKernel = vtk.vtkShepardKernel()
shepardKernel.SetPowerParameter(2)
shepardKernel.SetRadius(0.25)
shepardKernel.SetRadius(0.5)
interpolator2 = vtk.vtkPointInterpolator()
interpolator2.SetInputConnection(plane.GetOutputPort())
......
......@@ -11,6 +11,7 @@ res = 100
# create pipeline
#
extent = [0,56, 0,32, 0,24]
pl3d = vtk.vtkMultiBlockPLOT3DReader()
pl3d.SetXYZFileName(VTK_DATA_ROOT + "/Data/combxyz.bin")
pl3d.SetQFileName(VTK_DATA_ROOT + "/Data/combq.bin")
......@@ -32,7 +33,6 @@ probe.SetSpacing((bounds[1]-bounds[0])/(res-1),
(bounds[3]-bounds[2])/(res-1),
(bounds[5]-bounds[4])/(res-1))
# Reuse the locator
locator = vtk.vtkStaticPointLocator()
locator.SetDataSet(output)
......
......@@ -219,8 +219,8 @@ struct ProbePoints
}
// When null point is encountered
void AssignNullPoint(const double x[3], vtkIdType numWeights,
vtkIdList *pIds, vtkDoubleArray *weights, vtkIdType ptId)
void AssignNullPoint(const double x[3], vtkIdList *pIds,
vtkDoubleArray *weights, vtkIdType ptId)
{
if ( this->Strategy == vtkPointInterpolator::MASK_POINTS)
{
......@@ -233,13 +233,12 @@ struct ProbePoints
}
else //vtkPointInterpolator::CLOSEST_POINT:
{
numWeights = 1;
pIds->SetNumberOfIds(1);
vtkIdType pId = this->Locator->FindClosestPoint(x);
pIds->SetId(0,pId);
weights->SetNumberOfTuples(1);
weights->SetValue(0,1.0);
this->Arrays.Interpolate(numWeights, pIds->GetPointer(0),
this->Arrays.Interpolate(1, pIds->GetPointer(0),
weights->GetPointer(0), ptId);
}
}
......@@ -264,7 +263,7 @@ struct ProbePoints
}
else
{
this->AssignNullPoint(x, numWeights, pIds, weights, ptId);
this->AssignNullPoint(x, pIds, weights, ptId);
}// null point
}//for all dataset points
}
......@@ -331,7 +330,7 @@ struct ImageProbePoints : public ProbePoints
}
else
{
this->AssignNullPoint(x, numWeights, pIds, weights, ptId);
this->AssignNullPoint(x, pIds, weights, ptId);
}// null point
}//over i
......
......@@ -12,7 +12,7 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkPointInterpolator - probe point cloud using various interpolation kernels
// .NAME vtkPointInterpolator - interpolate over point cloud using various kernels
// .SECTION Description
// vtkPointInterpolator probes a point cloud Pc (the filter Source) with a
......@@ -25,8 +25,9 @@
//
// A key input to this filter is the specification of the interpolation
// kernel, and the parameters which control the associated interpolation
// process. Currently Voronoi, Gaussian, Shepard, and SPH (smoothed particle
// hydrodynamics) interpolation kernels are available.
// process. Interpolation kernels include Voronoi, Gaussian, Shepard, and SPH
// (smoothed particle hydrodynamics), with additional kernels to be added in
// the future.
//
// An overview of the algorithm is as follows. For each p from P, Np "close"
// points to p are found. (The meaning of what is "close" can be specified as
......@@ -75,22 +76,23 @@ class VTKFILTERSPOINTS_EXPORT vtkPointInterpolator : public vtkDataSetAlgorithm
public:
// Description:
// Standard methods for instantiating, obtaining type information, and
// printing information.
// printing.
static vtkPointInterpolator *New();
vtkTypeMacro(vtkPointInterpolator,vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Specify the dataset Pc that will be probed by the input points P. The
// Input P defines the geometry (the points and cells) for the output,
// while the Source Pc is probed (interpolated) to generate the scalars,
// vectors, etc. for the output points based on the point locations.
// Input P defines the dataset structure (the points and cells) for the
// output, while the Source Pc is probed (interpolated) to generate the
// scalars, vectors, etc. for the output points based on the point
// locations.
void SetSourceData(vtkDataObject *source);
vtkDataObject *GetSource();
// Description:
// Specify the dataset Pc that will be probed by the input points P. The
// Input P defines the geometry (the points and cells) for the output,
// Input P defines the structure (the points and cells) for the output,
// while the Source Pc is probed (interpolated) to generate the scalars,
// vectors, etc. for the output points based on the point locations.
void SetSourceConnection(vtkAlgorithmOutput* algOutput);
......@@ -121,10 +123,10 @@ public:
// interpolation process. Null points occur when the local neighborhood (of
// nearby points to interpolate from) is empty. If the strategy is set to
// MaskPoints, then an output array is created that marks points as being
// valid (=1) or null (invalid =0) (and NullValue is set as well). If the
// strategy is set to NullValue, then the output data value(s) are set to
// the NullPoint value (specified in the output point data). Finally, the
// default strategy ClosestPoint is to simply use the closest point to
// valid (=1) or null (invalid =0) (and the NullValue is set as well). If
// the strategy is set to NullValue, then the output data value(s) are set
// to the NullPoint value (specified in the output point data). Finally,
// the default strategy ClosestPoint is to simply use the closest point to
// perform the interpolation.
vtkSetMacro(NullPointsStrategy,int);
vtkGetMacro(NullPointsStrategy,int);
......@@ -144,15 +146,15 @@ public:
vtkGetStringMacro(ValidPointsMaskArrayName);
// Description:
// Shallow copy the input point data arrays to the output.
// On by default.
// Indicate whether to shallow copy the input point data arrays to the
// output. On by default.
vtkSetMacro(PassPointArrays, bool);
vtkBooleanMacro(PassPointArrays, bool);
vtkGetMacro(PassPointArrays, bool);
// Description:
// Shallow copy the input cell data arrays to the output.
// On by default.
// Indicate whether to shallow copy the input cell data arrays to the
// output. On by default.
vtkSetMacro(PassCellArrays, bool);
vtkBooleanMacro(PassCellArrays, bool);
vtkGetMacro(PassCellArrays, bool);
......
......@@ -45,7 +45,7 @@ ComputeBasis(double x[3], vtkIdList *pIds)
//----------------------------------------------------------------------------
vtkIdType vtkSPHKernel::
ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *weights)
ComputeWeights(double*, vtkIdList*, vtkDoubleArray *weights)
{
weights->SetNumberOfTuples(1);
weights->SetValue(0,1.0);
......
......@@ -44,7 +44,7 @@ ComputeBasis(double x[3], vtkIdList *pIds)
//----------------------------------------------------------------------------
vtkIdType vtkVoronoiKernel::
ComputeWeights(double x[3], vtkIdList *pIds, vtkDoubleArray *weights)
ComputeWeights(double*, vtkIdList*, vtkDoubleArray *weights)
{
weights->SetNumberOfTuples(1);
weights->SetValue(0,1.0);
......
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