roiModel

package
v3.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Exposes structures and functions to store/retrieve/share regions of interest including MIST algorithm versions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetROIs

func GetROIs(svcs *services.APIServices, userID string, datasetID string, outMap *ROILookup, isPublicUser bool) error

func ShareROIs

func ShareROIs(svcs *services.APIServices, userID string, datasetID string, roiIDs []string) ([]string, error)

ShareROIs - Shares the given ROIs that are currently owned by userID, and a part of datasetID. Returns the new IDs generated and an error (or nil)

Types

type MistROIItem

type MistROIItem struct {
	Species             string `json:"species"`
	MineralGroupID      string `json:"mineralGroupID"`
	ID_Depth            int32  `json:"ID_Depth"`
	ClassificationTrail string `json:"ClassificationTrail"`
	Formula             string `json:"formula"`
}

type ROIIDs

type ROIIDs struct {
	IDs []string `json:"ids"`
}

type ROIItem

type ROIItem struct {
	Name            string  `json:"name"`
	LocationIndexes []int32 `json:"locationIndexes"`
	Description     string  `json:"description"`
	ImageName       string  `json:"imageName,omitempty"` // Name of image whose pixels are present in this ROI.
	// If no imageName, it's a traditional ROI consisting of PMCs
	PixelIndexes []int32     `json:"pixelIndexes,omitempty"`
	MistROIItem  MistROIItem `json:"mistROIItem"`
	Tags         []string    `json:"tags"`
}

ROIItem - Region of interest item, only public so Go can reflect/interogate it

type ROIItemOptions

type ROIItemOptions struct {
	ROIItems               []ROIItem `json:"roiItems"`
	Overwrite              bool      `json:"overwrite"`
	SkipDuplicates         bool      `json:"skipDuplicates"`
	DeleteExistingMistROIs bool      `json:"deleteExistingMistROIs"`
	ShareROIs              bool      `json:"shareROIs"`
}

type ROILookup

type ROILookup map[string]ROISavedItem

func ReadROIData

func ReadROIData(svcs *services.APIServices, s3Path string) (ROILookup, error)

TODO: make this take params: userID and datasetID instead of a path, path should probably be known only by this package? Currently this is not straight-forward in the case of users requesting a shared item, and needing to call utils.StripSharedItemIDPrefix ...

type ROIMembers

type ROIMembers struct {
	Name         string
	ID           string
	SharedByName string
	LocationIdxs []int32
	PMCs         []int32
}

func GetAllPointsROI

func GetAllPointsROI(dataset *protos.Experiment) ROIMembers

func GetROIsWithPMCs

func GetROIsWithPMCs(userROIs ROILookup, sharedROIs ROILookup, dataset *protos.Experiment) []ROIMembers

type ROIReference

type ROIReference struct {
	ID  string  `json:"id"`
	ROI ROIItem `json:"roi"`
}

type ROISavedItem

type ROISavedItem struct {
	*ROIItem
	*pixlUser.APIObjectItem
}

ROISavedItem - Region of interest item as saved to S3, only public so Go can reflect/interogate it

func (ROISavedItem) SetTimes

func (a ROISavedItem) SetTimes(userID string, t int64)

Jump to

Keyboard shortcuts

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