Image Class: limited byte size
issueid=729 11-12-2015 01:19 PM
Junior Member
Image Class: limited byte size
Image Class: Protected Attribute "float m_pf" is limited to 1 byte (instead of 4)

The header FECore/Image.h defines the attribute 'm_pf' as a float. However, only single-byte images are correctly loaded resulting poor dynamic range on image intensities.

My guess is that the 'load' method may be specifying reading of a single byte at the time, hence image intensity values (0-1) would be restricted to 1/256 increments. Although this issue could be circumvented creating a wrapper function, it would be better to simply increase the number of bytes read when loading the files to 4.

Thanks!
Issue Details
Issue Number 729
Project FEBio
Category Unknown
Status Confirmed
Priority 5 - Medium
Affected Version Unknown
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




11-16-2015 12:59 PM
Lead Code Developer
Hi Dave,

I will add support for other image formats to the load function. I'll probably add a parameter that allows users to specify the image resolution. I'll try to have this done by the next release (2.5). If sounds like you may have a workaround for now, but if not let us know and we'll figure out a temporary solution.

Cheers,

Steve

11-17-2015 01:17 PM
Junior Member
Great, thanks!

01-18-2018 10:29 AM
Junior Member
Quote Originally Posted by maas
Hi Dave,

I will add support for other image formats to the load function. I'll probably add a parameter that allows users to specify the image resolution. I'll try to have this done by the next release (2.5). If sounds like you may have a workaround for now, but if not let us know and we'll figure out a temporary solution.

Cheers,

Steve
Hi,

I'd like to follow up with this issue--can we now import images with more than 256 shades of gray per pixel?

Thanks,

Dave G.

01-19-2018 12:49 PM
Lead Code Developer
Hi Dave,

I'm afraid I haven't gotten around to this. We are about to release a new version of FEBio (version 2.7) and I'd be happy to look into adding this feature before the release. Can you please contact me via email? It would be helpful if you can send me some example image data.

Thanks,

Steve

+ Reply