Code covered by the BSD License  

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
InSPIRE: simple utility to read raw image into Matlab workspace

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 1.33 KB File ID: #36190 Version: 1.0

InSPIRE: simple utility to read raw image into Matlab workspace

by

Rex Cheung (view profile)

 

It reads a 3D raw image and show the mid cross-section of the raw volume image

| Watch this File

File Information
Description

This simple utility program reads a 3D image in raw format into Matlab workspace for your image processing. The user needs to have the formation of the voxel depth and the image x, y and z dimensions for this program to run. The code could be easily modified to show the sagittal and/or coronal planes for additional verification and visualization.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
25 Apr 2012 Rex Cheung

Rex Cheung (view profile)

Hi Sheng,
Thanks for your comments. You are right.
We just uploaded another readRaw.m has endian-ness, and the zdim/2 fixed:
fid = fopen(filename,'rb',endian); %'b' = big-endian %for X-machines, Little End in
%(little endian) for windows %(http://support.microsoft.com/kb/102025)
%it is the obscure fact that X %programmers
%like to store the big part of %their
%number first in the memory.

Comment only
23 Apr 2012 Sheng Yue

should "zplane=round(Xdim/2);"
to be "zplane=round(Zdim/2);"?

And you may need to include Endianness options to the code.

Comment only

Contact us