Can you read multiple layers from a .JPX file?

3 ビュー (過去 30 日間)
Calvin Eiber
Calvin Eiber 2020 年 3 月 27 日
回答済み: Abhisek Pradhan 2020 年 3 月 30 日
I am trying to work with (read & write) .jpx files which contain multiple layers, much like a .TIFF file.
using imread, you can read files which contain multiple images (such as a .TIFF file) like so:
img = imread('my_image_stack.tif',3); % to get the third frame in the image stack
I can confirm using imfinfo that my .jpx file contains multiple images, and when I open my file in e.g. Imaris I can see my image stack:
info = imfinfo('my_image_stack.jpx'); % get info about file
image_size_bytes = info.Width * info.Height * info.BitDepth / 8;
images_per_file = info.FileSize / image_size_bytes
% >> images_per_file = 11.2503
Is there a way to get the other frames of my image using matlab, or do I need to convert all of my .jpx files to .tiffs?

回答 (1 件)

Abhisek Pradhan
Abhisek Pradhan 2020 年 3 月 30 日
I could understand you want to read each layer using A = imread(___ ,index ), which applies only to GIF, PGM, PBM, PPM, CUR, ICO, TIF, and HDF4 files.
So, converting the JPX file into any of the file format may be a possible way to achieve it.

カテゴリ

Help Center および File ExchangeImage Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by