필터 지우기
필터 지우기

help with montage function

조회 수: 4 (최근 30일)
Jim O'Doherty
Jim O'Doherty 2011년 11월 1일
All,
I have a stack of images which is 63x64x16 and is a uint16 class. Any idea how I would make a montage using the montage function? I keep getting an errorwith the color map:
??? Error using ==> imageDisplayValidateParams>validateCData at 114
Unsupported dimension
Error in ==> imageDisplayValidateParams at 31
common_args.CData = validateCData(common_args.CData,image_type);
Error in ==> imageDisplayParseInputs at 79
common_args = imageDisplayValidateParams(common_args);
Error in ==> imshow at 199
[common_args,specific_args] = ...
Error in ==> montage at 139
hh = imshow(bigImage,cmap);
Thanks in advance!
Jim
  댓글 수: 1
Wayne King
Wayne King 2011년 11월 1일
please show how you actually call montage()

댓글을 달려면 로그인하십시오.

채택된 답변

Amith Kamath
Amith Kamath 2011년 11월 2일
From the help page for montage:
montage(X, map) displays all the frames of the indexed image array X, using the colormap map for all frames. X is an M-by-N-by-1-by-K array.
So I suppose you need to reshape your data into a 4D matrix, and then use montage on it with the appropriate colormap defined using map.
I ran montage on the 3D matrix and got the exact error, and hence I'm sure this will fix it!
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 11월 2일
I wonder how permute() compares in speed to reshape() for this purpose. Probably slower.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Red에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by