Brian,
>
> I'm developing an application in which I'm trying to incorporate
> orthogonal views. Do any SPM/matlab programmers have insight as to
> how a button press in one view is translated to the other two views.
>
You should look at spm_image.m and spm_orthviews.m for information on
how SPM changes the other slices and accounts for user imposed
manipulations on the views. Search for ButtonDownFcn to trace back what
actually happens when a user clicks on the axes.
>
> e.g. If I select voxel (128, 124, 80) in the axial view, what
> coordinates does that map to in the coronal and sagittal views. Also,
> I'm working with dicom orientation (versus the SPM/nifti orientation).
>
Each voxel only has one set of coordinates in a given coordinate system,
for example (128, 124, 80). The units matter, voxels or mm. The
selected voxel is the same in all views, what changes in the different
views is the slice and orientation that you are looking at. In the
axial view you'd want slice 80, coronal = 124, and sagittal = 128,
assuming you are in the same coordinate system as SPM and want the
slices in the voxel coordinate system with the specified orientation.
You can change the views in many ways without changing the voxel selected.
Perhaps other programmers have additional suggestions and/or could
correct me where I am mistaken.
Good luck!
-Dan
|