[vtkusers] vtkImageActor position is not automatically set in VTK CVS
Michael Dussere
dussere at labri.fr
Thu Feb 17 04:55:34 EST 2005
I just get the CVS version of VTK and I remarked that vtkImageActor
comportment changed. It no more uses its ImageData origin to
automatically set its poition.
Is it normal???
In VTK 4.2, I used to do
imagedata = vtkImageData::New();
imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ;
imagedata->SetSpacing(dx, dy, 1);
imagedata->SetOrigin (x0*dx,y0*dy,0);
actor = vtkImageActor::New();
actor->SetInput(imagedata->GetOutput());
// actor position = {x0*dx, y0*dy, 0}
Now, in VTK CVS, I have to do
imagedata = vtkImageData::New();
imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ;
imagedata->SetSpacing(dx, dy, 1);
imagedata->SetOrigin (x0*dx,y0*dy,0);
actor = vtkImageActor::New();
actor->SetInput(imagedata->GetOutput());
// actor position = {0, 0, 0}
actor->SetPosition(imagedata->GetOutput()->GetOrigin());
// actor position = {x0*dx, y0*dy, 0}
More information about the vtkusers
mailing list