pythonniftinibabel

What is difference between get_data and get_fdata in Nibabel library?


I'm working with Nibabel to read some .nii files. I came across different examples and some of them use get_data() function while some of them use get_fdata() function. I could not find what the difference is in their documentation (nibabel manuel). Can anyone explain?

Thanks in advance.


Solution

  • I found in their documentation the function-description.

    Link to the documentation

    get_data(caching='fill')

    Return image data from image with any necessary scaling applied
    

    get_fdata(caching='fill', dtype=)

    Return floating point image data with necessary scaling applied
    

    So to be short... the get_fdata function takes a float as parameter and return a floating point of that image data. Further informations about how they work are in the documentation.