[vtkusers] add circles & sphere to DICOM slices & 3D viewer

mbcx9rb9 richard.j.brown at live.co.uk
Fri Jan 9 05:03:12 EST 2015


I currently have 3 orthogonal views and an isosurface 3D of a DICOM. I would
like that when the user clicks on a point on one of the 3 orthogonal views,
a sphere is created at that point. This would be displayed as circles on the
3 orthogonal views (naturally, the cirlces wouldn't be visible all the time,
as one view could be looking at a different slice/section of the DICOM) and
a sphere on the 3D viewer.

So far, I have created a custom interactor which passes the x- y-coordinates
(via GetEventPoisition()) to a function and the z-coordinate is obtained
through imageViewer->getSlice().

After that, I create a circle/sphere with vtkRegularPolygonSources (with
high number of sides) and vtkSphereSoure. They then get added to the render
with ui->qvtkWidget->GetRenderWindow()->AddRenderer(circle or sphere
renderer).

All well and good, however, I have two problems:
1. the coordinates returned by the interactor use the Display coordinate
system, so they depend on the window size, zoom, rotation, etc. of the
viewer - can I get it to return the nearest DICOM world(?) coordinate such
that, for a DICOM of 500 x 500 x 500 slices, I return x, y, z coordinates
between 0 and 500?

2. When I draw the circle or sphere, it removes the previous slice or 3D
render. I saw in this  example
<http://vtk.1045678.n5.nabble.com/render-a-sphere-at-a-point-in-a-volume-td1246875.html#a1246876> 
, he added both actors at the same time. Short of redrawing everything I
can't do that - it seems that adding one in later removes the previous
render?

Thanks in advance for the help!
Richard



--
View this message in context: http://vtk.1045678.n5.nabble.com/add-circles-sphere-to-DICOM-slices-3D-viewer-tp5730043.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list