class_docstr: An internal class to manage filters/algorithms for uniform grid datasets.
class_docstr_tok: ["An","internal","class","to","manage","filters\/algorithms","for","uniform","grid","datasets","."]
docstr: Select piece (e.g., volume of interest).
  
  To use this filter set the VOI ivar which are i-j-k min/max indices
  that specify a rectangular region in the data. (Note that these are
  0-offset.) You can also specify a sampling rate to subsample the
  data.
  
  Typical applications of this filter are to extract a slice from a
  volume for image processing, subsampling large volumes to reduce data
  size, or extracting regions of a volume with interesting data.
  
  Parameters
  ----------
  voi : sequence[int]
      Length 6 iterable of ints: ``(xmin, xmax, ymin, ymax, zmin, zmax)``.
      These bounds specify the volume of interest in i-j-k min/max
      indices.
  
  rate : sequence[int], default: (1, 1, 1)
      Length 3 iterable of ints: ``(xrate, yrate, zrate)``.
  
  boundary : bool, default: False
      Control whether to enforce that the "boundary" of the grid
      is output in the subsampling process. This only has effect
      when the rate in any direction is not equal to 1. When
      this is enabled, the subsampling will always include the
      boundary of the grid even though the sample rate is not an
      even multiple of the grid dimensions. By default this is
      disabled.
  
  progress_bar : bool, default: False
      Display a progress bar to indicate progress.
  
  Returns
  -------
  pyvista.ImageData
      ImageData subset.
docstr_tok: ["Select","piece","(","e.g.",",","volume","of","interest",")",".","To","use","this","filter","set","the","VOI","ivar","which","are","i-j-k","min\/max","indices","that","specify","a","rectangular","region","in","the","data",".","(","Note","that","these","are","0-offset",".",")","You","can","also","specify","a","sampling","rate","to","subsample","the","data",".","Typical","applications","of","this","filter","are","to","extract","a","slice","from","a","volume","for","image","processing",",","subsampling","large","volumes","to","reduce","data","size",",","or","extracting","regions","of","a","volume","with","interesting","data",".","Parameters","--","--","--","--","--","voi",":","sequence","[","int","]","Length","6","iterable","of","ints",":","``","(","xmin",",","xmax",",","ymin",",","ymax",",","zmin",",","zmax",")","``",".","These","bounds","specify","the","volume","of","interest","in","i-j-k","min\/max","indices",".","rate",":","sequence","[","int","]",",","default",":","(","1",",","1",",","1",")","Length","3","iterable","of","ints",":","``","(","xrate",",","yrate",",","zrate",")","``",".","boundary",":","bool",",","default",":","False","Control","whether","to","enforce","that","the","``","boundary","''","of","the","grid","is","output","in","the","subsampling","process",".","This","only","has","effect","when","the","rate","in","any","direction","is","not","equal","to","1",".","When","this","is","enabled",",","the","subsampling","will","always","include","the","boundary","of","the","grid","even","though","the","sample","rate","is","not","an","even","multiple","of","the","grid","dimensions",".","By","default","this","is","disabled",".","progress_bar",":","bool",",","default",":","False","Display","a","progress","bar","to","indicate","progress",".","Returns","--","--","--","-","pyvista.ImageData","ImageData","subset","."]
code: def extract_subset(
      self, voi, rate=(1, 1, 1), boundary=False, progress_bar=False
  ):
      """Select piece (e.g., volume of interest).
  
      To use this filter set the VOI ivar which are i-j-k min/max indices
      that specify a rectangular region in the data. (Note that these are
      0-offset.) You can also specify a sampling rate to subsample the
      data.
  
      Typical applications of this filter are to extract a slice from a
      volume for image processing, subsampling large volumes to reduce data
      size, or extracting regions of a volume with interesting data.
  
      Parameters
      ----------
      voi : sequence[int]
          Length 6 iterable of ints: ``(xmin, xmax, ymin, ymax, zmin, zmax)``.
          These bounds specify the volume of interest in i-j-k min/max
          indices.
  
      rate : sequence[int], default: (1, 1, 1)
          Length 3 iterable of ints: ``(xrate, yrate, zrate)``.
  
      boundary : bool, default: False
          Control whether to enforce that the "boundary" of the grid
          is output in the subsampling process. This only has effect
          when the rate in any direction is not equal to 1. When
          this is enabled, the subsampling will always include the
          boundary of the grid even though the sample rate is not an
          even multiple of the grid dimensions. By default this is
          disabled.
  
      progress_bar : bool, default: False
          Display a progress bar to indicate progress.
  
      Returns
      -------
      pyvista.ImageData
          ImageData subset.
      """
      alg = _vtk.vtkExtractVOI()
      alg.SetVOI(voi)
      alg.SetInputDataObject(self)
      alg.SetSampleRate(rate)
      alg.SetIncludeBoundary(boundary)
      _update_alg(alg, progress_bar, "Extracting Subset")
      result = _get_output(alg)
      # Adjust for the confusing issue with the extents
      #   see https://gitlab.kitware.com/vtk/vtk/-/issues/17938
      fixed = pyvista.ImageData()
      fixed.origin = result.bounds[::2]
      fixed.spacing = result.spacing
      fixed.dimensions = result.dimensions
      fixed.point_data.update(result.point_data)
      fixed.cell_data.update(result.cell_data)
      fixed.field_data.update(result.field_data)
      fixed.copy_meta_from(result, deep=True)
      return fixed
  
imports: import collections.abc
  from typing import Literal, Optional, cast
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from pyvista.core.errors import AmbiguousDataError, MissingDataError
  from pyvista.core.filters import _get_output, _update_alg
  from pyvista.core.filters.data_set import DataSetFilters
  from pyvista.core.utilities.arrays import FieldAssociation, set_default_active_scalars
  from pyvista.core.utilities.helpers import wrap
  from pyvista.core.utilities.misc import abstract_class
label_desc: Use image node_id 3 for calling the ImageDataFilters obj's underlying member method code with example usage: obj.extract_subset(voi, rate, boundary, progress_bar) and returns: fixed