Commit dbbef3f2 authored by Berk Geveci's avatar Berk Geveci Committed by George Zagaris
Browse files

Fixed bug in send structured data.

The origin was not offset properly in cases where extent
had to be adjusted. This is all due to the fact that the
legacy writer always writes extents starting at 0.

Change-Id: Id37f21d7c99d2ecdf6285d2870bf87e10b534a7a
parent 24a324ef
......@@ -641,7 +641,22 @@ int vtkCommunicator::UnMarshalDataObject(vtkCharArray *buffer,
}
else if (id)
{
// If we fix the extent, we need to fix the origin too.
double origin[3];
id->GetOrigin(origin);
double spacing[3];
id->GetSpacing(spacing);
int readerExt[3];
id->GetExtent(readerExt);
for (int i=0; i<3; i++)
{
if (readerExt[2*i] != extent[2*i])
{
origin[i] = origin[i] - (extent[2*i] - readerExt[2*i])*spacing[i];
}
}
id->SetExtent(extent);
id->SetOrigin(origin);
}
}
......
Supports Markdown
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