필터 지우기
필터 지우기

I need to import a file of unsupported format into Matlab (multiple image sequence)

조회 수: 6 (최근 30일)
I have files that contain multiple frames of raw data images (uint16 or uint32)and I have the row column information and how many frames are stored consecutively in the file. However, I can not find a suitable approach for telling matlab to import this file and the images it contains. It is a proprietary format (Ultrasound data) but I can look in a separate header file to find out the image parameters. Does anyone know how to tellMatlab to not only tell it the size of columns and rows but that there are multiple images as well???
Thank You!

답변 (1개)

Chaowei Chen
Chaowei Chen 2011년 8월 22일
Does the file follows a certain format like tif? In this case, frame_k = imread('filename.tif',k);
If it is a custom format, I bet you can work around with the template below
fid = fopen(f_name, 'rb' );
file_id = fread( fid, 16, 'uchar');
file_head = fread( fid, 5, 'int32' ); % File_header
nFr = file_head(1); width = file_head(2); depth = file_head(3); nFrp3D = file_head(4); n3D = file_head(5);
fclose(fid);
  댓글 수: 1
John Crane
John Crane 2011년 8월 22일
It is not one of the supported file formats but it is similar to a tif. For these file there is no header and imaging data starts at byte 0. I would get the parameters from another file. Would you still do an fread when you have file_head(1..5)?
It just doesn't appear to me how to pass the multi frame parameters into fread or imread.

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

카테고리

Help CenterFile Exchange에서 Ultrasound Imaging에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by