필터 지우기
필터 지우기

how to save a modified 3D raw file ?

조회 수: 1 (최근 30일)
Hoda
Hoda 2016년 2월 11일
편집: Hoda 2016년 2월 11일
Hi I am trying to read a raw file (float64, which is a deformation vector field), with 3 dimensions 304 *224 * 52. Then i want to change all the values within this file by dividing them by 10. After that I want to save the modified file again as a raw file with the same specifications. I wrote a code but I am not able to save the file. I think I might be missing something. I am a beginner in matlab so I would appreciate your help and patience. Thank you.
fid = fopen('I:\PatientData\patient1\out_2_to_1_us\deformationField_test.raw')
dvf = fread(fid);
length(div) div =(0.1)* ones(42491904,1); dvf_cm = dvf.* div;
count = fwrite(fid,dvf_cm,'float64'); fclose(fid);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by