[vtkusers] Re: automatic update of objects generating a vtkAbstractTransform

Alexandre Guimond guimond at bwh.harvard.edu
Wed Mar 21 11:02:58 EST 2001

On Tue, 20 Mar 2001 20:24:15 -0500 (EST)
David Gobbi <dgobbi at irus.rri.on.ca> writes:

> Hi Alexandre,
> There is an automatic update mechanism for vtkAbstractTransform.
> Any time you call transform->TransformPoint() or any similar
> method, the Update() method of the transform is automatically called.

Hi David.  Thx for the reply.  I had noticed this update mechanism
with vtkAbstractTransform.  I guess I didn't make myself clear
enough, or I'm not getting the process right.  What I meant is that
calling the transform::Update() function doesn't update the object
that generated the transform.  For example, here is a stripped down
version of my stuff

vtkStructuredPointsReader* TargetReader = vtkStructuredPointsReader::New();
vtkStructuredPointsReader* SourceReader = vtkStructuredPointsReader::New();

vtkImageRegistration* Registration = vtkImageRegistration::New();

vtkTransformWriter* Writer = vtkTransformWriter::New();

vtkTransformWriter::Write calls Update on the transform before writing
it.  This transform is in Registration and is obtained calling
Registration->GetTransform().  The problem is that
vtkTransform::Update() doesn't call Registration::Update(), hence the
transform written is the Identity.  To make it work, I have to call
Registration->Update() before writing,  not that this is a big
problem.  I'm just wondering if there is a way to do this
automitically as with vtkDataObject.

Hence my question: is there a way for vtkTransform to call the update
function of the object that generates it?

Alexandre Guimond, Ph.D. guimond at bwh.harvard.edu Phone:(617) 278-0800 
http://spl.bwh.harvard.edu:8000/~guimond/          Fax:(617) 264-5154
Brigham and Women's Hospital, Harvard Medical School
CNI, RF396, 221 Longwood Av, Boston, MA 02115

More information about the vtkusers mailing list