HOW TO CHANGE BINARY IMAGES TO 3D ARRAY (CONVERT TO 3D DIMENSION)
34 ビュー (過去 30 日間)
Hi all, I have 41 binary images.
Anyone know how convert it into 3D?
I means now my binary images just have dimension(let say 256 x 256). Then how to add thickness (as example thickness: 2.332) into that binary images?
So that my binary images now in 3D, (example 256x256x2.332)
Anyone can help me?
DGM 2021 年 10 月 8 日
As per Rik's suggestion:
% assuming that your dicom images and binary images have same page geometry
numframes = 41;
s = [size(P,1) size(P,2)];
maskstack = zeros(s(1),s(2),numframes);
for f = 1:numframes
if f == 1
maskstack(:,:,f) = readimage(imds,f);
% build location arrays
[X Y Z] = ndgrid(1:s(1),1:s(2),0:2.332:(numframes-1)*2.332);
Or something like that.
その他の回答 (1 件)
Image Analyst 2021 年 10 月 8 日
If you want, just consider your 256x256 image as having a thickness of 2.332 millimeters or centimeters or whatever. There is nothing to do to the image. However if you compute something like area of some region and want the volume in 3-D you have to multiply the area by the square of the lateral pixelsPerMm and then by the z-direction slice spacing of 2.332 to get the volume in mm.