Commit 51996a64 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

BUG #11607: Fixed support for large images.

Similar to fix for BUG #12753, except this time fixing it for
vtkXMLPStructuredDataReader.

Change-Id: Iecc61616a628f04b428eba738a08c510e0f1cf4f
parent 4087b625
......@@ -62,17 +62,17 @@ void vtkXMLPStructuredDataReader::PrintSelf(ostream& os, vtkIndent indent)
//----------------------------------------------------------------------------
vtkIdType vtkXMLPStructuredDataReader::GetNumberOfPoints()
{
return (this->PointDimensions[0]*
this->PointDimensions[1]*
this->PointDimensions[2]);
return (static_cast<vtkIdType>(this->PointDimensions[0])*
static_cast<vtkIdType>(this->PointDimensions[1])*
static_cast<vtkIdType>(this->PointDimensions[2]));
}
//----------------------------------------------------------------------------
vtkIdType vtkXMLPStructuredDataReader::GetNumberOfCells()
{
return (this->CellDimensions[0]*
this->CellDimensions[1]*
this->CellDimensions[2]);
return (static_cast<vtkIdType>(this->CellDimensions[0])*
static_cast<vtkIdType>(this->CellDimensions[1])*
static_cast<vtkIdType>(this->CellDimensions[2]));
}
//----------------------------------------------------------------------------
......@@ -354,16 +354,19 @@ vtkXMLPStructuredDataReader
if(inDimensions[2] == outDimensions[2])
{
// Copy the whole volume at once.
unsigned int volumeTuples = (inDimensions[0]*
inDimensions[1]*
inDimensions[2]);
vtkIdType volumeTuples =
(static_cast<vtkIdType>(inDimensions[0])*
static_cast<vtkIdType>(inDimensions[1])*
static_cast<vtkIdType>(inDimensions[2]));
memcpy(outArray->GetVoidPointer(0), inArray->GetVoidPointer(0),
volumeTuples*tupleSize);
}
else
{
// Copy an entire slice at a time.
vtkIdType sliceTuples = inDimensions[0]*inDimensions[1];
vtkIdType sliceTuples =
static_cast<vtkIdType>(inDimensions[0])*
static_cast<vtkIdType>(inDimensions[1]);
int k;
for(k=0;k < subDimensions[2];++k)
{
......
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