dcmimage

package
v0.0.0-...-8b1d61c Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2017 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MAXBITS defines the image maxinum bits
	MAXBITS uint16 = 32
)

Functions

This section is empty.

Types

type BitmapFileHeader

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

BitmapFileHeader is for BMP file header

type BitmapInfoHeader

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

BitmapInfoHeader is for BMP info header

type DcmImage

type DcmImage struct {
	Rows                      uint32
	Columns                   uint32
	PixelWidth                float64
	PixelHeight               float64
	BitsAllocated             uint16
	BitsStored                uint16
	HighBit                   uint16
	PhotometricInterpretation string
	SamplesPerPixel           uint16
	PixelRepresentation       uint16
	//	PlanarConfiguration       uint16
	RescaleIntercept float64
	RescaleSlope     float64
	WindowCenter     float64
	WindowWidth      float64

	IsReverse    bool
	IsCompressed bool
	IsBigEndian  bool

	NumberOfFrames int
	PixelData      []byte
	// contains filtered or unexported fields
}

DcmImage provides the "DICOM image toolkit"

func (DcmImage) ConvertToJPG

func (di DcmImage) ConvertToJPG(filepath string, frame int) error

ConvertToJPG convert dicom file to jpg file

func (DcmImage) ConvertToPNG

func (di DcmImage) ConvertToPNG(filepath string, frame int) error

ConvertToPNG convert dicom file to png file.

func (DcmImage) IsMonochrome

func (di DcmImage) IsMonochrome() bool

IsMonochrome checks whether image is monochrome or not.

func (DcmImage) WriteBMP

func (di DcmImage) WriteBMP(filename string, bits uint16, frame int) error

WriteBMP write pixel data to BMP file

Jump to

Keyboard shortcuts

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