Describe angulated slices using imref3d
Show older comments
Just found out about the functions imref2d and imref3d and I am a bit puzzled on how to implement angulated slices.
slicedata = rand(10,10,1);
% set coordinates
xbounds = [-100 100]; % x and y run from -100 cm
ybounds = [-100 100]; % to 100 cm
zbounds = [-10 2]; % zslice is angulated; 'left' side is
% lower then 'right' side.
To create an imref3d object I would then expect to use:
imref3d([size(slicedata) 1],xbounds,ybounds,zbounds)
However when I look at the imref3d object contents, it says:
imref3d with properties:
XWorldLimits: [-100 100]
YWorldLimits: [-100 100]
ZWorldLimits: [-10 2]
ImageSize: [10 10 1]
PixelExtentInWorldX: 20
PixelExtentInWorldY: 20
PixelExtentInWorldZ: 12
ImageExtentInWorldX: 200
ImageExtentInWorldY: 200
ImageExtentInWorldZ: 12
XIntrinsicLimits: [0.5000 10.5000]
YIntrinsicLimits: [0.5000 10.5000]
ZIntrinsicLimits: [0.5000 1.5000]
Here PixelExtenInWorldX and PixelExtenInWorldY are correct; however it interprets the PixelExtenInWorldZ wrongly. Is this a bug or am I just misusing the imref3D object? If so; does anyone has suggestions for improvements?
Accepted Answer
More Answers (0)
Categories
Find more on Generic Geometric Transformations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!