<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 12, 2015 at 7:54 AM, mbcx9rb9 <span dir="ltr"><<a href="mailto:richard.j.brown@live.co.uk" target="_blank">richard.j.brown@live.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
The circle, for example, always appears in the centre of the rendered screen<br>
and is always the same size.</blockquote><div><br></div><div>If you don't set the FocalPoint, Position, ViewUp, and ViewAngle of the vtkCamera,</div><div>then the vtkCamera will set these automatically so that the the actors are within</div><div>view.  To get an idea of what is going on, you should try setting these parameters</div><div>manually.  Also, search google for "opengl camera" because there are tons of well-</div><div>written documents about the camera metaphor that is used for 3D graphics.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> If I go to the 0th slice and click the bottom<br>
left pixel, the circle then jumps up in the middle of the screen. Using the<br>
GetPointIJK structured coordinates, do I need to convert the selected point<br>
to a different coordinate system for the sphere/cutting plane?<br></blockquote><div><br></div><div>Get GetPointIJK gives the i,j,k (row, col, slice) indices into the image, i.e. integers.</div><div>VTK uses floating-point x,y,z coords for its data coords, which implicitly use units</div><div>of "mm" when dealing with DICOM files.  The picker's GetMapperPosition() and</div><div>GetPickPosition() methods return the latter.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I also haven't managed to see both the circle and the DICOM image at the<br>
same time, despite what feels like every combination of setOpacity,<br>
setAmbient, etc. When I set the background of the newly cut circle to green,<br>
everything goes green, so I think it might be that the background of the<br>
circle is masking the DICOM slice, can I set it to have a transparent<br>
background?<br></blockquote><div><br></div><div>There is no way to set the background for a single actor, AFAIK the only way to</div><div>set the background is in the vtkRenderer, in which case you are setting the background</div><div>for everything, and the background will therefore be behind everything and cannot</div><div>ever be in front of something.  Can you explain in more detail what you are doing?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Lastly, when I can draw the circle in the correct place, the correct size<br>
and can see the DICOM underneath, I need to fill the middle of the circle<br>
in. I saw on  this<br>
<<a href="http://vtk.1045678.n5.nabble.com/Filling-vtkCutter-output-td1244798.html#a1244800" target="_blank">http://vtk.1045678.n5.nabble.com/Filling-vtkCutter-output-td1244798.html#a1244800</a>><br>
 thread some suggestions, but neither vtkTriangleFilter nor<br>
vtkLinearExtrusionFilter did the trick for me. Any ideas?<br></blockquote><div><br></div><div> Try vtkContourTriangulator.</div><div><br></div><div> - David</div></div></div></div>