[vtkusers] Accessing vtkCamera in a Volume Render View in Osirix

Conor Crowley conordjpc at gmail.com
Thu Aug 7 10:26:12 EDT 2008


Hello,

I am afraid i am having a bit of trouble accessing the camera in a plugin I
am writing for Osirix. The plugin creates a Volume rendered view from DICOM
data. Osirix has its own VRView class which i am implementing and it is that
view which is creating both the renderer and the camera.

I believe that i can reference the camera in my own plugin, there are now
issues or errors occuring anyway, but when i try and hand commands through
to the camera, such as elevation() or dolly(), it causes an error at
runtime. Unfortunately I cannot be more specific about the error.

I am pretty new to both Objective-C and VTK so I am full and ready to
believe that i have made a Stupid Mistake in referencing or syntax or
anything. Right now i am out of ideas and am willing to try any possible
solution. The code is below:


- (void)cameraMove:(int)tag
//For Altering camera Position using D-Pad
{


    renderOfVRView = [vrViewer renderer];
    aCamera = renderOfVRView->GetActiveCamera();
    if (tag==0)
    {
        fprintf(stderr, "Up button Pressed\n"); fflush(NULL);
        aCamera->Elevation( 45);
        //[vrViewer renderer ResetCamera()];
    }
    if (tag==1)
    {
        fprintf(stderr, "Down button Pressed\n"); fflush(NULL);

        //aCamera->Elevation( 45);
    }

}

Thanking You
Conor Crowley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080807/857a3128/attachment.htm>


More information about the vtkusers mailing list