docstr: 在EISeg中用于处理遥感栅格数据的类.
  
  参数:
      tif_path (str): GTiff数据的路径.
      show_band (Union[List[int], Tuple[int]], optional): 用于RGB合成显示的波段. 默认为 [1, 1, 1].
      open_grid (bool, optional): 是否打开了宫格切片功能. 默认为 False.
      grid_size (Union[List[int], Tuple[int]], optional): 切片大小. 默认为 [512, 512].
      overlap (Union[List[int], Tuple[int]], optional): 重叠区域的大小. 默认为 [24, 24].
docstr_tok: ["\u5728EISeg\u4e2d\u7528\u4e8e\u5904\u7406\u9065\u611f\u6805\u683c\u6570\u636e\u7684\u7c7b",".","\u53c2\u6570",":","tif_path","(","str",")",":","GTiff\u6570\u636e\u7684\u8def\u5f84",".","show_band","(","Union","[","List","[","int","]",",","Tuple","[","int","]","]",",","optional",")",":","\u7528\u4e8eRGB\u5408\u6210\u663e\u793a\u7684\u6ce2\u6bb5",".","\u9ed8\u8ba4\u4e3a","[","1",",","1",",","1","]",".","open_grid","(","bool",",","optional",")",":","\u662f\u5426\u6253\u5f00\u4e86\u5bab\u683c\u5207\u7247\u529f\u80fd",".","\u9ed8\u8ba4\u4e3a","False",".","grid_size","(","Union","[","List","[","int","]",",","Tuple","[","int","]","]",",","optional",")",":","\u5207\u7247\u5927\u5c0f",".","\u9ed8\u8ba4\u4e3a","[","512",",","512","]",".","overlap","(","Union","[","List","[","int","]",",","Tuple","[","int","]","]",",","optional",")",":","\u91cd\u53e0\u533a\u57df\u7684\u5927\u5c0f",".","\u9ed8\u8ba4\u4e3a","[","24",",","24","]","."]
code: def __init__(
      self,
      tif_path: str,
      show_band: Union[List[int], Tuple[int]] = [1, 1, 1],
      open_grid: bool = False,
      grid_size: Union[List[int], Tuple[int]] = [512, 512],
      overlap: Union[List[int], Tuple[int]] = [24, 24],
  ) -> None:
      """在EISeg中用于处理遥感栅格数据的类.
  
      参数:
          tif_path (str): GTiff数据的路径.
          show_band (Union[List[int], Tuple[int]], optional): 用于RGB合成显示的波段. 默认为 [1, 1, 1].
          open_grid (bool, optional): 是否打开了宫格切片功能. 默认为 False.
          grid_size (Union[List[int], Tuple[int]], optional): 切片大小. 默认为 [512, 512].
          overlap (Union[List[int], Tuple[int]], optional): 重叠区域的大小. 默认为 [24, 24].
      """
      super(Raster, self).__init__()
      if IMPORT_STATE is False:
          raise ("Can't import rasterio!")
      if osp.exists(tif_path):
          self.src_data = rasterio.open(tif_path)
          self.geoinfo = self.__getRasterInfo()
          self.show_band = list(show_band)
          self.grid_size = np.array(grid_size)
          self.overlap = np.array(overlap)
          self.open_grid = open_grid
      else:
          raise ("{0} not exists!".format(tif_path))
      self.thumbnail_min = 2000
  
imports: import os.path
  import numpy
  import cv2
  import math
  from typing import List, Dict, Tuple, Union
  from collections import defaultdict
  from easydict import EasyDict
  from .imgtools import sample_norm, two_percentLinear, get_thumbnail
label_desc: Use image node_id 1 to create a new Raster object  with example: obj = Raster(tif_path, show_band, open_grid, grid_size, overlap)