Commit 418c62c6 authored by Sean McBride's avatar Sean McBride

Changed many int to vtkIdType

Fixes many -Wconversion warnings.
Changes made where it makes sense, ex to match return type of method.
parent 5700d2ee
......@@ -102,8 +102,8 @@ int vtkLookupTable::IsOpaque()
if (this->NanColor[3] < 1.0) { opaque = 0; }
if (this->UseBelowRangeColor && this->BelowRangeColor[3] < 1.0) { opaque = 0; }
if (this->UseAboveRangeColor && this->AboveRangeColor[3] < 1.0) { opaque = 0; }
int size=this->Table->GetNumberOfTuples();
int i=0;
vtkIdType size=this->Table->GetNumberOfTuples();
vtkIdType i=0;
unsigned char *ptr=this->Table->GetPointer(0);
while(opaque && i<size)
{
......@@ -195,12 +195,11 @@ int vtkLookupTable::Allocate(int sz, int ext)
// Force the lookup table to rebuild
void vtkLookupTable::ForceBuild()
{
int i;
double hue, sat, val, hinc, sinc, vinc, ainc;
double rgba[4], alpha;
unsigned char *c_rgba;
int maxIndex = this->NumberOfColors - 1;
vtkIdType maxIndex = this->NumberOfColors - 1;
if( maxIndex )
{
......@@ -214,7 +213,7 @@ void vtkLookupTable::ForceBuild()
hinc = sinc = vinc = ainc = 0.0;
}
for (i = 0; i <= maxIndex; i++)
for (vtkIdType i = 0; i <= maxIndex; i++)
{
hue = this->HueRange[0] + i*hinc;
sat = this->SaturationRange[0] + i*sinc;
......
......@@ -134,7 +134,7 @@ vtkIdType vtkPriorityQueue::Pop(vtkIdType location, double &priority)
}
// percolate down the tree from the specified location
int lastNodeToCheck = (this->MaxId-1)/2;
vtkIdType lastNodeToCheck = (this->MaxId-1)/2;
for ( vtkIdType j=0, i=location; i <= lastNodeToCheck; i=j )
{
idx = 2*i + 1;
......
......@@ -132,7 +132,7 @@ private:
inline double vtkPriorityQueue::DeleteId(vtkIdType id)
{
double priority=VTK_DOUBLE_MAX;
int loc;
vtkIdType loc;
if ( id <= this->ItemLocation->GetMaxId() &&
(loc=this->ItemLocation->GetValue(id)) != -1 )
......@@ -144,7 +144,7 @@ inline double vtkPriorityQueue::DeleteId(vtkIdType id)
inline double vtkPriorityQueue::GetPriority(vtkIdType id)
{
int loc;
vtkIdType loc;
if ( id <= this->ItemLocation->GetMaxId() &&
(loc=this->ItemLocation->GetValue(id)) != -1 )
......
......@@ -145,9 +145,9 @@ private:
//----------------------------------------------------------------------------
inline int vtkCellTypes::IsType(unsigned char type)
{
int numTypes=this->GetNumberOfTypes();
vtkIdType numTypes=this->GetNumberOfTypes();
for (int i=0; i<numTypes; i++)
for (vtkIdType i=0; i<numTypes; i++)
{
if ( type == this->GetCellType(i))
{
......
......@@ -101,8 +101,7 @@ vtkCell *vtkConvexPointSet::GetFace(int faceId)
int vtkConvexPointSet::Triangulate(int vtkNotUsed(index), vtkIdList *ptIds,
vtkPoints *pts)
{
int numPts=this->GetNumberOfPoints();
int i;
vtkIdType numPts=this->GetNumberOfPoints();
double x[3];
vtkIdType ptId;
......@@ -123,7 +122,7 @@ int vtkConvexPointSet::Triangulate(int vtkNotUsed(index), vtkIdList *ptIds,
// according to point id. We insert points with id == the index into the
// vtkConvexPointSet::PointIds and Points; but sort on the global point
// id.
for (i=0; i<numPts; i++)
for (vtkIdType i=0; i<numPts; i++)
{
ptId = this->PointIds->GetId(i);
this->Points->GetPoint(i, x);
......@@ -150,12 +149,11 @@ void vtkConvexPointSet::Contour(double value,
vtkCellData *outCd)
{
// For each tetra, contour it
int i, j;
vtkIdType ptId, localId;
int numTets = this->TetraIds->GetNumberOfIds() / 4;
for (i=0; i<numTets; i++)
vtkIdType numTets = this->TetraIds->GetNumberOfIds() / 4;
for (vtkIdType i=0; i<numTets; i++)
{
for (j=0; j<4; j++)
for (vtkIdType j=0; j<4; j++)
{
localId = this->TetraIds->GetId(4*i+j);
ptId = this->PointIds->GetId(localId);
......
......@@ -577,7 +577,7 @@ int vtkEdgeTable::InitPointInsertion(vtkPoints *newPts, vtkIdType estSize)
int vtkEdgeTable::InsertUniquePoint(vtkIdType p1, vtkIdType p2, double x[3],
vtkIdType &ptId)
{
int loc = this->IsEdge(p1,p2);
vtkIdType loc = this->IsEdge(p1,p2);
if ( loc != -1 )
{
......
......@@ -136,7 +136,7 @@ int vtkUniformGridPartitioner::RequestData(
int subdims[3];
vtkStructuredExtent::GetDimensions( ext, subdims );
int pntIdx = vtkStructuredData::ComputePointId( dims, ijk );
vtkIdType pntIdx = vtkStructuredData::ComputePointId( dims, ijk );
grd->GetPoint( pntIdx, origin );
......
......@@ -34,7 +34,7 @@ vtkContourValues::~vtkContourValues()
// Set the ith contour value.
void vtkContourValues::SetValue(int i, double value)
{
int numContours=this->Contours->GetMaxId()+1;
vtkIdType numContours=this->Contours->GetMaxId()+1;
i = (i < 0 ? 0 : i);
if ( i >= numContours || value != this->Contours->GetValue(i) )
......@@ -64,9 +64,9 @@ double *vtkContourValues::GetValues()
// allocated memory of size GetNumberOfContours().
void vtkContourValues::GetValues(double *contourValues)
{
int i, numContours=this->Contours->GetMaxId()+1;
vtkIdType numContours=this->Contours->GetMaxId()+1;
for ( i=0; i < numContours; i++ )
for ( vtkIdType i=0; i < numContours; i++ )
{
contourValues[i] = this->Contours->GetValue(i);
}
......@@ -77,9 +77,9 @@ void vtkContourValues::GetValues(double *contourValues)
// will automatically increase list size as needed.
void vtkContourValues::SetNumberOfContours(const int number)
{
int currentNumber = this->Contours->GetMaxId()+1;
int n = ( number < 0 ? 0 : number);
int i;
vtkIdType currentNumber = this->Contours->GetMaxId()+1;
vtkIdType n = ( number < 0 ? 0 : number);
vtkIdType i;
double *oldValues = NULL;
if ( n != currentNumber )
......@@ -101,7 +101,7 @@ void vtkContourValues::SetNumberOfContours(const int number)
// Copy them back in since the array may have been re-allocated
if ( currentNumber > 0 )
{
int limit = (currentNumber < n)?(currentNumber):(n);
vtkIdType limit = (currentNumber < n)?(currentNumber):(n);
for ( i = 0; i < limit; i++ )
{
this->Contours->SetValue( i, oldValues[i] );
......@@ -166,10 +166,10 @@ void vtkContourValues::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
int i, numContours=this->Contours->GetMaxId() + 1;
vtkIdType numContours=this->Contours->GetMaxId() + 1;
os << indent << "Contour Values: \n";
for ( i=0; i < numContours; i++)
for ( vtkIdType i=0; i < numContours; i++)
{
os << indent << " Value " << i << ": " << this->Contours->GetValue(i) << "\n";
}
......
......@@ -159,10 +159,10 @@ void vtkIdentityTransform::TransformPointsNormalsVectors(vtkPoints *inPts,
void vtkIdentityTransform::TransformPoints(vtkPoints *inPts,
vtkPoints *outPts)
{
int n = inPts->GetNumberOfPoints();
vtkIdType n = inPts->GetNumberOfPoints();
double point[3];
for (int i = 0; i < n; i++)
for (vtkIdType i = 0; i < n; i++)
{
inPts->GetPoint(i,point);
outPts->InsertNextPoint(point);
......@@ -173,10 +173,10 @@ void vtkIdentityTransform::TransformPoints(vtkPoints *inPts,
void vtkIdentityTransform::TransformNormals(vtkDataArray *inNms,
vtkDataArray *outNms)
{
int n = inNms->GetNumberOfTuples();
vtkIdType n = inNms->GetNumberOfTuples();
double normal[3];
for (int i = 0; i < n; i++)
for (vtkIdType i = 0; i < n; i++)
{
inNms->GetTuple(i,normal);
outNms->InsertNextTuple(normal);
......@@ -187,10 +187,10 @@ void vtkIdentityTransform::TransformNormals(vtkDataArray *inNms,
void vtkIdentityTransform::TransformVectors(vtkDataArray *inNms,
vtkDataArray *outNms)
{
int n = inNms->GetNumberOfTuples();
vtkIdType n = inNms->GetNumberOfTuples();
double vect[3];
for (int i = 0; i < n; i++)
for (vtkIdType i = 0; i < n; i++)
{
inNms->GetTuple(i,vect);
outNms->InsertNextTuple(vect);
......
......@@ -211,7 +211,7 @@ int vtkAppendFilter::RequestData(
vtkSmartPointer<vtkIdList> newPtIds = vtkSmartPointer<vtkIdList>::New();
newPtIds->Allocate(VTK_CELL_SIZE);
int twentieth = (totalNumPts + totalNumCells)/20 + 1;
vtkIdType twentieth = (totalNumPts + totalNumCells)/20 + 1;
// For optionally merging duplicate points
vtkIdType* globalIndices = new vtkIdType[totalNumPts];
......
......@@ -129,8 +129,8 @@ int vtkExtractCells::RequestData(
this->InputIsUgrid =
((vtkUnstructuredGrid::SafeDownCast(input)) != NULL);
int numCellsInput = input->GetNumberOfCells();
int numCells = static_cast<int>(this->CellList->IdTypeSet.size());
vtkIdType numCellsInput = input->GetNumberOfCells();
vtkIdType numCells = this->CellList->IdTypeSet.size();
if (numCells == numCellsInput)
{
......@@ -219,15 +219,13 @@ int vtkExtractCells::RequestData(
//----------------------------------------------------------------------------
void vtkExtractCells::Copy(vtkDataSet *input, vtkUnstructuredGrid *output)
{
int i;
if (this->InputIsUgrid)
{
output->DeepCopy(vtkUnstructuredGrid::SafeDownCast(input));
return;
}
int numCells = input->GetNumberOfCells();
vtkIdType numCells = input->GetNumberOfCells();
vtkPointData *PD = input->GetPointData();
vtkCellData *CD = input->GetCellData();
......@@ -235,7 +233,7 @@ void vtkExtractCells::Copy(vtkDataSet *input, vtkUnstructuredGrid *output)
vtkPointData *newPD = output->GetPointData();
vtkCellData *newCD = output->GetCellData();
int numPoints = input->GetNumberOfPoints();
vtkIdType numPoints = input->GetNumberOfPoints();
output->Allocate(numCells);
......@@ -246,7 +244,7 @@ void vtkExtractCells::Copy(vtkDataSet *input, vtkUnstructuredGrid *output)
vtkPoints *pts = vtkPoints::New();
pts->SetNumberOfPoints(numPoints);
for (i=0; i<numPoints; i++)
for (vtkIdType i=0; i<numPoints; i++)
{
pts->SetPoint(i, input->GetPoint(i));
}
......@@ -280,13 +278,13 @@ vtkIdType vtkExtractCells::findInSortedList(vtkIdList *idList, vtkIdType id)
if (numids < 8) return idList->IsId(id);
int L, R, M;
vtkIdType L, R, M;
L=0;
R=numids-1;
vtkIdType *ids = idList->GetPointer(0);
int loc = -1;
vtkIdType loc = -1;
while (R > L)
{
......@@ -327,7 +325,7 @@ vtkIdType vtkExtractCells::findInSortedList(vtkIdList *idList, vtkIdType id)
//----------------------------------------------------------------------------
vtkIdList *vtkExtractCells::reMapPointIds(vtkDataSet *grid)
{
int totalPoints = grid->GetNumberOfPoints();
vtkIdType totalPoints = grid->GetNumberOfPoints();
char *temp = new char [totalPoints];
......@@ -386,7 +384,7 @@ vtkIdList *vtkExtractCells::reMapPointIds(vtkDataSet *grid)
{
if (*cellPtr > maxid) continue;
int loc = locs[*cellPtr];
vtkIdType loc = locs[*cellPtr];
vtkIdType nIds = cellArray[loc++];
......@@ -406,7 +404,7 @@ vtkIdList *vtkExtractCells::reMapPointIds(vtkDataSet *grid)
}
ptIds->SetNumberOfIds(numberOfIds);
int next=0;
vtkIdType next=0;
for (id=0; id<totalPoints; id++)
{
......@@ -460,7 +458,7 @@ void vtkExtractCells::CopyCellsDataSet(vtkIdList *ptMap, vtkDataSet *input,
cellPoints->SetId(i, newId);
}
int newId = output->InsertNextCell(input->GetCellType(cellId), cellPoints);
vtkIdType newId = output->InsertNextCell(input->GetCellType(cellId), cellPoints);
newCD->CopyData(oldCD, cellId, newId);
if(origMap)
......@@ -530,9 +528,9 @@ void vtkExtractCells::CopyCellsUnstructuredGrid(vtkIdList *ptMap,
{
if (*cellPtr > maxid) continue;
int oldCellId = *cellPtr;
vtkIdType oldCellId = *cellPtr;
int loc = locs[oldCellId];
vtkIdType loc = locs[oldCellId];
int size = static_cast<int>(cells[loc]);
vtkIdType *pts = cells + loc + 1;
unsigned char type = types->GetValue(oldCellId);
......
......@@ -118,7 +118,7 @@ int vtkExtractEdges::RequestData(
// Loop over all cells, extracting non-visited edges.
//
int tenth = numCells/10 + 1;
vtkIdType tenth = numCells/10 + 1;
for (cellNum=0; cellNum < numCells && !abort; cellNum++ )
{
if ( ! (cellNum % tenth) ) //manage progress reports / early abort
......
......@@ -92,7 +92,7 @@ int vtkExtractGeometry::RequestData(
vtkSmartPointer<vtkCellIterator>::Take(input->NewCellIterator());
vtkIdList *pointIdList;
int cellType;
int numCellPts;
vtkIdType numCellPts;
double x[3];
double multiplier;
vtkPoints *newPts;
......
......@@ -1067,10 +1067,10 @@ int vtkExtractSelectedFrustum::ABoxFrustumIsect(double *bounds, vtkCell *cell)
//handle degenerate cells by testing each point, if any in, then in
int vtkExtractSelectedFrustum::IsectDegenerateCell(vtkCell *cell)
{
int npts = cell->GetNumberOfPoints();
vtkIdType npts = cell->GetNumberOfPoints();
vtkPoints *pts = cell->GetPoints();
double x[3];
for (int i = 0; i < npts; i++)
for (vtkIdType i = 0; i < npts; i++)
{
pts->GetPoint(i, x);
if (this->Frustum->EvaluateFunction(x) < 0.0)
......
......@@ -228,7 +228,7 @@ int vtkExtractSelectedThresholds::ExtractCells(
vtkCell *cell = 0;
vtkPoints *newPoints = 0;
vtkIdType i, ptId, newId, numPts, numCells;
int numCellPts;
vtkIdType numCellPts;
double x[3];
vtkPointData *pd=input->GetPointData(), *outPD=output->GetPointData();
......
......@@ -139,7 +139,7 @@ int vtkExtractVectorComponents::RequestData(
vtkDataSet *output = vtkDataSet::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
int numVectors = 0, numVectorsc = 0;
vtkIdType numVectors = 0, numVectorsc = 0;
vtkDataArray *vectors, *vectorsc;
vtkDataArray *vx, *vy, *vz;
vtkDataArray *vxc, *vyc, *vzc;
......
......@@ -446,8 +446,8 @@ int vtkBandedPolyDataContourFilter::RequestData(
// Polygons are assumed convex and chopped into filled, convex polygons.
// Triangle strips are treated similarly.
//
int numPolys = input->GetPolys()->GetNumberOfCells();
int numStrips = input->GetStrips()->GetNumberOfCells();
vtkIdType numPolys = input->GetPolys()->GetNumberOfCells();
vtkIdType numStrips = input->GetStrips()->GetNumberOfCells();
if ( numPolys > 0 || numStrips > 0 )
{
// Set up processing. We are going to store an ordered list of
......
......@@ -175,7 +175,6 @@ void vtkButterflySubdivisionFilter::GenerateLoopStencil(
{
vtkIdList *cellIds = vtkIdList::New();
vtkCell *cell;
int j;
vtkIdType startCell, nextCell, tp2, p;
int shift[255];
int processed = 0;
......@@ -227,10 +226,10 @@ void vtkButterflySubdivisionFilter::GenerateLoopStencil(
// Generate weights
#define VTK_PI vtkMath::Pi()
int K = stencilIds->GetNumberOfIds();
vtkIdType K = stencilIds->GetNumberOfIds();
if (K >= 5)
{
for (j = 0; j < K; j++)
for (vtkIdType j = 0; j < K; j++)
{
weights[j] = (.25 + cos (2.0 * VTK_PI * shift[j] / static_cast<double>(K))
+ .5 * cos (4.0 * VTK_PI * shift[j] / static_cast<double>(K))) / static_cast<double>(K);
......
......@@ -185,9 +185,9 @@ double vtkDijkstraGraphGeodesicPath::CalculateStaticEdgeCost(
void vtkDijkstraGraphGeodesicPath::BuildAdjacency(vtkDataSet *inData)
{
vtkPolyData *pd = vtkPolyData::SafeDownCast( inData );
int ncells = pd->GetNumberOfCells();
vtkIdType ncells = pd->GetNumberOfCells();
for ( int i = 0; i < ncells; i++)
for ( vtkIdType i = 0; i < ncells; i++)
{
// Possible types
// VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE,
......@@ -242,7 +242,7 @@ void vtkDijkstraGraphGeodesicPath::TraceShortestPath(
lines->InsertNextCell(this->NumberOfVertices);
// trace backward
int v = endv;
vtkIdType v = endv;
double pt[3];
vtkIdType id;
while (v != startv)
......
......@@ -238,7 +238,7 @@ void vtkDijkstraImageGeodesicPath::BuildAdjacency( vtkDataSet *inData )
{
vtkImageData *image = vtkImageData::SafeDownCast(inData);
int ncells = image->GetNumberOfCells();
vtkIdType ncells = image->GetNumberOfCells();
// optimized for cell type VTK_PIXEL
//
......@@ -247,7 +247,7 @@ void vtkDijkstraImageGeodesicPath::BuildAdjacency( vtkDataSet *inData )
vtkIdType vId[6] = {1,2,3,0,2,3};
double cost;
for ( int i = 0; i < ncells; ++i )
for ( vtkIdType i = 0; i < ncells; ++i )
{
image->GetCellPoints ( i, ptIds );
......
......@@ -95,7 +95,7 @@ int vtkLinearExtrusionFilter::RequestData(
vtkIdType *pts = 0;
vtkIdType npts = 0;
vtkIdType ptId, ncells, p1, p2;
int i, j;
vtkIdType i, j;
double x[3];
vtkPoints *newPts;
vtkCellArray *newLines=NULL, *newPolys=NULL, *newStrips;
......
......@@ -132,17 +132,17 @@ void vtkLoopSubdivisionFilter::GenerateEvenStencil (vtkIdType p1,
vtkIdList *ptIds = vtkIdList::New();
vtkCell *cell;
int i, j;
int numCellsInLoop;
int startCell, nextCell;
int i;
vtkIdType j;
vtkIdType startCell, nextCell;
vtkIdType p, p2;
vtkIdType bp1, bp2;
int K;
vtkIdType K;
double beta, cosSQ;
// Get the cells that use this point
polys->GetPointCells (p1, cellIds);
numCellsInLoop = cellIds->GetNumberOfIds();
vtkIdType numCellsInLoop = cellIds->GetNumberOfIds();
if (numCellsInLoop < 1)
{
vtkWarningMacro("numCellsInLoop < 1: " << numCellsInLoop);
......
......@@ -299,7 +299,7 @@ int vtkEllipticalButtonSource::RequestData(
vtkIdType opts[4];
vtkIdType npts = 0;
int numPolys=newPolys->GetNumberOfCells();
vtkIdType numPolys=newPolys->GetNumberOfCells();
for ( j=0, newPolys->InitTraversal(); j < numPolys; j++ )
{
newPolys->GetNextCell(npts,ipts);
......
......@@ -176,8 +176,8 @@ void vtkGlyphSource2D::ConvertColor()
void vtkGlyphSource2D::TransformGlyph(vtkPoints *pts)
{
double x[3];
int i;
int numPts=pts->GetNumberOfPoints();
vtkIdType i;
vtkIdType numPts=pts->GetNumberOfPoints();
if ( this->RotationAngle == 0.0 )
{
......
......@@ -112,8 +112,8 @@ int vtkBivariateLinearTableThreshold::RequestData(vtkInformation* vtkNotUsed(req
outRowIdsTable->AddColumn(outIds);
outRowDataTable->Initialize();
int numColumns = inTable->GetNumberOfColumns();
for (int i=0; i<numColumns; i++)
vtkIdType numColumns = inTable->GetNumberOfColumns();
for (vtkIdType i=0; i<numColumns; i++)
{
vtkDataArray* a = vtkDataArray::CreateDataArray(inTable->GetColumn(i)->GetDataType());
a->SetNumberOfComponents(inTable->GetColumn(i)->GetNumberOfComponents());
......@@ -122,7 +122,7 @@ int vtkBivariateLinearTableThreshold::RequestData(vtkInformation* vtkNotUsed(req
a->Delete();
}
for (int i=0; i<outIds->GetNumberOfTuples(); i++)
for (vtkIdType i=0; i<outIds->GetNumberOfTuples(); i++)
{
outRowDataTable->InsertNextRow(inTable->GetRow(outIds->GetValue(i)));
}
......@@ -245,7 +245,7 @@ int vtkBivariateLinearTableThreshold::ApplyThreshold(vtkTable* tableToThreshold,
}
acceptedIds->Initialize();
int numTuples = a1->GetNumberOfTuples();
vtkIdType numTuples = a1->GetNumberOfTuples();
double v1,v2;
for (int i=0; i<numTuples; i++)
{
......
......@@ -585,9 +585,9 @@ void vtkContingencyStatistics::Assess( vtkTable* inData,
varNames->SetValue( 1, varNameY );
// Store names to be able to use SetValueByName which is faster than SetValue
int nv = this->AssessNames->GetNumberOfValues();
vtkIdType nv = this->AssessNames->GetNumberOfValues();
vtkStdString* names = new vtkStdString[nv];
for ( int v = 0; v < nv; ++ v )
for ( vtkIdType v = 0; v < nv; ++ v )
{
vtksys_ios::ostringstream assessColName;
assessColName << this->AssessNames->GetValue( v )
......@@ -632,7 +632,7 @@ void vtkContingencyStatistics::Assess( vtkTable* inData,
for ( vtkIdType r = 0; r < nRowData; ++ r )
{
(*dfunc)( assessResult, r );
for ( int v = 0; v < nv; ++ v )
for ( vtkIdType v = 0; v < nv; ++ v )
{
outData->SetValueByName( r, names[v], assessResult->GetValue( v ) );
}
......
......@@ -339,7 +339,7 @@ void vtkOrderStatistics::Derive( vtkMultiBlockDataSet* inMeta )
stringCol->Delete();
double dq = 1. / static_cast<double>( this->NumberOfIntervals );
for ( int i = 0; i <= this->NumberOfIntervals; ++ i )
for ( vtkIdType i = 0; i <= this->NumberOfIntervals; ++ i )
{
// Handle special case of quartiles and median for convenience
......
......@@ -348,10 +348,10 @@ void vtkStatisticsAlgorithm::Assess( vtkTable* inData,
}
// Store names to be able to use SetValueByName, and create the outData columns
int nAssessments = this->AssessNames->GetNumberOfValues();
vtkIdType nAssessments = this->AssessNames->GetNumberOfValues();
vtkStdString* names = new vtkStdString[nAssessments];
vtkIdType nRowData = inData->GetNumberOfRows();
for ( int a = 0; a < nAssessments; ++ a )
for ( vtkIdType a = 0; a < nAssessments; ++ a )
{
// Prepare string for numVariables-tuple of variable names
vtksys_ios::ostringstream assessColName;
......@@ -398,7 +398,7 @@ void vtkStatisticsAlgorithm::Assess( vtkTable* inData,
{
// Apply functor
(*dfunc)( assessResult, r );
for ( int a = 0; a < nAssessments; ++ a )
for ( vtkIdType a = 0; a < nAssessments; ++ a )
{
// Store each assessment value in corresponding assessment column
outData->SetValueByName( r,
......
......@@ -177,8 +177,8 @@ void vtkSortFileNames::GroupFileNames(vtkStringArray *input,
std::list<unsigned int> ungroupedFiles;
std::vector<std::string> reducedFileNames;
unsigned int numberOfStrings = input->GetNumberOfValues();
for (unsigned int i = 0; i < numberOfStrings; i++)
vtkIdType numberOfStrings = input->GetNumberOfValues();
for (vtkIdType i = 0; i < numberOfStrings; i++)
{
std::string& fileName = input->GetValue(i);
extension = vtksys::SystemTools::GetFilenameLastExtension(fileName);
......@@ -507,8 +507,8 @@ void vtkSortFileNames::SortFileNames(vtkStringArray *input,
{
// convert vtkStringArray into an STL vector
std::vector<std::string> fileNames;
unsigned int numberOfStrings = input->GetNumberOfValues();
for (unsigned int j = 0; j < numberOfStrings; j++)
vtkIdType numberOfStrings = input->GetNumberOfValues();
for (vtkIdType j = 0; j < numberOfStrings; j++)
{
std::string& fileName = input->GetValue(j);
......
......@@ -144,14 +144,14 @@ void vtkDICOMImageReader::ExecuteInformation()
dir->Delete();
return;
}
int numFiles = dir->GetNumberOfFiles();
vtkIdType numFiles = dir->GetNumberOfFiles();
vtkDebugMacro( << "There are " << numFiles << " files in the directory.");
this->DICOMFileNames->clear();
this->AppHelper->Clear();
for (int i = 0; i < numFiles; i++)
for (vtkIdType i = 0; i < numFiles; i++)
{
if (strcmp(dir->GetFile(i), ".") == 0 ||
strcmp(dir->GetFile(i), "..") == 0)
......@@ -310,7 +310,7 @@ void vtkDICOMImageReader::ExecuteDataWithInformation(vtkDataObject *output,
std::vector<std::string>::iterator fiter;
int count = 0;
int numFiles = static_cast<int>(this->DICOMFileNames->size());
vtkIdType numFiles = static_cast<int>(this->DICOMFileNames->size());
for (fiter = this->DICOMFileNames->begin();
fiter != this->DICOMFileNames->end();
......
......@@ -68,8 +68,8 @@ void vtkTableToSQLiteWriter::WriteData()
insertPreamble += "(";
//get the columns from the vtkTable to finish the query
int numColumns = this->GetInput()->GetNumberOfColumns();
for(int i = 0; i < numColumns; i++)
vtkIdType numColumns = this->GetInput()->GetNumberOfColumns();
for(vtkIdType i = 0; i < numColumns; i++)
{
//get this column's name
std::string columnName = this->GetInput()->GetColumn(i)->GetName();
......@@ -118,11 +118,11 @@ void vtkTableToSQLiteWriter::WriteData()
}
//iterate over the rows of the vtkTable to complete the insert query
int numRows = this->GetInput()->GetNumberOfRows();
for(int i = 0; i < numRows; i++)
vtkIdType numRows = this->GetInput()->GetNumberOfRows();
for(vtkIdType i = 0; i < numRows; i++)
{
std::string insertQuery = insertPreamble;
for (int j = 0; j < numColumns; j++)
for (vtkIdType j = 0; j < numColumns; j++)
{
insertQuery += "'" + this->GetInput()->GetValue(i, j).ToString() + "'";
if(j < numColumns - 1)
......
......@@ -84,14 +84,14 @@ int vtkImageHistogramStatistics::RequestData(
vtkIdType lowSum = static_cast<vtkIdType>(total*lowPercentile);
vtkIdType highSum = static_cast<vtkIdType>(total*highPercentile);