[vtkusers] SetActiveCamera doesn't work

Kevin H. Hobbs hobbsk at ohiou.edu
Thu Oct 30 06:19:20 EDT 2008


On Thursday 30 October 2008 05:47:39 am masabumi ishihara wrote:
> Hi VTK users,
>
> I tried to use SetActiveCamera method,
> because I'd like to fix the image center when I am operating on the image.
> But it didn't work well, as a result, the center of the image moved
> half out of the window.
> My VTK proguram is as follows,
>
> 			vtkCamera *camera = vtkCamera::New();
> 			camera=vtkImage[nCurrent].pRenderer->GetActiveCamera();
> 			camera->SetWindowCenter((double)0,(double)0);
> 			vtkImage[nCurrent].pRenderer->SetActiveCamera(camera);
>
> If you know my mistake on the above program, please let me know!
>

What are you trying to do? 

If what you did changed the view then SetActiveCamera did work. Your program 
just dosen't do what you want.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081030/e9b1d04c/attachment.pgp>


More information about the vtkusers mailing list