class_docstr: A regularly-spaced image for embedding data in an x, y, z 3D
  world, for neuroimaging.
  
  This object is an ndarray representing a volume, with the first 3
  dimensions being spatial, and mapped to a named world space using
  an affine (4x4 matrix).
  
  Attributes
  ----------
  
  affine : 4x4 ndarray
      Affine mapping from indices to world coordinates.
  world_space : string
      Name of the 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 may not
      be maintained as the data is modified.
  interpolation : 'continuous' or 'nearest'
      String giving the interpolation logic used when calculating
      values in different world spaces
  _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.
class_docstr_tok: ["A","regularly-spaced","image","for","embedding","data","in","an","x",",","y",",","z","3D","world",",","for","neuroimaging",".","This","object","is","an","ndarray","representing","a","volume",",","with","the","first","3","dimensions","being","spatial",",","and","mapped","to","a","named","world","space","using","an","affine","(","4x4","matrix",")",".","Attributes","--","--","--","--","--","affine",":","4x4","ndarray","Affine","mapping","from","indices","to","world","coordinates",".","world_space",":","string","Name","of","the","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","may","not","be","maintained","as","the","data","is","modified",".","interpolation",":","'continuous","'","or","'nearest'","String","giving","the","interpolation","logic","used","when","calculating","values","in","different","world","spaces","_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","."]
code: def get_transform(self):
      return AffineTransform(
          "voxel_space", self.world_space, self.affine
      )
  
imports: import copy
  import numpy
  from scipy import ndimage
  from ..transforms.affine_transform import AffineTransform
  from ..transforms.affine_utils import from_matrix_vector, get_bounds, to_matrix_vector
  from ..transforms.transform import CompositionError
  from .volume_grid import VolumeGrid
label_desc: Use image node_id 3 for calling the VolumeImg obj's underlying member method code with example usage: obj.get_transform() and returns: AffineTransform