[vtkusers] about the Update method in the vtk pipline

Zhang zhijun zjzhang at ee.cuhk.edu.hk
Sun Dec 15 04:08:29 EST 2002


Dear all: 
           
           I want to use vtkImageReslice to resample nonrigid transformed images, I have serveral nonrigid transfromations, the transformation is represented by the different displacement field.I use vtkImgedata to store them. every time, I use SetDisplacementGrid function to change the grid transformation, then I update the field data, update the vtkGridTransform object, and then the vtkImageReslice object. but when I change the field, the resliced image didn't change. it seems vtkimagereslice didn't recalculate. I use the following method:

vtkImageData *grid;
vtkGridTransform *Transform;
vtkImageReslice *reslice;
.....
for each displacement field
float *disp=(float*)grid->GetScalarPointer();
/// set the displacement field to disp pointer
grid->Update();
Transform->SetDisplacementGrid(grid);
Transform->Update();
reslice->SetResliceTransform(Transform);
reslice->Update();

I think when I call grid->update(),the modifytime of the grid will be remembered, and when reslice calls his 
reslice will know the grid have been updated and recalculate reslice himself again, I don't know why this didn't happen.Can anyone give me any idea on this, I dont' know whether there is a function I didn't call or is there any 
reason for this?

regards,
zhang zhijun

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021215/0a94530e/attachment.htm>


More information about the vtkusers mailing list