Commit 65690ed5 authored by David C. Lonie's avatar David C. Lonie
Browse files

Remove the sampleRate arg in some ExtractGridHelper API.

This was removed from usage in an earlier commit, but a dead
argument was left behind.
parent 82e7d1c9
......@@ -331,8 +331,7 @@ void vtkExtractStructuredGridHelper::ComputeBeginAndEnd(
void vtkExtractStructuredGridHelper::CopyPointsAndPointData(
int inExt[6], int outExt[6],
vtkPointData* pd, vtkPoints* inpnts,
vtkPointData* outPD, vtkPoints* outpnts,
int sampleRate[3])
vtkPointData* outPD, vtkPoints* outpnts)
{
assert("pre: NULL input point-data!" && (pd != NULL) );
assert("pre: NULL output point-data!" && (outPD != NULL) );
......@@ -350,8 +349,10 @@ void vtkExtractStructuredGridHelper::CopyPointsAndPointData(
(void)inSize; // Prevent warnings, this is only used in debug builds.
// Check if we can use some optimizations:
bool canCopyRange = sampleRate && I(sampleRate) == 1;
bool useMapping = !(canCopyRange && J(sampleRate) == 1 && K(sampleRate) == 1);
bool canCopyRange = I(this->SampleRate) == 1;
bool useMapping = !(I(this->SampleRate) == 1 &&
J(this->SampleRate) == 1 &&
K(this->SampleRate) == 1);
if( inpnts != NULL )
{
......@@ -446,8 +447,8 @@ void vtkExtractStructuredGridHelper::CopyPointsAndPointData(
//-----------------------------------------------------------------------------
void vtkExtractStructuredGridHelper::CopyCellData(int inExt[6], int outExt[6],
vtkCellData* cd, vtkCellData* outCD,
int sampleRate[3])
vtkCellData* cd,
vtkCellData* outCD)
{
assert("pre: NULL input cell-data!" && (cd != NULL) );
assert("pre: NULL output cell-data!" && (outCD != NULL) );
......@@ -466,8 +467,10 @@ void vtkExtractStructuredGridHelper::CopyCellData(int inExt[6], int outExt[6],
outCD->CopyAllocate(cd,outSize,outSize);
// Check if we can use some optimizations:
bool canCopyRange = this->SampleRate && I(this->SampleRate) == 1;
bool useMapping = !(canCopyRange && J(this->SampleRate) == 1 && K(this->SampleRate) == 1);
bool canCopyRange = I(this->SampleRate) == 1;
bool useMapping = !(I(this->SampleRate) == 1 &&
J(this->SampleRate) == 1 &&
K(this->SampleRate) == 1);
int inpCellExt[6];
vtkStructuredData::GetCellExtentFromPointExtent(inExt,inpCellExt);
......
......@@ -144,14 +144,11 @@ public:
// \param inpnts pointer to the input points, or NULL if uniform grid.
// \param outPD point to the output point data.
// \param outpnts pointer to the output points, or NULL if uniform grid.
// \param sampleRate The sample rate in each dimension. Optional, used to
// optimizing copy operations if present.
// \pre pd != NULL.
// \pre outPD != NULL.
void CopyPointsAndPointData( int inExt[6], int outExt[6],
vtkPointData* pd, vtkPoints* inpnts,
vtkPointData* outPD, vtkPoints* outpnts,
int sampleRate[3] = NULL);
vtkPointData* outPD, vtkPoints* outpnts);
// Description:
// \brief Copies the cell data to the output.
......@@ -159,13 +156,10 @@ public:
// \param outExt the output grid extent.
// \param cd the input cell data.
// \param outCD the output cell data.
// \param sampleRate The sample rate in each dimension. Optional, used to
// optimizing copy operations if present.
// \pre cd != NULL.
// \pre outCD != NULL.
void CopyCellData(int inExt[6], int outExt[6],
vtkCellData* cd, vtkCellData* outCD,
int sampleRate[3] = NULL);
vtkCellData* cd, vtkCellData* outCD);
// Description:
// Calculate the VOI for a partitioned structured dataset. This method sets
......
......@@ -267,9 +267,8 @@ bool vtkExtractVOI::RequestDataImpl(vtkInformationVector **inputVector,
output->SetOrigin( outOrigin );
vtkDebugMacro(<< "Extracting Grid");
this->Internal->CopyPointsAndPointData(
inExt,outExt,pd,NULL,outPD,NULL,this->SampleRate);
this->Internal->CopyCellData(inExt,outExt,cd,outCD,this->SampleRate);
this->Internal->CopyPointsAndPointData(inExt,outExt,pd,NULL,outPD,NULL);
this->Internal->CopyCellData(inExt,outExt,cd,outCD);
return 1;
}
......
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