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!