-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am getting NRRDError: 'Size of the data does not equal to the product of all dimensions' #100
Comments
Are you able to post the offending NRRD file? Let's say the size of your data in the header says it is 10x3x6. The product of this means we should have 180 values. This error will be thrown if anything more than or less than 180 values are read. |
The size of the file is [ 2 2362 1945 450] |
Okay, it looks like this file is pretty big. My first guess is that Python is upset because the amount of RAM necessary is > 4GB. If you can, try to shrink the exact file down and attempt it again at < 4 GB. If that works, then my theory is correct. I'm not exactly sure what the fix is yet. What version of Python are you using? |
Using Python 3.7. yeah its big and my laptop ram is 8GB. I just wanted to try to read this data in my own laptop before working in the lab. And if possible, could you please let me know how can I shrink the file ? |
Okay, just wanted to make sure you were using a newer version of Python. There's probably many ways to do it, but the first that comes to mind is to use 3D Slicer to load the file and shrink it. I can't remember what the option is to shrink it, but it's there somewhere. |
Ok .. thanks a ton!!! Will keep u posted if any updates. :) |
I am trying to read data from an NRRD file. The nrrd.read_header() works fine. But when I give nrrd.read() or nrrd.read_data(), I get the above mentioned error. There are no duplicate fields in the header. Kindly help.
The text was updated successfully, but these errors were encountered: