stack multiple 2D images
46 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Bjorn Gustavsson
am 21 Mai 2021
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 Kommentare
Tim
am 21 Mai 2021
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 Kommentare
Siehe auch
Kategorien
Mehr zu Basic Display finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!