<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hello,<br><br>The following code using pynifti gives me an error (ValueError: dimensions too large):<br><i>from nifti import *<br>from numpy import *<br>mynifti = NiftiImage('T1noise3bias0.nii')<br>myarray = mynifti.getDataArray()<br></i><br>This is very strange because the number of voxels is low:<br><i>In [11]: mynifti.nvox<br>Out[11]: 7109137<br>In [12]: mynifti.extent<br>Out[12]: (181, 217, 181)</i><br><br>Other information:<br>I am running Ubuntu 8.10, with the standard packages for python, numpy and scipy installed. I tried the above on ipython and python. Python just segfaults. I get the same error if I use getDataArray()<br><br>Here is the full output:<br><BEGIN of output><br>ERROR: An unexpected error occurred while tokenizing input<br>The following traceback may be corrupted or invalid<br>The error message is: ('EOF in multi-line statement', (60, 0))<br><br>---------------------------------------------------------------------------<br>ValueError Traceback (most recent call last)<br><br>/home/dow178/extDownload/lib/VTKbuild/<ipython console> in <module>()<br><br>/var/lib/python-support/python2.5/nifti/niftiimage.pyc in asarray(self, copy)<br> 217 """<br> 218 # make sure data is accessible<br>--> 219 self.load()<br> 220 <br> 221 if copy:<br><br>/var/lib/python-support/python2.5/nifti/niftiimage.pyc in load(self)<br> 174 raise RuntimeError, "Unable to load image data."<br> 175 <br>--> 176 self._data = nifticlib.wrapImageDataWithArray(self.raw_nimg)<br> 177 <br> 178 <br><br>ValueError: dimensions too large.<br><br> <END of Output><br><br>Does anyone know why this is occuring?<br><br>I tried installing the libnifti-dev package and searching for the wrapImageDataWithArray function to glean some information - but it doesn't live there. Any ideas where the c++ source code for wrapImageDataWithArray is?<br><br>Many thanks in advance,<br>Nick<br><br><br><br><br><br /><hr />Windows Live Messenger: Celebrate 10 amazing years with free winks and emoticons. <a href='http://clk.atdmt.com/UKM/go/157562755/direct/01/' target='_new'>Get Them Now</a></body>
</html>