NiBabel

Access a cacophony of neuro-imaging file formats

Previous topic

nibabel.volumeutils.Recoder

Next topic

nibabel.arrayproxy.ArrayProxy

Reggie -- the one

nibabel.arrayproxyΒΆ

Array proxy base class

The API is - at minimum:

  • The object has an attribute shape
  • that the object returns the data array from np.asarray(obj)
  • that modifying no object outside obj will affect the result of np.asarray(obj). Specifically, if you pass a header into the the __init__, then modifying the original header will not affect the result of the array return.

You might also want to implement state_stamper

digraph inheritance6715031bb4 { rankdir=LR; ratio=compress; fontsize=14; size="6.0, 8.0"; "ArrayProxy" [shape=ellipse,URL="nibabel.arrayproxy.ArrayProxy.html#nibabel.arrayproxy.ArrayProxy",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; }

Classes

ArrayProxy(file_like, header) The array proxy allows us to freeze the passed fileobj and header such that it returns the expected data array.