stack multiple 2D images
조회 수: 58 (최근 30일)
이전 댓글 표시
Hi,
I have 2D images pertaining to different Z positions (lets say 10 mm, 20 mm, 30 mm etc), Now I would like to stack images belongs to all Z positions on the single plot.. Could some one help how to do this ??
Right now, I plotting the image indivdual 2D image as follows
imagesc (x,y,B); % Where B is the matrix which got the intensity values
댓글 수: 0
답변 (2개)
Bjorn Gustavsson
2021년 5월 21일
Unfortunately matlab is a bit weak when it comes to displaying volumetric data. You can use the slice function and use the alpha-parameters to modify the transparency. Something like this:
for iZ = nZ:-1:1
V(:,:,iZ) = Bcell{iZ}; % just to get all the images into a 3-D array
end
idx_X = [12 37]; % Just example slices
idx_Y = [13 29];
idx_Z = [2 7];
ph = slice(X,Y,Z,V,idx_X,idx_Y,idx_Z),shading flat
and then setting the alpha and face-alpha-properties of ph (I have had some success using this earlier, when toying with this today, not so fortunate).
There's also a number of submissions on the FEX:
image3, imshow3d, 4-dimensional-visualization, hypervolume-viewer, sliceomatic, 3d-volume-slicer, 4d-volume-visualization and 3d-volume-visualizationviewer3d (I have surely missed a few...).
HTH
댓글 수: 0
Tim
2021년 5월 21일
Matlab's volume visualization got a big boost with volshow a couple years ago, if you have the image processing toolbox. Using the volume V from the comment above, use:
volshow(V);
There's a lot of rendering options. For example, I frequently prefer using a MIP's on a black background. E.g. try:
volshow(randn(100, 100, 100), 'Renderer', 'MaximumIntensityProjection', 'BackgroundColor', [0, 0, 0]);
It's tricker to visualize volume data if you have RGB voxels but there are some FEX options out there.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!