Documentation ¶
Index ¶
- Constants
- func Crop(i image.Image, rectangle *image.Rectangle) image.Image
- func Decode(r io.Reader) (img image.Image, err error)
- func DecodeConfig(r io.Reader) (cfg image.Config, err error)
- func Encode(o io.WriteSeeker, img image.Image, opt *Options) (err error)
- func GetPixStride(i image.Image) ([]byte, int)
- func GetSSR(r image.Image, alt image.YCbCrSubsampleRatio) image.YCbCrSubsampleRatio
- func IsGray(img image.Image, fuzz int) bool
- func NewImage(c color.Model, r image.Rectangle) image.Image
- func NewImageColorAs(template image.Image, r image.Rectangle)
- func NewImageSSR(c color.Model, ssr image.YCbCrSubsampleRatio, r image.Rectangle) image.Image
- func SSR2VHDiv(i image.YCbCrSubsampleRatio) (v, h int)
- func ToGray(img image.Image, fuzz int) (gr *image.Gray)
- func ToModel(img image.Image, c color.Model) (gr image.Image)
- func VHDiv2SSR(v, h int) image.YCbCrSubsampleRatio
- type DicomImage
- func (p *DicomImage) At(x, y int) color.Color
- func (p *DicomImage) Bounds() image.Rectangle
- func (p *DicomImage) ColorModel() color.Model
- func (p *DicomImage) PixOffset(x, y int) int
- func (p *DicomImage) SetWindowLevel(wl int16)
- func (p *DicomImage) SetWindowWidth(ww int16)
- func (p *DicomImage) WindowLevel() int16
- func (p *DicomImage) WindowWidth() int16
- type Options
- type SubImage
Constants ¶
View Source
const YCbCrSubsampleRatioUnknown = -1
Variables ¶
This section is empty.
Functions ¶
func GetSSR ¶
func GetSSR(r image.Image, alt image.YCbCrSubsampleRatio) image.YCbCrSubsampleRatio
Get sub-sampling ratio if color space has one (0 = no sub-sampling).
func NewImageColorAs ¶
Create a new image "in the image" of template, that is, of same color model.
func NewImageSSR ¶
func SSR2VHDiv ¶
func SSR2VHDiv(i image.YCbCrSubsampleRatio) (v, h int)
Translate Go's sub-sampling rate to V/H divisors.
func ToGray ¶
Attempt conversion of the input image into greyscale. Fuzz is is a threshold when a color picture is considered greyscale, Higher fuzz will accept more of color variance. If picture is above fuzz, "too colorish", nil is returned. If fuzz threshold is -1, the conversion is done always.
func VHDiv2SSR ¶
func VHDiv2SSR(v, h int) image.YCbCrSubsampleRatio
Translate vertical-horizontal chroma divisors to Go's sub-sampling rate.
Types ¶
type DicomImage ¶ added in v0.0.4
type DicomImage struct {
// contains filtered or unexported fields
}
func (*DicomImage) Bounds ¶ added in v0.0.4
func (p *DicomImage) Bounds() image.Rectangle
func (*DicomImage) ColorModel ¶ added in v0.0.4
func (p *DicomImage) ColorModel() color.Model
func (*DicomImage) PixOffset ¶ added in v0.0.4
func (p *DicomImage) PixOffset(x, y int) int
func (*DicomImage) SetWindowLevel ¶ added in v0.0.4
func (p *DicomImage) SetWindowLevel(wl int16)
func (*DicomImage) SetWindowWidth ¶ added in v0.0.4
func (p *DicomImage) SetWindowWidth(ww int16)
func (*DicomImage) WindowLevel ¶ added in v0.0.4
func (p *DicomImage) WindowLevel() int16
func (*DicomImage) WindowWidth ¶ added in v0.0.4
func (p *DicomImage) WindowWidth() int16
Click to show internal directories.
Click to hide internal directories.