I'm having some trouble reshaping a 4D array to a 2D array. Currently the array is follows, (14965, 16, 32, 256). Where 14965 is number of images. I want to save every 2D array in image formate.

댓글 수: 10

Walter Roberson
Walter Roberson 2018년 7월 8일
Are you trying to output 14965 images of 512 by 256 each?
mohammed mahmoud
mohammed mahmoud 2018년 7월 10일
256 is the number of channels
Walter Roberson
Walter Roberson 2018년 7월 10일
You appear to want 14965 images output. What size should each saved image be?
Or are you wanting to output 14965*256 = 3831040 image files?
mohammed mahmoud
mohammed mahmoud 2018년 7월 10일
i want 14965 images of size 16*32 but the problem is every image of this size have 256 channel not 3 RGB channel.
Guillaume
Guillaume 2018년 7월 10일
the problem is every image of this size have 256 channel
Well, then they're not images and you need to find out what these 256 channel represent. Until you do, we can't really help, we certainly have no idea what they are.
Walter Roberson
Walter Roberson 2018년 7월 10일
Another possibility is that you want to create multichannel TIFF.
mohammed mahmoud
mohammed mahmoud 2018년 7월 11일
I want to merge the 256 channel to one channel RGB image of 16*32
Walter Roberson
Walter Roberson 2018년 7월 11일
How do you want the merged channels to be calculated?
SliceNumber = 8392; %for example
frame = squeeze(YourArray(SliceNumber, :, :, :));
volumeViewer(frame)

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

답변 (0개)

질문:

2018년 7월 8일

댓글:

2018년 7월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by