Closed Garyfallidis closed 4 months ago
I assume we're discussing spatial images? Here's the breakdown:
img.dataobj.get_unscaled()
will return a memmap
if the data are uncompressed, and will not apply scalingnp.asanyarray(img.dataobj)
will return a memmap
if the data are uncompressed and there are no scale-factors
img.dataobj[:]
would also work, but is less explicitnp.asanyarray(img.dataobj, target_dtype)
will return a memmap
if the data are uncompressed, with no scaling, in that dtypeimg.get_fdata(dtype=target_dtype)
will return a memmap
if the data are uncompressed, with no scaling, in that dtype
img
object.img.get_fdata()
will return a memmap
if the data are uncompressed, float64, with no scale factorsYes. Spatial images. Thank you for the quick response @effigies.
Hi all,
In the past we could use memory maps with ease directly from Nibabel. My understanding is that this is not any more supported. Is there an alternative approach?