Documentation
¶
Index ¶
- type Slide
- func (s *Slide) Close()
- func (s *Slide) Downsample(level int) (float64, error)
- func (s *Slide) GetAssociatedImageNames() []string
- func (s *Slide) GetBestLevelForDownsample(downsample float64) int
- func (s *Slide) GetProperty(name string) string
- func (s *Slide) GetPropertyNames() []string
- func (s *Slide) LevelCount() int
- func (s *Slide) LevelDimensions(level int) (w, h int64, err error)
- func (s *Slide) LevelToBase(level int, localX, localY int64) (baseX, baseY int64, err error)
- func (s *Slide) ReadAssociatedImage(name string) (*image.RGBA, error)
- func (s *Slide) ReadRegion(x, y int64, level int, w, h int64) (*image.RGBA, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Slide ¶
type Slide struct {
// contains filtered or unexported fields
}
Slide 封装 openslide_t 指针 Slide wraps the openslide_t pointer
func (*Slide) Downsample ¶
Downsample 返回某一层相对 0 层的 downsample 倍数 Downsample returns the downsample factor of a specific level relative to level 0
func (*Slide) GetAssociatedImageNames ¶
GetAssociatedImageNames 获取所有关联图像名称 GetAssociatedImageNames returns all associated image names
func (*Slide) GetBestLevelForDownsample ¶
GetBestLevelForDownsample 返回给定 downsample 倍数下的最佳层级 GetBestLevelForDownsample returns the best level for the given downsample factor
func (*Slide) GetProperty ¶
GetProperty 获取指定的属性值 GetProperty returns the value of a specific property
func (*Slide) GetPropertyNames ¶
GetPropertyNames 获取所有属性名称 GetPropertyNames returns all property names
func (*Slide) LevelCount ¶
LevelCount 返回金字塔层数 LevelCount returns the number of pyramid levels
func (*Slide) LevelDimensions ¶
LevelDimensions 返回某一层的宽高 LevelDimensions returns the dimensions (width, height) of a specific level
func (*Slide) LevelToBase ¶
Helper: 将某一层的局部坐标转换为 level 0 坐标 localX, localY 是某 level 下的左上角坐标 Helper: Converts local coordinates of a level to level 0 coordinates localX, localY are the top-left coordinates at a specific level
func (*Slide) ReadAssociatedImage ¶
ReadAssociatedImage 读取关联图像 ReadAssociatedImage reads an associated image
func (*Slide) ReadRegion ¶
ReadRegion 读取一块区域,返回 image.RGBA x, y 是在 level=0 坐标系中的左上角(注意单位是像素) level 是要读取的金字塔层 w, h 是要读取的宽高(单位:像素,基于当前 level) ReadRegion reads a region and returns image.RGBA x, y are the top-left coordinates in the level 0 coordinate system (unit: pixels) level is the pyramid level to read w, h are the width and height to read (unit: pixels, based on current level)