config

package
v0.0.0-...-4c8cea9 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Quadtree            QuadtreeConfig      `yaml:"Quadtree"`
	Encoding            EncodingConfig      `yaml:"Encoding"`
	Decoding            DecodingConfig      `yaml:"Decoding"`
	VisualizationConfig VisualizationConfig `yaml:"Visualization"`
}

Config holds parameters that influence the partitioning and encoding process of the quadtree

func NewConfigFromBytes

func NewConfigFromBytes(cfgBytes []byte) (*Config, error)

NewConfigFromBytes constructs a Config object from a YAML string

func NewConfigFromFile

func NewConfigFromFile(path string) (*Config, error)

NewConfigFromFile constructs a Config object from a YAML file

type DecodingConfig

type DecodingConfig struct {
	// Should the program run in parallel?
	Parallelism bool `yaml:"Parallelism"`
}

type DeduplicateBlocksConfig

type DeduplicateBlocksConfig struct {
	// Should similar blocks be deduplicated during encoding?
	Enable bool `yaml:"Enable"`
	// How similar do blocks have to be to be deduplicated
	MinimalSimilarity float64 `yaml:"MinimalSimilarity"`
}

type EncodingConfig

type EncodingConfig struct {
	//Underlying archive format of the encoded file
	ArchiveFormat string `yaml:"ArchiveFormat"`
	// Should the program run in parallel?
	Parallelism           bool                        `yaml:"Parallelism"`
	SkipOutOfBoundsBlocks SkipOutOfBoundsBlocksConfig `yaml:"SkipOutOfBoundsBlocks"`
	DeduplicateBlocks     DeduplicateBlocksConfig     `yaml:"DeduplicateBlocks"`
}

type QuadtreeConfig

type QuadtreeConfig struct {
	// Minimal similarity of base and upsampled image required to be a leaf
	SimilarityCutoff float64 `yaml:"SimilarityCutoff"`
	// Interpolation algorithm used to downsample base image
	DownsamplingInterpolator string `yaml:"DownsamplingInterpolator"`
	// Interpolation algorithm used to upsample downsampled image
	UpsamplingInterpolator string `yaml:"UpsamplingInterpolator"`
}

type SkipOutOfBoundsBlocksConfig

type SkipOutOfBoundsBlocksConfig struct {
	// Should blocks that are not visible be skipped during encoding?
	Enable bool `yaml:"Enable"`
}

type VisualizationConfig

type VisualizationConfig struct {
	// Should the visualizations be created?
	Enable bool `yaml:"Enable"`
}

Jump to

Keyboard shortcuts

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