[vtkusers] ] How to get the right 3D world position for the 2d
Richard Frank
rickfrank at me.com
Fri Jun 16 12:36:15 EDT 2017
>
> Hi,
>
> In our application, we have 3 2d views using vtkImageViewer2 to display
the
> sagittal, coronal and axial view of the DICOMs, and we have another view
for
> the generated 3D model. Now I want to achieve the requirement below:
>
> If user click a point on one slice on the 2D view, I need to get the
> corresponding 3D point on the 3D model view.
> If user click a point on the 3D model view, I need to get the
corresponding 2D
> point and slice number.
>
> How to achieve that?
>
> Thanks
> tjlp
Depending on how you load the data into the vtkImage, you will need to map
from voxel space (I,j,k) to patient space (L,P,S, or R,A S)
In general, you will use Equation C.7.6.2.1-1.
As seen here
http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.7
.6.2.1.1
The equation doesn't show Z or k values, so you would have to consider them
(the Z direction cosines vector, and the k value in the image volume) as
part of a 3 dimensional mapping.
HTH
Rick Frank
Dominion Software, Inc.
www.dominionsw.com
More information about the vtkusers
mailing list