[vtkusers] strange update problem
Michael Knopke
Michael.Knopke at gmx.de
Tue Oct 14 06:39:29 EDT 2008
Hello UserGroup,
I just stumbled about a very strange occurrence that I can't figure out.
After modifying the elements of a matrix that was retrieved from a
vtkTransform (via ->GetMatrix()) the update pipeline seems not to work
correctly anymore.
Just a simple example:
//create a vtkTransform
vtkTransform* transform = vtkTransform::New();
//create vtkimagereslice and set it up to slice a volume, connnect it with
the transform
vtkImageReslice *reslice = vtkImageReslice::New();
reslice->SetSpacing...
reslice->SetTransform(transform);
...
//conntect the rest e.g. an imageActor to a renderer
...
// now when calling translate and Render everthing is fine
e.g. transform->Translate(0,0,100);
renWin->Render(); //updates the slicer
//call identity on the transform just for testing purpose
transform->Identity(); //works
renWin->Render(); //updates the slicer
// now when calling translate and Render it still works
e.g. transform->Translate(0,0,100);
renWin->Render(); //updates the slicer
//BUT when interchanging transform->Identity() with:
transform->GetMatrix()->Identity();
// it works but then successive calls to translate or rotate will not
trigger an update of the rendering???
// the does not happen when creating a matrix, modifying the elements and
setting it via transform->SetMatrix(matrix);
Does anybody know if this is a bug or am I doing something wrong here?
Regards
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081014/8ba2bb70/attachment.htm>
More information about the vtkusers
mailing list