<div dir="ltr">Hello,<br><br>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. <br>
<br>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.<br>
<br>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:<br>
<br><br><span style="font-family: courier new,monospace;">- (void)cameraMove:(int)tag</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">//For Altering camera Position using D-Pad</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> renderOfVRView = [vrViewer renderer];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> aCamera = renderOfVRView->GetActiveCamera();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if (tag==0)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fprintf(stderr, "Up button Pressed\n"); fflush(NULL);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> aCamera->Elevation( 45);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> //[vrViewer renderer ResetCamera()];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if (tag==1)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> fprintf(stderr, "Down button Pressed\n"); fflush(NULL);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> //aCamera->Elevation( 45);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br>Thanking You<br>Conor Crowley<br></div>