class_docstr: PyVista wrapper for the VTK Camera class.
  
  Parameters
  ----------
  renderer : pyvista.Renderer, optional
      Renderer to attach the camera to.
  
  Examples
  --------
  Create a camera at the pyvista module level.
  
  >>> import pyvista as pv
  >>> camera = pv.Camera()
  
  Access the active camera of a plotter and get the position of the
  camera.
  
  >>> pl = pv.Plotter()
  >>> pl.camera.position
  (1.0, 1.0, 1.0)
class_docstr_tok: ["PyVista","wrapper","for","the","VTK","Camera","class",".","Parameters","--","--","--","--","--","renderer",":","pyvista.Renderer",",","optional","Renderer","to","attach","the","camera","to",".","Examples","--","--","--","--","Create","a","camera","at","the","pyvista","module","level",".",">",">",">","import","pyvista","as","pv",">",">",">","camera","=","pv.Camera","(",")","Access","the","active","camera","of","a","plotter","and","get","the","position","of","the","camera",".",">",">",">","pl","=","pv.Plotter","(",")",">",">",">","pl.camera.position","(","1.0",",","1.0",",","1.0",")"]
docstr: Load a Paraview camera file (.pvcc extension).
  
  Returns a pyvista.Camera object for which attributes has been read
  from the filename argument.
  
  Parameters
  ----------
  filename : str or pathlib.Path
      Path to Paraview camera file (.pvcc).
  
  Returns
  -------
  pyvista.Camera
      Camera from the camera file.
  
  Examples
  --------
  >>> import pyvista as pv
  >>> pl = pv.Plotter()
  >>> pl.camera = pv.Camera.from_paraview_pvcc(
  ...     "camera.pvcc"
  ... )  # doctest:+SKIP
  >>> pl.camera.position
  (1.0, 1.0, 1.0)
code: def from_paraview_pvcc(cls, filename: Union[str, Path]) -> Camera:
      """Load a Paraview camera file (.pvcc extension).
  
      Returns a pyvista.Camera object for which attributes has been read
      from the filename argument.
  
      Parameters
      ----------
      filename : str or pathlib.Path
          Path to Paraview camera file (.pvcc).
  
      Returns
      -------
      pyvista.Camera
          Camera from the camera file.
  
      Examples
      --------
      >>> import pyvista as pv
      >>> pl = pv.Plotter()
      >>> pl.camera = pv.Camera.from_paraview_pvcc(
      ...     "camera.pvcc"
      ... )  # doctest:+SKIP
      >>> pl.camera.position
      (1.0, 1.0, 1.0)
      """
      to_find = {
          "CameraPosition": ("position", float),
          "CameraFocalPoint": ("focal_point", float),
          "CameraViewAngle": ("view_angle", float),
          "CameraViewUp": ("up", float),
          "CameraParallelProjection": ("parallel_projection", int),
          "CameraParallelScale": ("parallel_scale", float),
      }
      camera = cls()
  
      tree = ElementTree.parse(filename)
      root = tree.getroot()[0]
      for element in root:
          attrib = element.attrib
          attrib_name = attrib["name"]
  
          if attrib_name in to_find:
              name, typ = to_find[attrib_name]
              nelems = int(attrib["number_of_elements"])
  
              # Set the camera attributes
              if nelems == 3:
                  values = [typ(e.attrib["value"]) for e in element]
                  setattr(camera, name, values)
              elif nelems == 1:
                  # Special case for bool since bool("0") returns True.
                  # So first convert to int from `to_find` and then apply bool
                  if (
                      "name" in element[-1].attrib
                      and element[-1].attrib["name"] == "bool"
                  ):
                      val = bool(typ(element[0].attrib["value"]))
                  else:
                      val = typ(element[0].attrib["value"])
                  setattr(camera, name, val)
  
      camera.is_set = True
      return camera
  
imports: from __future__ import annotations
  from pathlib import Path
  from typing import Union
  from weakref import proxy
  import xml.dom.minidom
  from xml.etree import ElementTree
  import numpy
  import pyvista
  from .None import _vtk
  from .helpers import view_vectors
label_desc: Use image node_id 7 for calling the Camera obj's underlying member method code with example usage: obj.from_paraview_pvcc(cls, filename) and returns: camera