将两个不同大小的3D矩阵相互映射

时间:2022-06-03 12:00:07

I have two matrices MRI scans of completely different sizes (141x172x110 and 176x208x176). I need to map the larger matrix B to the smaller one A. The values of matrix A are regions of a brain - an atlas, and the values of matrix B are the type of brain matter. I need to figure out from which region of the brain each index in B comes. Each index is a 1mm square area of space in both matrices. Each matrix is centered at the middle index in each matrix (median of each dimension), so overlaying the two matrices will create some overlap with boundaries of each index. I imagine some solution like Euclidean distance or majority vote is feasible, but not sure where to begin. Any ideas?

我有两个完全不同尺寸的基质MRI扫描(141x172x110和176x208x176)。我需要将较大的矩阵B映射到较小的矩阵A.矩阵A的值是大脑的区域 - 地图集,矩阵B的值是大脑物质的类型。我需要弄清楚B中每个指数来自大脑的哪个区域。每个指数在两个矩阵中都是1平方毫米的空间区域。每个矩阵以每个矩阵的中间索引为中心(每个维度的中间值),因此覆盖两个矩阵将与每个索引的边界产生一些重叠。我想像欧几里得距离或多数投票这样的解决方案是可行的,但不知道从哪里开始。有任何想法吗?

1 个解决方案

#1


Looks like what you really need is to scale up the smaller matrix to the same (probably proportional) size as the larger matrix and use interpolation. You should be able to use this answer:

看起来你真正需要的是将较小的矩阵放大到与较大矩阵相同(可能是比例)的大小并使用插值。你应该能够使用这个答案:

resizing 3D matrix (image) in MATLAB

在MATLAB中调整3D矩阵(图像)的大小

#1


Looks like what you really need is to scale up the smaller matrix to the same (probably proportional) size as the larger matrix and use interpolation. You should be able to use this answer:

看起来你真正需要的是将较小的矩阵放大到与较大矩阵相同(可能是比例)的大小并使用插值。你应该能够使用这个答案:

resizing 3D matrix (image) in MATLAB

在MATLAB中调整3D矩阵(图像)的大小