Converting Tiff files into 4D array containing the raw image data with 8 bit integer encoding.
이전 댓글 표시
Dear all,
I have started learning programming only 2 weeks ago and I am fresh in this field. Nonetheless, I need to convert tiff files to 4D array with approprite parameters which indicated below. I am going to use the converted images in further analysis. I would be grateful for any help with coding!
- MATLAB® formatted binary file (MAT-file; file-extension: .mat).MAT-files have to contain two variables:
- img: 4D array containing the raw image data with 8 bit integer encoding; dimensions should correspond to X/Y/Z directions and the color channels.
- hdr: structure with two fields, describing dimensionality and resolution (given as scaling factors) of the raw data in the array "img":
- hdr.dim: vector of length 4, with values specifying the number of dimensions in array "img" and the size of each dimension.For example, hdr.dim=[4,1024,1024,132,2] specifies that the array "img" has 4 dimensions with the size of dimensions being respectively 1024, 1024, 132 and 2.
- hdr.pixdim: vector of length 4, with values specifying the number of dimensions in array "img" and the factors to scale each dimension to micrometer. The forth dimension corresponds to the color channels and therefore has no scaling applied to it. Therefore, set its scaling factor to 1.For example, hdr.pixdim=[4,0.2076,0.2076,0.4,1] specifies that the array "img" has 4 dimensions and the X/Y dimension has to be scaled by 0.2076 and the Z dimension by 0.4.
댓글 수: 4
Rik
2022년 8월 23일
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).
Nikita Arnst
2022년 8월 23일
편집: Nikita Arnst
2022년 8월 23일
Shubham
2022년 9월 5일
Were you able to solve this? I am also trying to figure out.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 High Dynamic Range Images에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!