class_docstr: A class representing data stored in a 3+D array embedded in a 3D
  world.
  
  This object has data stored in an array-like multidimensional
  indexable objects, with the 3 first dimensions corresponding to
  spatial axis and defining a 3D grid that may be non-regular or
  non-rigid.
  
  The object knows how the data is mapped to a 3D "real-world
  space", and how it can change real-world coordinate system. The
  transform mapping it to world is arbitrary, and thus the grid
  can be warped: in the world space, the grid may not be regular or
  orthogonal.
  
  Attributes
  -----------
  
  world_space: string
      World space the data is embedded in. For instance `mni152`.
  
  metadata: dictionary
      Optional, user-defined, dictionary used to carry around
      extra information about the data as it goes through
      transformations. The consistency of this information is not
      maintained as the data is modified.
  
  _data:
      Private pointer to the data.
  
  Notes
  ------
  
  The data is stored in an undefined way: prescalings might need to
  be applied to it before using it, or the data might be loaded on
  demand. The best practice to access the data is not to access the
  _data attribute, but to use the `get_fdata` method.
  
  If the transform associated with the image has no inverse
  mapping, data corresponding to a given world space position cannot
  be calculated. If it has no forward mapping, it is impossible to
  resample another dataset on the same support.
class_docstr_tok: ["A","class","representing","data","stored","in","a","3+D","array","embedded","in","a","3D","world",".","This","object","has","data","stored","in","an","array-like","multidimensional","indexable","objects",",","with","the","3","first","dimensions","corresponding","to","spatial","axis","and","defining","a","3D","grid","that","may","be","non-regular","or","non-rigid",".","The","object","knows","how","the","data","is","mapped","to","a","3D","``","real-world","space","''",",","and","how","it","can","change","real-world","coordinate","system",".","The","transform","mapping","it","to","world","is","arbitrary",",","and","thus","the","grid","can","be","warped",":","in","the","world","space",",","the","grid","may","not","be","regular","or","orthogonal",".","Attributes","--","--","--","--","--","-","world_space",":","string","World","space","the","data","is","embedded","in",".","For","instance","`","mni152","`",".","metadata",":","dictionary","Optional",",","user-defined",",","dictionary","used","to","carry","around","extra","information","about","the","data","as","it","goes","through","transformations",".","The","consistency","of","this","information","is","not","maintained","as","the","data","is","modified",".","_data",":","Private","pointer","to","the","data",".","Notes","--","--","--","The","data","is","stored","in","an","undefined","way",":","prescalings","might","need","to","be","applied","to","it","before","using","it",",","or","the","data","might","be","loaded","on","demand",".","The","best","practice","to","access","the","data","is","not","to","access","the","_data","attribute",",","but","to","use","the","`","get_fdata","`","method",".","If","the","transform","associated","with","the","image","has","no","inverse","mapping",",","data","corresponding","to","a","given","world","space","position","can","not","be","calculated",".","If","it","has","no","forward","mapping",",","it","is","impossible","to","resample","another","dataset","on","the","same","support","."]
code: def like_from_data(self, data):
      return self.__class__(
          data=data,
          transform=copy.copy(self._transform),
          metadata=copy.copy(self.metadata),
          interpolation=self.interpolation,
      )
  
file_path: nipy/nipy/labs/datasets/volumes/volume_grid.py
imports: import copy
  import numpy
  from scipy import ndimage
  from ..transforms.affine_utils import apply_affine, from_matrix_vector
  from .volume_data import VolumeData
label_desc: Use image node_id 4 for calling the VolumeGrid obj's underlying member method code with example usage: obj.like_from_data(data) and returns: self