Commit c63515a2 authored by Bill Lorensen's avatar Bill Lorensen
Browse files

ENH: replaced TABS with SPACES.

parent 2caefe2b
......@@ -76,9 +76,9 @@ protected:
~vtkCardinalSpline() {};
void Fit1D (int n, float *x, float *y, float *w, float coefficients[][4],
int leftConstraint, float leftValue, int rightConstraint, float rightValue);
int leftConstraint, float leftValue, int rightConstraint, float rightValue);
void FitClosed1D (int n, float *x, float *y, float *w,
float coefficients[][4]);
float coefficients[][4]);
private:
vtkCardinalSpline(const vtkCardinalSpline&); // Not implemented.
void operator=(const vtkCardinalSpline&); // Not implemented.
......
......@@ -96,22 +96,22 @@ public:
// Return intersection point (if any) of finite line with cells contained
// in cell locator.
virtual int IntersectWithLine(float a0[3], float a1[3], float tol,
float& t, float x[3], float pcoords[3],
int &subId);
float& t, float x[3], float pcoords[3],
int &subId);
// Description:
// Return intersection point (if any) AND the cell which was intersected by
// the finite line.
virtual int IntersectWithLine(float a0[3], float a1[3], float tol,
float& t, float x[3], float pcoords[3],
int &subId, vtkIdType &cellId);
float& t, float x[3], float pcoords[3],
int &subId, vtkIdType &cellId);
// Description:
// Return intersection point (if any) AND the cell which was intersected by
// the finite line. The cell is returned as a cell id and as a generic cell.
virtual int IntersectWithLine(float a0[3], float a1[3], float tol,
float& t, float x[3], float pcoords[3],
int &subId, vtkIdType &cellId,
float& t, float x[3], float pcoords[3],
int &subId, vtkIdType &cellId,
vtkGenericCell *cell);
// Description:
......@@ -119,7 +119,7 @@ public:
// The closest point is somewhere on a cell, it need not be one of the
// vertices of the cell.
void FindClosestPoint(float x[3], float closestPoint[3], vtkIdType &cellId,
int &subId, float& dist2);
int &subId, float& dist2);
// Description:
// Return the closest point and the cell which is closest to the point x.
......@@ -132,8 +132,8 @@ public:
// found, "cell" contains the points and ptIds for the cell "cellId" upon
// exit.
void FindClosestPoint(float x[3], float closestPoint[3],
vtkGenericCell *cell, vtkIdType &cellId, int &subId,
float& dist2);
vtkGenericCell *cell, vtkIdType &cellId, int &subId,
float& dist2);
// Description:
// Return the closest point within a specified radius and the cell which is
......@@ -143,8 +143,8 @@ public:
// the specified radius, the method returns 0 and the values of closestPoint,
// cellId, subId, and dist2 are undefined.
int FindClosestPointWithinRadius(float x[3], float radius,
float closestPoint[3], vtkIdType &cellId,
int &subId, float& dist2);
float closestPoint[3], vtkIdType &cellId,
int &subId, float& dist2);
// Description:
// Return the closest point within a specified radius and the cell which is
......@@ -160,9 +160,9 @@ public:
// for loop. If a closest point is found, "cell" contains the points and
// ptIds for the cell "cellId" upon exit.
int FindClosestPointWithinRadius(float x[3], float radius,
float closestPoint[3],
vtkGenericCell *cell, vtkIdType &cellId,
int &subId, float& dist2);
float closestPoint[3],
vtkGenericCell *cell, vtkIdType &cellId,
int &subId, float& dist2);
// Description:
// Return the closest point within a specified radius and the cell which is
......@@ -180,9 +180,9 @@ public:
// inside returns the return value of the EvaluatePosition call to the
// closest cell; inside(=1) or outside(=0).
int FindClosestPointWithinRadius(float x[3], float radius,
float closestPoint[3],
vtkGenericCell *cell, vtkIdType &cellId,
int &subId, float& dist2, int &inside);
float closestPoint[3],
vtkGenericCell *cell, vtkIdType &cellId,
int &subId, float& dist2, int &inside);
// Description:
// Get the cells in a particular bucket.
......
......@@ -239,13 +239,13 @@ void vtkColorTransferFunction::AddRGBPoint( float x, float r,
if ( this->NumberOfPoints == this->FunctionSize )
{
if ( this->FunctionSize )
{
{
this->FunctionSize *= 2;
}
}
else
{
{
this->FunctionSize = 100;
}
}
float *tmp = new float[this->FunctionSize*4];
if ( i > 0 )
......@@ -258,9 +258,9 @@ void vtkColorTransferFunction::AddRGBPoint( float x, float r,
(this->NumberOfPoints-i)*sizeof(float)*4 );
}
if ( this->Function )
{
delete [] this->Function;
}
{
delete [] this->Function;
}
this->Function = tmp;
}
else
......@@ -472,7 +472,7 @@ float vtkColorTransferFunction::GetBlueValue( float x )
// Returns a table of RGB colors at regular intervals along the function
void vtkColorTransferFunction::GetTable( float x1, float x2,
int size, float* table )
int size, float* table )
{
float x, xinc=0;
float *tptr = table;
......@@ -747,7 +747,7 @@ const unsigned char *vtkColorTransferFunction::GetTable( float x1, float x2,
}
void vtkColorTransferFunction::BuildFunctionFromTable( float x1, float x2,
int size, float *table)
int size, float *table)
{
// We are assuming the table is in ascending order
......@@ -1037,14 +1037,14 @@ void vtkColorTransferFunction::MapScalarsThroughTable2(void *input,
int inputDataType,
int numberOfValues,
int inputIncrement,
int outputFormat)
int outputFormat)
{
switch (inputDataType)
{
case VTK_CHAR:
vtkColorTransferFunctionMapData(this,(char *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_UNSIGNED_CHAR:
......@@ -1055,8 +1055,8 @@ void vtkColorTransferFunction::MapScalarsThroughTable2(void *input,
case VTK_SHORT:
vtkColorTransferFunctionMapData(this,(short *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_UNSIGNED_SHORT:
......@@ -1069,38 +1069,38 @@ void vtkColorTransferFunction::MapScalarsThroughTable2(void *input,
case VTK_INT:
vtkColorTransferFunctionMapData(this,(int *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_UNSIGNED_INT:
vtkColorTransferFunctionMapData(this,(unsigned int *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_LONG:
vtkColorTransferFunctionMapData(this,(long *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_UNSIGNED_LONG:
vtkColorTransferFunctionMapData(this,(unsigned long *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_FLOAT:
vtkColorTransferFunctionMapData(this,(float *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
case VTK_DOUBLE:
vtkColorTransferFunctionMapData(this,(double *)input,output,
numberOfValues,inputIncrement,
outputFormat);
numberOfValues,inputIncrement,
outputFormat);
break;
default:
......
......@@ -176,9 +176,9 @@ protected:
// Transfer functions for each color component
// Remove after corresponding depricated methods are removed
vtkPiecewiseFunction *Red;
vtkPiecewiseFunction *Green;
vtkPiecewiseFunction *Blue;
vtkPiecewiseFunction *Red;
vtkPiecewiseFunction *Green;
vtkPiecewiseFunction *Blue;
vtkTimeStamp BuildTime;
unsigned char *Table;
int TableSize;
......
......@@ -65,7 +65,7 @@ void vtkDataSetToDataSetFilter::SetInput(vtkDataSet *input)
if (oldInput != NULL)
{
if (input == NULL ||
oldInput->GetDataObjectType() != input->GetDataObjectType())
oldInput->GetDataObjectType() != input->GetDataObjectType())
{
vtkWarningMacro("Changing input type. Deleting output");
this->SetOutput(NULL);
......
......@@ -93,7 +93,7 @@ void vtkImageInPlaceFilter::ExecuteData(vtkDataObject *vtkNotUsed(out))
void vtkImageInPlaceFilter::CopyData(vtkImageData *inData,
vtkImageData *outData)
vtkImageData *outData)
{
int *outExt = this->GetOutput()->GetUpdateExtent();
char *inPtr = (char *) inData->GetScalarPointerForExtent(outExt);
......
......@@ -158,7 +158,7 @@ void vtkImageMultipleInputFilter::ExecuteInformation()
// Call the alternate version of this method, and use the returned input
// update extent for all inputs
void vtkImageMultipleInputFilter::ComputeInputUpdateExtents( vtkDataObject
*output )
*output )
{
int outExt[6], inExt[6];
......@@ -177,9 +177,9 @@ void vtkImageMultipleInputFilter::ComputeInputUpdateExtents( vtkDataObject
// By default, simply set the input update extent to match the given output
// extent
void vtkImageMultipleInputFilter::ComputeInputUpdateExtent(
int inExt[6],
int outExt[6],
int vtkNotUsed(whichInput) )
int inExt[6],
int outExt[6],
int vtkNotUsed(whichInput) )
{
memcpy(inExt,outExt,sizeof(int)*6);
}
......@@ -208,7 +208,7 @@ VTK_THREAD_RETURN_TYPE vtkImageMultiThreadedExecute( void *arg )
str = (vtkImageMultiThreadStruct *)(((ThreadInfoStruct *)(arg))->UserData);
memcpy(ext,str->Filter->GetOutput()->GetUpdateExtent(),
sizeof(int)*6);
sizeof(int)*6);
// execute the actual method with appropriate extent
// first find out how many pieces extent can be split into.
......@@ -258,9 +258,9 @@ void vtkImageMultipleInputFilter::ExecuteData(vtkDataObject *out)
//----------------------------------------------------------------------------
// The execute method created by the subclass.
void vtkImageMultipleInputFilter::ThreadedExecute(vtkImageData
**vtkNotUsed(inData),
vtkImageData *vtkNotUsed(outData),
int extent[6], int threadId)
**vtkNotUsed(inData),
vtkImageData *vtkNotUsed(outData),
int extent[6], int threadId)
{
extent = extent;
if (threadId == 0)
......@@ -278,15 +278,15 @@ void vtkImageMultipleInputFilter::ThreadedExecute(vtkImageData
// This can be from 1 to "total".
// If 1 is returned, the extent cannot be split.
int vtkImageMultipleInputFilter::SplitExtent(int splitExt[6], int startExt[6],
int num, int total)
int num, int total)
{
int splitAxis;
int min, max;
vtkDebugMacro("SplitExtent: ( " << startExt[0] << ", " << startExt[1] << ", "
<< startExt[2] << ", " << startExt[3] << ", "
<< startExt[4] << ", " << startExt[5] << "), "
<< num << " of " << total);
<< startExt[2] << ", " << startExt[3] << ", "
<< startExt[4] << ", " << startExt[5] << "), "
<< num << " of " << total);
// start with same extent
memcpy(splitExt, startExt, 6 * sizeof(int));
......@@ -321,8 +321,8 @@ int vtkImageMultipleInputFilter::SplitExtent(int splitExt[6], int startExt[6],
}
vtkDebugMacro(" Split Piece: ( " <<splitExt[0]<< ", " <<splitExt[1]<< ", "
<< splitExt[2] << ", " << splitExt[3] << ", "
<< splitExt[4] << ", " << splitExt[5] << ")");
<< splitExt[2] << ", " << splitExt[3] << ", "
<< splitExt[4] << ", " << splitExt[5] << ")");
return maxThreadIdUsed + 1;
}
......
......@@ -96,15 +96,15 @@ public:
// Description:
// Putting this here until I merge graphics and imaging streaming.
virtual int SplitExtent(int splitExt[6], int startExt[6],
int num, int total);
int num, int total);
// Description:
// The execute method created by the subclass.
// This is kept public instead of protected since it is called
// from a non-member thread function.
virtual void ThreadedExecute(vtkImageData **inDatas,
vtkImageData *outData,
int extent[6], int threadId);
vtkImageData *outData,
int extent[6], int threadId);
......@@ -119,8 +119,8 @@ protected:
void ComputeInputUpdateExtents( vtkDataObject *output );
virtual void ComputeInputUpdateExtent( int inExt[6],
int outExt[6],
int whichInput );
int outExt[6],
int whichInput );
void ExecuteData(vtkDataObject *output);
......
......@@ -185,7 +185,7 @@ VTK_THREAD_RETURN_TYPE vtkImageMultiInOutThreadedExecute( void *arg )
str = (vtkImageMultiThreadStruct *)(((ThreadInfoStruct *)(arg))->UserData);
memcpy(ext,str->Filter->GetOutput()->GetUpdateExtent(),
sizeof(int)*6);
sizeof(int)*6);
// execute the actual method with appropriate extent
// first find out how many pieces extent can be split into.
......
......@@ -74,8 +74,8 @@ public:
// This is kept public instead of protected since it is called
// from a non-member thread function.
virtual void ThreadedExecute(vtkImageData **inDatas,
vtkImageData **outDatas,
int extent[6], int threadId);
vtkImageData **outDatas,
int extent[6], int threadId);
protected:
vtkImageMultipleInputOutputFilter();
......@@ -84,16 +84,16 @@ protected:
void ComputeInputUpdateExtents( vtkDataObject *output );
virtual void ComputeInputUpdateExtent( int inExt[6],
int outExt[6],
int whichInput );
int outExt[6],
int whichInput );
void ExecuteData(vtkDataObject *out);
// this should never be called
virtual void ThreadedExecute(vtkImageData **inDatas,
vtkImageData *outData,
int extent[6], int threadId);
vtkImageData *outData,
int extent[6], int threadId);
virtual void ExecuteInformation(vtkImageData **, vtkImageData *) {};
// This one gets called by the superclass.
......
......@@ -80,7 +80,7 @@ protected:
vtkImageData *AllocateOutputData(vtkDataObject *out);
void ComputeRequiredInputUpdateExtent( int *vtkNotUsed(in),
int *vtkNotUsed(out) )
int *vtkNotUsed(out) )
{VTK_LEGACY_METHOD(ComputeRequiredInputUpdateExtent,"3.2");}
private:
......
......@@ -161,22 +161,22 @@ void vtkImageToImageFilter::ComputeInputUpdateExtents( vtkDataObject *output )
if (this->Inputs[idx] != NULL)
{
if (this->Inputs[idx]->GetRequestExactExtent())
{
int *currentExt = this->Inputs[idx]->GetUpdateExtent();
for (int i = 0; i < 6; i += 2)
{
if (inExt[i] < currentExt[i] ||
inExt[i+1] > currentExt[i+1])
{
this->Inputs[idx]->SetUpdateExtent( inExt );
break;
}
}
}
{
int *currentExt = this->Inputs[idx]->GetUpdateExtent();
for (int i = 0; i < 6; i += 2)
{
if (inExt[i] < currentExt[i] ||
inExt[i+1] > currentExt[i+1])
{
this->Inputs[idx]->SetUpdateExtent( inExt );
break;
}
}
}
else
{
this->Inputs[idx]->SetUpdateExtent( inExt );
}
{
this->Inputs[idx]->SetUpdateExtent( inExt );
}
}
}
}
......@@ -184,7 +184,7 @@ void vtkImageToImageFilter::ComputeInputUpdateExtents( vtkDataObject *output )
// By default, simply set the input update extent to match the given output
// extent
void vtkImageToImageFilter::ComputeInputUpdateExtent( int inExt[6],
int outExt[6] )
int outExt[6] )
{
memcpy(inExt,outExt,sizeof(int)*6);
}
......@@ -246,15 +246,15 @@ VTK_THREAD_RETURN_TYPE vtkImageThreadedExecute( void *arg )
// This can be from 1 to "total".
// If 1 is returned, the extent cannot be split.
int vtkImageToImageFilter::SplitExtent(int splitExt[6], int startExt[6],
int num, int total)
int num, int total)
{
int splitAxis;
int min, max;
vtkDebugMacro("SplitExtent: ( " << startExt[0] << ", " << startExt[1] << ", "
<< startExt[2] << ", " << startExt[3] << ", "
<< startExt[4] << ", " << startExt[5] << "), "
<< num << " of " << total);
<< startExt[2] << ", " << startExt[3] << ", "
<< startExt[4] << ", " << startExt[5] << "), "
<< num << " of " << total);
// start with same extent
memcpy(splitExt, startExt, 6 * sizeof(int));
......@@ -289,8 +289,8 @@ int vtkImageToImageFilter::SplitExtent(int splitExt[6], int startExt[6],
}
vtkDebugMacro(" Split Piece: ( " <<splitExt[0]<< ", " <<splitExt[1]<< ", "
<< splitExt[2] << ", " << splitExt[3] << ", "
<< splitExt[4] << ", " << splitExt[5] << ")");
<< splitExt[2] << ", " << splitExt[3] << ", "
<< splitExt[4] << ", " << splitExt[5] << ")");
return maxThreadIdUsed + 1;
}
......
......@@ -81,8 +81,8 @@ public:
// will call this method. It is public so that the thread functions
// can call this method.
virtual void ThreadedExecute(vtkImageData *inData,
vtkImageData *outData,
int extent[6], int threadId);
vtkImageData *outData,
int extent[6], int threadId);
// Description:
// Get/Set the number of threads to create when rendering
......@@ -97,7 +97,7 @@ public:
// Description:
// Putting this here until I merge graphics and imaging streaming.
virtual int SplitExtent(int splitExt[6], int startExt[6],
int num, int total);
int num, int total);
protected:
vtkImageToImageFilter();
......
......@@ -172,21 +172,21 @@ void vtkImageToStructuredPoints::Execute()
{
wExtent = data->GetExtent();
if (wExtent[0] == uExtent[0] && wExtent[1] == uExtent[1] &&
wExtent[2] == uExtent[2] && wExtent[3] == uExtent[3] &&
wExtent[4] == uExtent[4] && wExtent[5] == uExtent[5])
wExtent[2] == uExtent[2] && wExtent[3] == uExtent[3] &&
wExtent[4] == uExtent[4] && wExtent[5] == uExtent[5])
{
if (data->GetPointData())
{
output->GetPointData()->PassData(data->GetPointData());
}
{
output->GetPointData()->PassData(data->GetPointData());
}
if (data->GetCellData())
{
output->GetCellData()->PassData(data->GetCellData());
}
{
output->GetCellData()->PassData(data->GetCellData());
}
if (data->GetFieldData())
{
output->GetFieldData()->ShallowCopy(data->GetFieldData());
}
{
output->GetFieldData()->ShallowCopy(data->GetFieldData());
}
}
else
{
......@@ -206,15 +206,15 @@ void vtkImageToStructuredPoints::Execute()
// Loop through output pixels
for (idxZ = 0; idxZ <= maxZ; idxZ++)
{
inPtr1 = inPtr + idxZ*inIncZ;
for (idxY = 0; idxY <= maxY; idxY++)
{
memcpy(outPtr,inPtr1,rowLength);
inPtr1 += inIncY;
outPtr += rowLength;
}
}
{
inPtr1 = inPtr + idxZ*inIncZ;
for (idxY = 0; idxY <= maxY; idxY++)
{
memcpy(outPtr,inPtr1,rowLength);
inPtr1 += inIncY;
outPtr += rowLength;
}
}
}
}
......@@ -224,8 +224,8 @@ void vtkImageToStructuredPoints::Execute()
// otherwise we must reformat and copy the data
wExtent = vData->GetExtent();
if (wExtent[0] == uExtent[0] && wExtent[1] == uExtent[1] &&
wExtent[2] == uExtent[2] && wExtent[3] == uExtent[3] &&
wExtent[4] == uExtent[4] && wExtent[5] == uExtent[5])
wExtent[2] == uExtent[2] && wExtent[3] == uExtent[3] &&
wExtent[4] == uExtent[4] && wExtent[5] == uExtent[5])
{
output->GetPointData()->SetVectors(vData->GetPointData()->GetScalars());
}
......@@ -242,19 +242,19 @@ void vtkImageToStructuredPoints::Execute()
// Loop through ouput pixels
for (idxZ = 0; idxZ <= maxZ; idxZ++)
{
for (idxY = 0; idxY <= maxY; idxY++)
{
for (idxX = 0; idxX <= maxX; idxX++)
{
fv->SetTuple(idx,inPtr2);
inPtr2 += numComp;
idx++;
}