openslide

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2022 License: LGPL-2.1 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PropBackgroundColor = "openslide.background-color"

PropBackgroundColor The name of the property containing a slide's background color, if any. It is represented as an RGB hex triplet.

View Source
const PropBoundsHeight = "openslide.bounds-height"

PropBoundsHeight The name of the property containing the height of the rectangle bounding the non-empty region of the slide, if available.

View Source
const PropBoundsWidth = "openslide.bounds-width"

PropBoundsWidth The name of the property containing the width of the rectangle bounding the non-empty region of the slide, if available.

View Source
const PropBoundsX = "openslide.bounds-x"

PropBoundsX The name of the property containing the X coordinate of the rectangle bounding the non-empty region of the slide, if available.

View Source
const PropBoundsY = "openslide.bounds-y"

PropBoundsY The name of the property containing the Y coordinate of the rectangle bounding the non-empty region of the slide, if available.

View Source
const PropMPPX = "openslide.mpp-x"

PropMPPX The name of the property containing the number of microns per pixel in the X dimension of level 0, if known.

View Source
const PropMPPY = "openslide.mpp-y"

PropMPPY The name of the property containing the number of microns per pixel in the Y dimension of level 0, if known.

View Source
const PropObjectivePower = "openslide.objective-power"

PropObjectivePower The name of the property containing a slide's objective power, if known.

Variables

This section is empty.

Functions

func DetectVendor

func DetectVendor(filename string) (string, error)

DetectVendor Quickly determine whether a whole slide image is recognized.

func Version

func Version() string

Version Get the current version of OpenSlide as a string

Types

type Slide

type Slide struct {
	// contains filtered or unexported fields
}

Slide struct holding the OpenSlide pointer.

func Open

func Open(filename string) (Slide, error)

Open Get the Slide object referring to an OpenSlide image. Do not forget to defer opening the slide. This is an expensive operation, you will want to cache the result.

func (Slide) AssociatedImageDimensions added in v0.0.2

func (slide Slide) AssociatedImageDimensions() map[string][2]int

AssociatedImageDimensions Get the dimensions of the associated images

func (Slide) AssociatedImageNames added in v0.0.2

func (slide Slide) AssociatedImageNames() []string

AssociatedImageNames Get the names of the associated images

func (Slide) BestLevelForDownsample

func (slide Slide) BestLevelForDownsample(downsample float64) int

BestLevelForDownsample Get the best level to use for a particular downsampling factor

func (Slide) Close

func (slide Slide) Close()

Close Closes a slide.

func (Slide) GetSpacing

func (slide Slide) GetSpacing() ([2]float64, error)

GetSpacing Get the spacing of the slide

func (Slide) GetThumbnail

func (slide Slide) GetThumbnail(size int) (image.Image, error)

GetThumbnail Get thumbnail of the image

func (Slide) LargestLevelDimensions

func (slide Slide) LargestLevelDimensions() [2]int

LargestLevelDimensions Get the dimensions of level 0, the largest level (aka get_level0_dimensions).

func (Slide) LevelCount

func (slide Slide) LevelCount() int

LevelCount Get the number of levels in the whole slide image.

func (Slide) LevelDimensions

func (slide Slide) LevelDimensions(level int) [2]int

LevelDimensions Get the dimensions of a level.

func (Slide) LevelDownsample

func (slide Slide) LevelDownsample(level int) float64

LevelDownsample Get the downsampling factor of the given level

func (Slide) LevelDownsamples

func (slide Slide) LevelDownsamples() []float64

LevelDownsamples Get the downsampling factors for all levels

func (Slide) Properties

func (slide Slide) Properties() map[string]string

Properties Get all properties as a map.

func (Slide) PropertyNames

func (slide Slide) PropertyNames() []string

PropertyNames Get all property names available for this slide.

func (Slide) PropertyValue

func (slide Slide) PropertyValue(propName string) string

PropertyValue Get the value for a specific property.

func (Slide) ReadAssociatedImage added in v0.0.2

func (slide Slide) ReadAssociatedImage(associatedName string) (image.Image, error)

ReadAssociatedImage Read an associated image as an RGBA image.

func (Slide) ReadRegion

func (slide Slide) ReadRegion(x, y int, level int, w, h int) (image.Image, error)

ReadRegion Read a region of the image as an RGBA image

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL