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 Awaiting Feedback
Priority 5 - Medium
Affected Version Unknown
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users maas
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

04-13-2018 11:58 AM
Lead Code Developer
Hi Dave,

Can you please let us know if this issue is resolved in the latest version of FEBio.

Thanks,

Steve

04-16-2018 03:33 PM
Junior Member
Steve,

Thank you for adding this feature. While it should be straightforward to write a simple plugin to evaluate the image at the integration points and project these values to the nodes for visualization, I tried something different. I compiled a fresh download of the FEWarp plugin and febio_sdk_lnx64_2.7.0.1064, but the FEWarp example problem resulted in a segmentation fault. This is likely related to the plugin instead of the new feature,--it is hard to know for sure--but it is all I have tried so far. I will update the thread when I try something else.

Thanks again,

Dave.

+ Reply