[vtkusers] automatic update of objects generating a vtkAbstractTransform
David Gobbi
dgobbi at irus.rri.on.ca
Tue Mar 20 20:24:15 EST 2001
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.
It is written out clearly in the header file:
----
void TransformPoint(const float in[3], float out[3]) {
this->Update(); this->InternalTransformPoint(in,out); };
----
Classes such as vtkImageReslice or vtkTransformPolyDataFilter
will usually call transform->Update() at the beginning
of every Execute() cycle and then call transform->InternalTransformPoint()
for each transformed point (transform->InternalTransformPoint is identical
to transform->TransformPoint except for the lack of Update).
- David
--
David Gobbi, MSc dgobbi at irus.rri.on.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
On 20 Mar 2001, Alexandre Guimond wrote:
> Hi all. I build a little object that does image registration and
> outputs a vtkAbstractTransform. It is derived from vtkProcessObject.
> The problem I have is that when I want use the resulting
> transformation, for example with vtkImageReslice, I have to call
> RegistrationObject->Update() explicitly since there is no automatic
> update mechanism for vtkAbstractTransform such as there is for
> vtkDataObject, or at least none that I know of. Is there a simple way
> of implementing this sort of thing in vtk, or would I have to through
> and develop the same type of update process that exists with
> vtkSource/vtkDataObject?
>
> thx for the info.
>
More information about the vtkusers
mailing list