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 volume to be sampled similarly than the target
  volumetric structure.
  
  Parameters
  ----------
  target_image : nipy volume
      Nipy volume structure onto the grid of which the data will be
      resampled.
  interpolation : None, 'continuous' or 'nearest', optional
      Interpolation type used when calculating values in
      different word spaces. If None, the volume's interpolation
      logic is used.
  
  Returns
  -------
  resampled_image : nipy_image
      New nipy image with the data resampled.
  
  Notes
  -----
  Both the target image and the original image should be
  embedded in the same world space.
docstr_tok: ["Resample","the","volume","to","be","sampled","similarly","than","the","target","volumetric","structure",".","Parameters","--","--","--","--","--","target_image",":","nipy","volume","Nipy","volume","structure","onto","the","grid","of","which","the","data","will","be","resampled",".","interpolation",":","None",",","'continuous","'","or","'nearest","'",",","optional","Interpolation","type","used","when","calculating","values","in","different","word","spaces",".","If","None",",","the","volume","'s","interpolation","logic","is","used",".","Returns","--","--","--","-","resampled_image",":","nipy_image","New","nipy","image","with","the","data","resampled",".","Notes","--","--","-","Both","the","target","image","and","the","original","image","should","be","embedded","in","the","same","world","space","."]
code: def resampled_to_img(self, target_image, interpolation=None):
      """Resample the volume to be sampled similarly than the target
      volumetric structure.
  
      Parameters
      ----------
      target_image : nipy volume
          Nipy volume structure onto the grid of which the data will be
          resampled.
      interpolation : None, 'continuous' or 'nearest', optional
          Interpolation type used when calculating values in
          different word spaces. If None, the volume's interpolation
          logic is used.
  
      Returns
      -------
      resampled_image : nipy_image
          New nipy image with the data resampled.
  
      Notes
      -----
      Both the target image and the original image should be
      embedded in the same world space.
      """
      # IMPORTANT: Polymorphism can be implemented by walking the
      # MRO and finding a method that does not raise
      # NotImplementedError.
      raise NotImplementedError
  
file_path: nipy/nipy/labs/datasets/volumes/volume_field.py
imports: from ..transforms.transform import CompositionError
label_desc: Use image node_id 2 for calling the VolumeField obj's underlying member method code with example usage: obj.resampled_to_img(target_image, interpolation) without return types