openslide

package
v0.0.0-...-34c7f86 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: LGPL-2.1 Imports: 4 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 {
	Width, Height int64
	LevelCount    int32
	// contains filtered or unexported fields
}

Slide Slides

func Open

func Open(filename string) (Slide, error)

Open Don't forget to defer Close. This is an expensive operation, you will want to cache the result.

func (Slide) AssociatedImageNames

func (slide Slide) AssociatedImageNames() []string

Associated images - label, macro, thumbnail

func (Slide) BestLevelForDownsample

func (slide Slide) BestLevelForDownsample(downsample float64) int32

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) GetAssociatedImage

func (slide Slide) GetAssociatedImage(name string) ([]byte, error)

func (Slide) GetAssociatedImageSize

func (slide Slide) GetAssociatedImageSize(name string) (int64, int64, error)

func (Slide) LargestLevelDimensions

func (slide Slide) LargestLevelDimensions() (int64, int64)

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

func (Slide) LevelDimensions

func (slide Slide) LevelDimensions(level int32) (int64, int64)

LevelDimensions Get the dimensions of a level.

func (Slide) LevelDownsample

func (slide Slide) LevelDownsample(level int32) float64

LevelDownsample Get the downsampling factor of the given level

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) ReadRegion

func (slide Slide) ReadRegion(x, y int64, level int32, w, h int64) ([]byte, error)

ReadRegion read a region of the image as raw ARGB data

Jump to

Keyboard shortcuts

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