cardiaccycle

package
v0.0.0-...-66a4754 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Identifier = iota
	InstanceNumber
	Metric
)

Variables

This section is empty.

Functions

func RunFromFile

func RunFromFile(input string) error

Types

type Entry

type Entry struct {
	InstanceNumber uint16
	Metric         float64
}

type List

type List struct {
	*ring.Ring
}

func (*List) Extrema

func (l *List) Extrema(adjacentN, discardN int) (Result, error)

func (*List) GetAdjacent

func (l *List) GetAdjacent(n int) []Entry

type Result

type Result struct {
	Identifier          string
	Column              string
	MaxOneStepShift     float64 // Biggest change in pixel area between two adjacent steps
	InstanceNumberAtMin uint16
	Min                 float64
	SmoothedMin         float64
	InstanceNumberAtMax uint16
	Max                 float64
	SmoothedMax         float64
	Window              int
	Discards            int
}

func RunFromSlices

func RunFromSlices(samples []string, timeIDs []uint16, metric []float64, adjacentN, discardN int) ([]Result, error)

RunFromSlices runs the cardiac cycle program using 3 slices of input: the sample identifiers, the timing identifiers, and a metric value (e.g., number of connected components, or area, etc). The length of the 3 inputs must be the same, because the 0th sampleID corresponds to the 0th timeID and 0th metric, etc. AdjacentN is the number of adjacent timepoints to look at when computing a smoothed average, and discardN is the number of most extreme values to discard when computing the smoothed average.

type SeriesSample

type SeriesSample struct {
	Identifier string
}

SeriesSample represents a sample-instance-series pair. Most samples have just one series (set of images) occurring at once instance (imaging visit). However, thousands of samples will have at least a second instance. Additionally, many samples have multiple series within one instance. This appears to be due to problems with image acquisition in the first series. You don't want to accidentally model them jointly.

Jump to

Keyboard shortcuts

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