<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Dear all,<br><br>I am getting an error when trying to read CTF-V2 formatted<br>MRI data using the read_fcdc_mri function.<br><br>??? Error using ==> reshape<br>To RESHAPE the number of elements must not change.<br><br><u>Error in ==> fieldtrip-20081208/private/read_ctf_mri at 113</u><br>mri = reshape(mri, [256 256 256]);<br><br><u>Error in ==> read_fcdc_mri at 95</u><br> [img,hdr] = read_ctf_mri(filename);<br><br><u>Error in ==> warpMRI_DEV at 18</u><br> mri = read_fcdc_mri([path2files,mrifiles(sujIt).name]);<br><br>The error results because at line 105 of the read_fcfc_mri.m function<br><br>mri = unint16(fread(fid,256*256*256,'uint16'));<br><br>returns a vector of length = 16777215 when in fact it should be of<br>lentgh = 16777216. This means that 1 single value is missing.<br><br>The ackward thing is that I can open the MR-file without problem<br>in the MRIViewer and that there it appears to have 256 values<br>in the x,y and z dimension. Also this error appears only in <br>a subset of files. <br><br>I suspect that there is an error somewhere maybe in the data<br>acquisition or conversion pipeline.<br>Any suggestions or help would be highly appreciated.<br><br>Have a nice day!<br><br>Fred<br><br><br>-- <br>Frédéric Roux, PhD student<br>Department of Neurophysiology<br>Max Planck Institute for Brain Research<br>D-60529 Frankfurt am Main<br>Frederic.Roux@brain.mpg.de<br>+49(0)69630183225<br><br><br> </div></body>
</html>