how to open .bim image file

9 views (last 30 days)
nuclear medicine
nuclear medicine on 9 Jun 2022
Answered: Chandrika on 13 Jun 2022
want to read and comvert .bim image file to png

Answers (1)

Chandrika
Chandrika on 13 Jun 2022
As per my understanding, you want to read and convert a blocked image into png file format.
In MATLAB, you can do this using the 'images.blocked.PNGBlocks' adapter. It creates a 'PNGBlocks' object which reads and writes 2-D blocked image data in the PNG format.
If 'bim' is your blocked image, first write it to files using 'images.blocked.PNGBlocks' as the adapter.
wa = images.blocked.PNGBlocks();
write(bim, "dirOfPNGs", "Adapter", wa);
Here, 'dirOfPNGs' corresponds to the folder of images created. Next, to create a blocked image file having Blockformat as 'png', refer to the following command:
bpng = blockedImage("dirOfPNGs");
disp(bpng.Adapter)
For a better understanding, please follow the documentation on PNGBlocks https://www.mathworks.com/help/images/ref/images.blocked.pngblocks.html
Hope it helps!

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by