Closed tomjensen2 closed 11 months ago
Hi,
AQuA stores the pixel indexes of each event in the result, which can be used to decode X and Y coordinates. For example, if you want to get the X, Y location of event 100 (100 is a event id), you can use the following command:
[x, y] = ind2sub(res.opts.sz(1:2), res.fts.loc.x2D{100});
where x, y are the vectors of X, Y location of pixels in the event 100. You can imagine the image as a matrix, then x is the vector of row indexes, y is the vector of column index. That is, take the top-left point of image as location (1, 1), x is the distance to the top row, y is the distance to the leftmost column. Besides, 'ind2sub' is a MATLAB function to convert the index of pixel into coordinates according to the dimensions, and 'res.fts.loc.x2D' is the structure of storing pixel indexes. For example, if the coordinate (x, y) in the image with dimension (H, W), then its index will be (y - 1) * H + x. 'ind2sub' will convert it back.
Similarly, you can also decode the X, Y, T location of voxels in the event 100, like:
[x, y, t] = ind2sub(res.opts.sz, res.fts.loc.x3D{100});
where t is the vector of time points.
If you have any questions, please let me know.
Excellent just what I needed thanks.
I'm trying to get the location of each event detected but I can't find this information in the table. Is there an easy way to get this data?