Hello, I am working on prostate segmentation in Slicer. After finishing the segmentation and saving the Scene, I took a look at the image volume (V) and the segmentation volume (S) nrrd files in python, the two volumes have the same orientation as I performed segmentation on axial slices (on the RA plane) and moved in the Superior-Inferior axis, segmenting one slice at a time.
Both V and S have ijk-to-ras matrices that enable me to recreate their relative location in space as shown in the figure below:
For a given a slice in V, I would like to find the corresponding slice in S in my code (or none if no intersection). Since I know that the two the volumes have the same orientation in space, I was thinking of simply taking one slice in V and check which slice in S is coplanar. I can do this by taking one point for each slice in S, so if S has 10 slices I have 10 points to compare with the current slice in V. Does this make sense? Or is there a simple way to achieve this?
Thank you