Documentation ¶
Index ¶
- type Image3D
- func (image *Image3D) FlipX()
- func (image *Image3D) FlipY()
- func (image *Image3D) GetA(x, y, z int) uint8
- func (image *Image3D) GetB(x, y, z int) uint8
- func (image *Image3D) GetByteDepth() int
- func (image *Image3D) GetChannels() int
- func (image *Image3D) GetData() []uint8
- func (image *Image3D) GetDataPointer() unsafe.Pointer
- func (image *Image3D) GetG(x, y, z int) uint8
- func (image *Image3D) GetHeight() int
- func (image *Image3D) GetPixelType() uint32
- func (image *Image3D) GetR(x, y, z int) uint8
- func (image *Image3D) GetRGB(x, y, z int) (uint8, uint8, uint8)
- func (image *Image3D) GetRGBA(x, y, z int) (uint8, uint8, uint8, uint8)
- func (image *Image3D) GetSlices() int
- func (image *Image3D) GetWidth() int
- func (image *Image3D) SaveToPath(path string) error
- func (image *Image3D) SetA(x, y, z int, a uint8)
- func (image *Image3D) SetB(x, y, z int, b uint8)
- func (image *Image3D) SetG(x, y, z int, g uint8)
- func (image *Image3D) SetR(x, y, z int, r uint8)
- func (image *Image3D) SetRGB(x, y, z int, r, g, b uint8)
- func (image *Image3D) SetRGBA(x, y, z int, r, g, b, a uint8)
- func (image Image3D) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image3D ¶
type Image3D struct {
// contains filtered or unexported fields
}
Image3D stores the dimensions, data format and it's pixel data. It can be used to manipulate single pixels and is used to upload it's data to a texture.
func Make ¶
Make constructs an image of the specified length, width, height and with all pixels set to the specified rgba value.
func MakeFromData ¶
MakeFromData constructs an image of the specified width, height, slices and the specified data.
func MakeFromPath ¶
MakeFromPath constructs the image data from the specified paths. If there is no image at the specified path an error is returned instead. The dimensions of all images must match.
func (*Image3D) GetByteDepth ¶
GetByteDepth returns the number of bytes a channel consists of.
func (*Image3D) GetChannels ¶
GetChannels return the number of the channels of the image.
func (*Image3D) GetDataPointer ¶
GetDataPointer returns an pointer to the beginning of the image data.
func (*Image3D) GetPixelType ¶
GetPixelType gets the data type of the pixel data.
func (*Image3D) SaveToPath ¶
SaveToPath saves all slices as png images to the specified path. All images will be enumerated starting with 0. The file names will look like the following: dir/filename<NUMBER>.png