class_docstr: The base volumetric structure.
  
  This object represents numerical values embedded in a
  3-dimensional world space (called a field in physics and
  engineering)
  
  This is an abstract base class: it defines the interface, but not
  the logics.
  
  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.
docstr: Resample the image to be an image with the data points lying
  on a regular grid with an affine mapping to the word space (a
  nipy VolumeImg).
  
  Parameters
  ----------
  affine: 4x4 or 3x3 ndarray, optional
      Affine of the new voxel grid or transform object pointing
      to the new voxel coordinate grid. If a 3x3 ndarray is given,
      it is considered to be the rotation part of the affine,
      and the best possible bounding box is calculated,
      in this case, the shape argument is not used. If None
      is given, a default affine is provided by the image.
  shape: (n_x, n_y, n_z), tuple of integers, optional
      The shape of the grid used for sampling, if None
      is given, a default affine is provided by the image.
  interpolation : None, 'continuous' or 'nearest', optional
      Interpolation type used when calculating values in
      different word spaces. If None, the image's interpolation
      logic is used.
  
  Returns
  -------
  resampled_image : nipy VolumeImg
      New nipy VolumeImg with the data sampled on the grid
      defined by the affine and shape.
  
  Notes
  -----
  The coordinate system of the image is not changed: the
  returned image points to the same world space.
docstr_tok: ["Resample","the","image","to","be","an","image","with","the","data","points","lying","on","a","regular","grid","with","an","affine","mapping","to","the","word","space","(","a","nipy","VolumeImg",")",".","Parameters","--","--","--","--","--","affine",":","4x4","or","3x3","ndarray",",","optional","Affine","of","the","new","voxel","grid","or","transform","object","pointing","to","the","new","voxel","coordinate","grid",".","If","a","3x3","ndarray","is","given",",","it","is","considered","to","be","the","rotation","part","of","the","affine",",","and","the","best","possible","bounding","box","is","calculated",",","in","this","case",",","the","shape","argument","is","not","used",".","If","None","is","given",",","a","default","affine","is","provided","by","the","image",".","shape",":","(","n_x",",","n_y",",","n_z",")",",","tuple","of","integers",",","optional","The","shape","of","the","grid","used","for","sampling",",","if","None","is","given",",","a","default","affine","is","provided","by","the","image",".","interpolation",":","None",",","'continuous","'","or","'nearest","'",",","optional","Interpolation","type","used","when","calculating","values","in","different","word","spaces",".","If","None",",","the","image","'s","interpolation","logic","is","used",".","Returns","--","--","--","-","resampled_image",":","nipy","VolumeImg","New","nipy","VolumeImg","with","the","data","sampled","on","the","grid","defined","by","the","affine","and","shape",".","Notes","--","--","-","The","coordinate","system","of","the","image","is","not","changed",":","the","returned","image","points","to","the","same","world","space","."]
code: def as_volume_img(
      self, affine=None, shape=None, interpolation=None, copy=True
  ):
      """Resample the image to be an image with the data points lying
      on a regular grid with an affine mapping to the word space (a
      nipy VolumeImg).
  
      Parameters
      ----------
      affine: 4x4 or 3x3 ndarray, optional
          Affine of the new voxel grid or transform object pointing
          to the new voxel coordinate grid. If a 3x3 ndarray is given,
          it is considered to be the rotation part of the affine,
          and the best possible bounding box is calculated,
          in this case, the shape argument is not used. If None
          is given, a default affine is provided by the image.
      shape: (n_x, n_y, n_z), tuple of integers, optional
          The shape of the grid used for sampling, if None
          is given, a default affine is provided by the image.
      interpolation : None, 'continuous' or 'nearest', optional
          Interpolation type used when calculating values in
          different word spaces. If None, the image's interpolation
          logic is used.
  
      Returns
      -------
      resampled_image : nipy VolumeImg
          New nipy VolumeImg with the data sampled on the grid
          defined by the affine and shape.
  
      Notes
      -----
      The coordinate system of the image is not changed: the
      returned image points to the same world space.
      """
      raise NotImplementedError
  
file_path: nipy/nipy/labs/datasets/volumes/volume_field.py
imports: from ..transforms.transform import CompositionError
label_desc: Use image node_id 3 for calling the VolumeField obj's underlying member method code with example usage: obj.as_volume_img(affine, shape, interpolation, copy) without return types