class_docstr: Support for tifffile as backend.
  
  Parameters
  ----------
  request : iio.Request
      A request object that represents the users intent. It provides a
      standard interface for a plugin to access the various ImageResources.
      Check the docs for details.
  kwargs : Any
      Additional kwargs are forwarded to tifffile's constructor, i.e.
      to ``TiffFile`` for reading or ``TiffWriter`` for writing.
class_docstr_tok: ["Support","for","tifffile","as","backend",".","Parameters","--","--","--","--","--","request",":","iio.Request","A","request","object","that","represents","the","users","intent",".","It","provides","a","standard","interface","for","a","plugin","to","access","the","various","ImageResources",".","Check","the","docs","for","details",".","kwargs",":","Any","Additional","kwargs","are","forwarded","to","tifffile","'s","constructor",",","i.e",".","to","``","TiffFile","``","for","reading","or","``","TiffWriter","``","for","writing","."]
docstr: Save a ndimage as TIFF.
  
  Parameters
  ----------
  ndimage : ArrayLike
      The ndimage to encode and write to the ImageResource.
  is_batch : bool
      If True, the first dimension of the given ndimage is treated as a
      batch dimension and each element will create a new series.
  kwargs : Any
      Additional kwargs are forwarded to TiffWriter's ``write`` method.
  
  Returns
  -------
  encoded_image : bytes
      If the ImageResource is ``"<bytes>"``, return the encoded bytes.
      Otherwise write returns None.
  
  Notes
  -----
  Incremental writing is supported. Subsequent calls to ``write`` will
  create new series unless ``contiguous=True`` is used, in which case the
  call to write will append to the current series.
docstr_tok: ["Save","a","ndimage","as","TIFF",".","Parameters","--","--","--","--","--","ndimage",":","ArrayLike","The","ndimage","to","encode","and","write","to","the","ImageResource",".","is_batch",":","bool","If","True",",","the","first","dimension","of","the","given","ndimage","is","treated","as","a","batch","dimension","and","each","element","will","create","a","new","series",".","kwargs",":","Any","Additional","kwargs","are","forwarded","to","TiffWriter","'s","``","write","``","method",".","Returns","--","--","--","-","encoded_image",":","bytes","If","the","ImageResource","is","``","``","<","bytes",">","''","``",",","return","the","encoded","bytes",".","Otherwise","write","returns","None",".","Notes","--","--","-","Incremental","writing","is","supported",".","Subsequent","calls","to","``","write","``","will","create","new","series","unless","``","contiguous=True","``","is","used",",","in","which","case","the","call","to","write","will","append","to","the","current","series","."]
code: def write(
      self, ndimage: ArrayLike, *, is_batch: bool = False, **kwargs
  ) -> Optional[bytes]:
      """Save a ndimage as TIFF.
  
      Parameters
      ----------
      ndimage : ArrayLike
          The ndimage to encode and write to the ImageResource.
      is_batch : bool
          If True, the first dimension of the given ndimage is treated as a
          batch dimension and each element will create a new series.
      kwargs : Any
          Additional kwargs are forwarded to TiffWriter's ``write`` method.
  
      Returns
      -------
      encoded_image : bytes
          If the ImageResource is ``"<bytes>"``, return the encoded bytes.
          Otherwise write returns None.
  
      Notes
      -----
      Incremental writing is supported. Subsequent calls to ``write`` will
      create new series unless ``contiguous=True`` is used, in which case the
      call to write will append to the current series.
  
      """
  
      if not is_batch:
          ndimage = np.asarray(ndimage)[None, :]
  
      for image in ndimage:
          self._fh.write(image, **kwargs)
  
      if self._request._uri_type == URI_BYTES:
          self._fh.close()
          file = cast(BytesIO, self._request.get_file())
          return file.getvalue()
  
file_path: imageio/imageio/plugins/tifffile_v3.py
imports: from io import BytesIO
  from typing import Any, Dict, Optional, cast
  import warnings
  import numpy
  import tifffile
  from ..core.request import URI_BYTES, InitializationError, Request
  from ..core.v3_plugin_api import ImageProperties, PluginV3
  from ..typing import ArrayLike
label_desc: Use image node_id 4 for calling the TifffilePlugin obj's underlying member method code with example usage: obj.write(ndimage) and returns: file