Correspondence between intrinsic axes and world axes for imref objects

1 回表示 (過去 30 日間)
Matt J
Matt J 2019 年 6 月 6 日
編集済み: Matt J 2019 年 6 月 7 日
Suppose I have a 3D array of image samples I(i,j,k), i=1...M, j=1...N, k=1...P.
In world coordinates, pixel spacing in millimeters along the i,j, and k sampling directions are di, dj,and dk respectively. Now, I wish to create an imref3d object relating these samples to my world coordinates.
Question: According to the conventions of imref3d, are the world X, Y, and Z axes considered to be aligned respectively with increasing i,j, and k? Or is it j,i, and k like with meshgrid? Or something else entirely?
I am trying to determine whether, when using the construction syntax
R = imref3d(imageSize,pixelExtentInWorldX,pixelExtentInWorldY,pixelExtentInWorldZ)
the proper substitions of my parameters are as follows,
R = imref3d([M,N,P] , di, dj, dk)
or something else? And what about imref2d? Any fundamental differences between the 3d and 2d conventions?

採用された回答

Catalytic
Catalytic 2019 年 6 月 6 日
Or is it j,i, and k like with meshgrid?
It is this one, sad to say. You can check it like this
M=50; N=40; P=30;
ir = imref3d([M,N,P])
ir =
imref3d with properties:
XWorldLimits: [0.5000 40.5000]
YWorldLimits: [0.5000 50.5000]
ZWorldLimits: [0.5000 30.5000]
ImageSize: [50 40 30]
PixelExtentInWorldX: 1
PixelExtentInWorldY: 1
PixelExtentInWorldZ: 1
ImageExtentInWorldX: 40
ImageExtentInWorldY: 50
ImageExtentInWorldZ: 30
XIntrinsicLimits: [0.5000 40.5000]
YIntrinsicLimits: [0.5000 50.5000]
ZIntrinsicLimits: [0.5000 30.5000]
As you see, the image extents in X,Y,Z are N,M, and P, so the usual meshgrid interchanging of X and Y is at work here as well :-(
  1 件のコメント
Matt J
Matt J 2019 年 6 月 7 日
編集済み: Matt J 2019 年 6 月 7 日
It is this one, sad to say
I tend to agree that it is sad, although I guess I also understand why some people like to have their X-axes run horizontally on the screen.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by