How to create a montage from a 3D subvolume?

I have created a 3D subvolume within a 3D image. I would now like to display that subvolume as a montage. It appears that I need to save the subvolume and then call it using the montage command. However, I cannot figure out how to successfully save the 3D subvolume. Please let me know if my question is unclear or if more information is needed. Thank you.

 Akzeptierte Antwort

Matt J
Matt J am 26 Sep. 2013
Bearbeitet: Matt J am 26 Sep. 2013

0 Stimmen

No, you don't need to save it. From the doc,
montage(I) displays all the frames of amultiframe image array I in a single image object. I can be a sequence of binary, grayscale, or truecolorimages. A binary or grayscale image sequence must be an M-by-N-by-1-by-K array. A truecolor image sequence must be an M-by-N-by-3-by-K array.

3 Kommentare

Colleen
Colleen am 26 Sep. 2013
So, my array (subvolume) is 512 X 512 X 6 array. It appears that I cannot simply use the command: montage(subvolume);
I get the errors: Error using imageDisplayValidateParams>validateCData (line 117) Unsupported dimension.
Error in imageDisplayValidateParams (line 31) common_args.CData = validateCData(common_args.CData,image_type);
Error in imageDisplayParseInputs (line 79) common_args = imageDisplayValidateParams(common_args);
Error in imshow (line 220) [common_args,specific_args] = ...
Error in montage (line 137) hh = imshow(bigImage, displayRange);
Do I need to rearrange this array in order to use montage?? Thank you!
I jumped the gun on asking a follow-up question. It appears that the following line of code solves my problem. Thanks!
montage(reshape(SubV,[size(SubV,1), size(SubV,2), 1, size(SubV,3)]),'DisplayRange',[]);
Jan
Jan am 13 Mär. 2014
Brilliant!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 26 Sep. 2013

Kommentiert:

Jan
am 13 Mär. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by