[vtkusers] Re: vtkImageActor position is not automatically set in VTKCVS

Goodwin Lawlor goodwin.lawlor at ucd.ie
Thu Feb 17 10:12:30 EST 2005


Hi Michael,

See this CVS log:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkImageActor.cxx?rev=1.18&view=markup

hth

Goodwin

"Michael Dussere" <dussere at labri.fr> wrote in message
news:42149EEA.9030604 at labri.fr...
> 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???
>
> Michael
>
>
>
> 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}
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>






More information about the vtkusers mailing list