ctf_read_mri

ctf_read_mri - function mri = ctf_read_mri(file) %...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: function mri = ctf_read_mri(file) % ctf_read_mri - read a CTF .mri file % % mri = ctf_read_mri(fileName) % % The CTF MRI File format used by MRIViewer consists of a binary file with % a 1,028 byte header. The MRI data can be in 8-bit (unsigned character) or % 16-bit (unsigned short integer) format and consists of 256 x 256 pixel % slices, stored as 256 contiguous sagittal slices from left to right (or % right to left if head orientation is left-on-right). Each slice is stored % as individual pixels starting at the left, anterior, superior % corner and scanning downwards row by row. Therefore the coronal % position is fastest changing, axial position second fastest % changing and sagittal position slowest changing value in the % file, always in the positive direction for each axis (see section % on Head Coordinate System for axis definitions). By default CTF % MRI files have the file extension .mri % % $Revision: 1.1 $ $Date: 2009/01/30 03:49:27 $ % Copyright (C) 2003 Darren L. Weber % % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License % as published by the Free Software Foundation; either version 2 % of the License, or (at your option) any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. % History: 08/2003, Darren.Weber_at_radiology.ucsf.edu % - adapted from an appendex to CTF document % MRIConverter.pdf, which is copied at the end of this % function. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%% ver = '[$Revision: 1.1 $]'; fprintf('\nCTF_READ_MRI [v%s]\n',ver(12:16)); tic; if ~exist('file','var'), [fileName, filePath, filterIndex] = uigetfile('*.mri', 'Locate CTF .mri file'); file = fullfile(filePath, fileName); elseif isempty(file), fprintf('...file is empty\n'); [fileName, filePath, filterIndex] = uigetfile('*.mri', 'Locate CTF .mri file'); file = fullfile(filePath, fileName); end if ~exist(file,'file'), fprintf('...file does not exist\n'); [fileName, filePath, filterIndex] = uigetfile('*.mri', 'Locate CTF .mri file'); file = fullfile(filePath, fileName); end...
View Full Document

This note was uploaded on 10/07/2010 for the course ENG 42336 taught by Professor Thomasholland during the Spring '10 term at UC Davis.

Page1 / 13

ctf_read_mri - function mri = ctf_read_mri(file) %...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online