class_docstr: Load image file or files from provided path based on reader.
  If reader is not specified, this class automatically chooses readers
  based on the supported suffixes and in the following order:
  
      - User-specified reader at runtime when calling this loader.
      - User-specified reader in the constructor of `LoadImage`.
      - Readers from the last to the first in the registered list.
      - Current default readers: (nii, nii.gz -> NibabelReader), (png, jpg, bmp -> PILReader),
        (npz, npy -> NumpyReader), (nrrd -> NrrdReader), (DICOM file -> ITKReader).
  
  Please note that for png, jpg, bmp, and other 2D formats, readers by default swap axis 0 and 1 after
  loading the array with ``reverse_indexing`` set to ``True`` because the spatial axes definition
  for non-medical specific file formats is different from other common medical packages.
  
  See also:
  
      - tutorial: https://github.com/Project-MONAI/tutorials/blob/master/modules/load_medical_images.ipynb
class_docstr_tok: ["Load","image","file","or","files","from","provided","path","based","on","reader",".","If","reader","is","not","specified",",","this","class","automatically","chooses","readers","based","on","the","supported","suffixes","and","in","the","following","order",":","-","User-specified","reader","at","runtime","when","calling","this","loader",".","-","User-specified","reader","in","the","constructor","of","`","LoadImage","`",".","-","Readers","from","the","last","to","the","first","in","the","registered","list",".","-","Current","default","readers",":","(","nii",",","nii.gz","-",">","NibabelReader",")",",","(","png",",","jpg",",","bmp","-",">","PILReader",")",",","(","npz",",","npy","-",">","NumpyReader",")",",","(","nrrd","-",">","NrrdReader",")",",","(","DICOM","file","-",">","ITKReader",")",".","Please","note","that","for","png",",","jpg",",","bmp",",","and","other","2D","formats",",","readers","by","default","swap","axis","0","and","1","after","loading","the","array","with","``","reverse_indexing","``","set","to","``","True","``","because","the","spatial","axes","definition","for","non-medical","specific","file","formats","is","different","from","other","common","medical","packages",".","See","also",":","-","tutorial",":","https",":","\/\/github.com\/Project-MONAI\/tutorials\/blob\/master\/modules\/load_medical_images.ipynb"]
docstr: Register image reader to load image file and metadata.
  
  Args:
      reader: reader instance to be registered with this loader.
docstr_tok: ["Register","image","reader","to","load","image","file","and","metadata",".","Args",":","reader",":","reader","instance","to","be","registered","with","this","loader","."]
code: def register(self, reader: ImageReader):
      """
      Register image reader to load image file and metadata.
  
      Args:
          reader: reader instance to be registered with this loader.
  
      """
      if not isinstance(reader, ImageReader):
          warnings.warn(
              f"Preferably the reader should inherit ImageReader, but got {type(reader)}."
          )
      self.readers.append(reader)
  
imports: from __future__ import annotations
  import inspect
  import logging
  import sys
  import traceback
  import warnings
  from collections.abc import Sequence
  from pathlib import Path
  from pydoc import locate
  from typing import Callable
  import numpy
  import torch
  from monai.config import DtypeLike, NdarrayOrTensor, PathLike
  from monai.data import image_writer
  from monai.data.folder_layout import FolderLayout, FolderLayoutBase, default_name_formatter
  from monai.data.image_reader import ImageReader, ITKReader, NibabelReader, NrrdReader, NumpyReader, PILReader, PydicomReader
  from monai.data.meta_tensor import MetaTensor
  from monai.data.utils import is_no_channel
  from monai.transforms.transform import Transform
  from monai.transforms.utility.array import EnsureChannelFirst
  from monai.utils import GridSamplePadMode
  from monai.utils import ImageMetaKey
  from monai.utils import OptionalImportError, convert_to_dst_type, ensure_tuple, look_up_option, optional_import
label_desc: Use image node_id 2 for calling the LoadImage obj's underlying member method code with example usage: obj.register(reader) without return types