A confirmed selection of Graph.GraphPoint. Selections are created through the SelectionManager and once done, an object of this class is created.
More...
|
string | savedSelectionDirectory |
|
string | savedSelectionFilePath |
|
string | savedSelectionMetaPath |
|
readonly int | id |
|
int | size |
|
readonly List< int > | groups |
|
readonly List< Color > | colors |
|
readonly Dictionary< int, int > | groupSizes |
|
bool | pointsLoaded |
|
Dictionary<(Graph graph, int group), Texture2D > | groupMasks = new() |
|
Dictionary< Graph, Texture2D > | allGroupsCombinedMask = new() |
|
|
static string | parentSelectionDirectory |
|
A confirmed selection of Graph.GraphPoint. Selections are created through the SelectionManager and once done, an object of this class is created.
◆ Selection() [1/3]
CellexalVR.AnalysisLogic.Selection.Selection |
( |
| ) |
|
Creates a new empty selection.
◆ Selection() [2/3]
CellexalVR.AnalysisLogic.Selection.Selection |
( |
IEnumerable< Graph.GraphPoint > |
points | ) |
|
Creates a new selection from a collection of selected points.
- Parameters
-
points | The collection to of points this selection should include. |
◆ Selection() [3/3]
CellexalVR.AnalysisLogic.Selection.Selection |
( |
string |
selectionFilePath | ) |
|
Creates a new selection from a previous selection that was saved to the disk.
- Parameters
-
selectionFilePath | The path to the saved selection. |
◆ AssertDirectory()
bool CellexalVR.AnalysisLogic.Selection.AssertDirectory |
( |
bool |
deleteContents | ) |
|
Asserts that a suitable directory exists, this function will create a directory if needed. Directory name is based off this selection's id.
- Parameters
-
deleteContents | Deletes all content in the directory this selection should use |
- Returns
- False if a directory exists, but deleteContents is false. True otherwise. This makes the function usable for loops when looking for a suitable directory.
◆ LoadGroupMasksFromDisk()
void CellexalVR.AnalysisLogic.Selection.LoadGroupMasksFromDisk |
( |
| ) |
|
◆ SaveGroupMasksToDisk()
void CellexalVR.AnalysisLogic.Selection.SaveGroupMasksToDisk |
( |
Graph |
graphToSave = null | ) |
|
Saves the group masks to the disk. This is automatically done by the constructor or when points are assigned with SetPoints(IEnumerable<Graph.GraphPoint>, bool, bool). Calling this manually afterwards will update the group masks with the graph points current groups and overwrite the previously saved masks.
- Parameters
-
graphToSave | Optional. If left out, all graphs that are currently loaded will be saved, otherwise, only the graph passed in this argument is saved. |
◆ SaveSelectionToDisk()
void CellexalVR.AnalysisLogic.Selection.SaveSelectionToDisk |
( |
| ) |
|
Saves this selection to the disk.
◆ SetPoints()
void CellexalVR.AnalysisLogic.Selection.SetPoints |
( |
IEnumerable< Graph.GraphPoint > |
points, |
|
|
bool |
copyIfList = false , |
|
|
bool |
saveToDisk = true |
|
) |
| |
Sets this selections points. This overwrites any Graph.GraphPoint that were saved to this selection before.
- Parameters
-
points | The points that should be set to this selection. |
copyIfList | Optional. If points is a List<Graph.GraphPoint> and this argument is set to false, this Selection will use the reference to the List<Graph.GraphPoint>. If set to true, the contents will be copied to a new List<Graph.GraphPoint> |
saveToDisk | Optional. True if the selection should also be saved to the disk (default behaviour). False otherwise. Setting this to false can be useful if this selection is being loaded from the disk and the files are already generated. |
If points is a List<Graph.GraphPoint> and copyIfList is set to false, this function will use the reference to the List<Graph.GraphPoint> that was passed. Otherwise, the contents will be copied to a new List<Graph.GraphPoint>. Not copying the List<Graph.GraphPoint> increases performance considerably when the List<Graph.GraphPoint> that is passed with points is not needed in the calling function after this.
◆ UnloadSelection()
void CellexalVR.AnalysisLogic.Selection.UnloadSelection |
( |
| ) |
|
Unloads this selection, freeing some memory.
◆ UpdateGroupMasks()
void CellexalVR.AnalysisLogic.Selection.UpdateGroupMasks |
( |
| ) |
|
Updates all group masks to match the current required offset.
◆ Points
◆ this[int index]
Indexer definition.
- Parameters
-
- Returns
The documentation for this class was generated from the following file:
- cellexalvr_cloudxr/Assets/Scripts/AnalysisLogic/Selection.cs