class_docstr: Template class for images that have dataobj data stores
class_docstr_tok: ["Template","class","for","images","that","have","dataobj","data","stores"]
docstr: Class method to create image from mapping in ``file_map``
  
  Parameters
  ----------
  file_map : dict
      Mapping with (kay, value) pairs of (``file_type``, FileHolder
      instance giving file-likes for each file needed for this image
      type.
  mmap : {True, False, 'c', 'r'}, optional, keyword only
      `mmap` controls the use of numpy memory mapping for reading image
      array data.  If False, do not try numpy ``memmap`` for data array.
      If one of {'c', 'r'}, try numpy memmap with ``mode=mmap``.  A
      `mmap` value of True gives the same behavior as ``mmap='c'``.  If
      image data file cannot be memory-mapped, ignore `mmap` value and
      read array from file.
  keep_file_open : { None, True, False }, optional, keyword only
      `keep_file_open` controls whether a new file handle is created
      every time the image is accessed, or a single file handle is
      created and used for the lifetime of this ``ArrayProxy``. If
      ``True``, a single file handle is created and used. If ``False``,
      a new file handle is created every time the image is accessed.
      If ``file_map`` refers to an open file handle, this setting has no
      effect. The default value (``None``) will result in the value of
      ``nibabel.arrayproxy.KEEP_FILE_OPEN_DEFAULT`` being used.
  
  Returns
  -------
  img : DataobjImage instance
docstr_tok: ["Class","method","to","create","image","from","mapping","in","``","file_map","``","Parameters","--","--","--","--","--","file_map",":","dict","Mapping","with","(","kay",",","value",")","pairs","of","(","``","file_type","``",",","FileHolder","instance","giving","file-likes","for","each","file","needed","for","this","image","type",".","mmap",":","{","True",",","False",",","'","c","'",",","'","r","'","}",",","optional",",","keyword","only","`","mmap","`","controls","the","use","of","numpy","memory","mapping","for","reading","image","array","data",".","If","False",",","do","not","try","numpy","``","memmap","``","for","data","array",".","If","one","of","{","'","c","'",",","'","r","'","}",",","try","numpy","memmap","with","``","mode=mmap","``",".","A","`","mmap","`","value","of","True","gives","the","same","behavior","as","``","mmap=","'","c","'","``",".","If","image","data","file","can","not","be","memory-mapped",",","ignore","`","mmap","`","value","and","read","array","from","file",".","keep_file_open",":","{","None",",","True",",","False","}",",","optional",",","keyword","only","`","keep_file_open","`","controls","whether","a","new","file","handle","is","created","every","time","the","image","is","accessed",",","or","a","single","file","handle","is","created","and","used","for","the","lifetime","of","this","``","ArrayProxy","``",".","If","``","True","``",",","a","single","file","handle","is","created","and","used",".","If","``","False","``",",","a","new","file","handle","is","created","every","time","the","image","is","accessed",".","If","``","file_map","``","refers","to","an","open","file","handle",",","this","setting","has","no","effect",".","The","default","value","(","``","None","``",")","will","result","in","the","value","of","``","nibabel.arrayproxy.KEEP_FILE_OPEN_DEFAULT","``","being","used",".","Returns","--","--","--","-","img",":","DataobjImage","instance"]
code: def from_file_map(
      klass: type[ArrayImgT],
      file_map: FileMap,
      *,
      mmap: bool | ty.Literal["c", "r"] = True,
      keep_file_open: bool | None = None,
  ) -> ArrayImgT:
      """Class method to create image from mapping in ``file_map``
  
      Parameters
      ----------
      file_map : dict
          Mapping with (kay, value) pairs of (``file_type``, FileHolder
          instance giving file-likes for each file needed for this image
          type.
      mmap : {True, False, 'c', 'r'}, optional, keyword only
          `mmap` controls the use of numpy memory mapping for reading image
          array data.  If False, do not try numpy ``memmap`` for data array.
          If one of {'c', 'r'}, try numpy memmap with ``mode=mmap``.  A
          `mmap` value of True gives the same behavior as ``mmap='c'``.  If
          image data file cannot be memory-mapped, ignore `mmap` value and
          read array from file.
      keep_file_open : { None, True, False }, optional, keyword only
          `keep_file_open` controls whether a new file handle is created
          every time the image is accessed, or a single file handle is
          created and used for the lifetime of this ``ArrayProxy``. If
          ``True``, a single file handle is created and used. If ``False``,
          a new file handle is created every time the image is accessed.
          If ``file_map`` refers to an open file handle, this setting has no
          effect. The default value (``None``) will result in the value of
          ``nibabel.arrayproxy.KEEP_FILE_OPEN_DEFAULT`` being used.
  
      Returns
      -------
      img : DataobjImage instance
      """
      raise NotImplementedError
  
file_path: nibabel/nibabel/dataobj_images.py
imports: from __future__ import annotations
  import typing
  import numpy
  from .arrayproxy import ArrayLike
  from .deprecated import deprecate_with_version
  from .filebasedimages import FileBasedHeader, FileBasedImage
  from .fileholders import FileMap
label_desc: Use image node_id 9 for calling the DataobjImage obj's underlying member method code with example usage: obj.from_file_map(klass, file_map) without return types