MantisBT - ITK
View Issue Details
0008952ITKpublic2009-04-30 11:412009-04-30 11:41
kentwilliams 
kentwilliams 
normalminoralways
closedfixed 
ITK-3-12 
ITK-3-12 
0008952: Image Dimension can be too large for NIfTI and Analyze Image Formats
An end user reported trying to write a 1D NIfTI or Analyze file with a dimension of 45000, and ending up with an invalid image file.
In examining the standard NIfTI/Analyze C++ include files, I determined that the dimensions array has an element type of short. This means that for most (if not all) architectures, the maximum value for any one dimension in NIfTI/Analyze files is 32767.

FIX: As per Bill Lorensen's suggestion, I modified the NIfTI and Analyze ImageIO classes to throw an exception if they encounter a dimension that will not fit in the short type.
No tags attached.
Issue History
2009-04-30 11:41kentwilliamsNew Issue
2009-04-30 11:41kentwilliamsStatusnew => assigned
2009-04-30 11:41kentwilliamsAssigned To => kentwilliams
2009-04-30 11:41kentwilliamsStatusassigned => closed
2009-04-30 11:41kentwilliamsResolutionopen => fixed
2009-04-30 11:41kentwilliamsFixed in Version => ITK-3-12

There are no notes attached to this issue.