CellexalVR  0.13.0
A virtual reality platform for the exploration and analysis of single-cell gene expression data
CellexalVR.General.SelectionManager Class Reference

Represents the selection tool that can be used to select multiple GraphPoints. More...

Inheritance diagram for CellexalVR.General.SelectionManager:

Public Member Functions

void AddGraphpointToSelection (Graph.GraphPoint graphPoint)
 Adds a graphpoint to the current selection, and changes its color to the current color of the selection tool. This method is called by a child object that holds the collider. More...
 
void AddGraphpointToSelection (Graph.GraphPoint graphPoint, int newGroup, bool hapticFeedback)
 Adds a graphpoint to the current selection, and changes its color. More...
 
void AddGraphpointToSelection (Graph.GraphPoint graphPoint, int newGroup, bool hapticFeedback, Color color)
 Adds a graphpoint to the current selection, and changes its color. More...
 
void DoClientSelectAdd (string graphName, string label, int newGroup, Color color)
 If selecting from client then graphpoint to be added needs to be found by searching since it has not collided with selection tool. More...
 
void DoClientSelectAdd (string graphName, string label, int newGroup, Color color, bool cube)
 Same as above but this function is called when coluring the cubes between same cells in different graphs. More...
 
void GoBackOneStepInHistory ()
 Goes back one step in the history of selecting cells. More...
 
void GoForwardOneStepInHistory ()
 Go forward one step in the history of selecting cells. More...
 
void GoBackOneColorInHistory ()
 Go back in history until the color changes. This unselects all the last cells that have the same color. More...
 
void GoForwardOneColorInHistory ()
 Go forward in history until the color changes. This re-selects all the last cells that have the same color. More...
 
void ConfirmSelection ()
 Adds rigidbody to all selected cells, making them fall to the ground. More...
 
void SelectAll ()
 Selects all points in to current group. If filter is active it queues all points for evaluation. More...
 
List< Graph.GraphPointGetLastSelection ()
 Gets the last selection that was confirmed. More...
 
void Clear ()
 Removes all points from the current selection, and clears the selection history. More...
 
List< Graph.GraphPointGetCurrentSelection ()
 Get the current (not yet confirmed) selection. More...
 
void CancelSelection ()
 Unselects anything selected. More...
 
void DumpSelectionToTextFile ()
 Dumps the current selection to a .txt file. More...
 
void DumpSelectionToTextFile (List< Graph.GraphPoint > selection, string filePath="")
 Dumps the confirmed selection to a text file in the output folder. The file contains the cell id and the colour of the selection group and which graph it was selected from. More...
 
void RecolorSelectionPoints ()
 Helper function to recolour only the points that are in the current selection. More...
 
void AddAnnotation (string annotation, int index)
 Adds the annotation to the currently selected group of cells. Also adds a line and text object above the cells with the annotation. More...
 
void DumpAnnotatedSelectionToTextFile (string filePath="")
 Writes the cells that have added annotation to a text file. Only cell id and annotation is written to the file. More...
 
Color GetColor (int index)
 Gets a selection colors. More...
 

Public Attributes

ReferenceManager referenceManager
 
GameObject annotationTextPrefab
 
bool selectionConfirmed = false
 
bool heatmapGrabbed = false
 
int fileCreationCtr = 0
 
ushort hapticIntensity = 2000
 

Properties

string DataDir [get, set]
 
bool RObjectUpdating [get]
 

Detailed Description

Represents the selection tool that can be used to select multiple GraphPoints.

Member Function Documentation

◆ AddAnnotation()

void CellexalVR.General.SelectionManager.AddAnnotation ( string  annotation,
int  index 
)

Adds the annotation to the currently selected group of cells. Also adds a line and text object above the cells with the annotation.

Parameters
annotationThe text that will be shown above the cells and later written to file.

◆ AddGraphpointToSelection() [1/3]

void CellexalVR.General.SelectionManager.AddGraphpointToSelection ( Graph.GraphPoint  graphPoint)

Adds a graphpoint to the current selection, and changes its color to the current color of the selection tool. This method is called by a child object that holds the collider.

◆ AddGraphpointToSelection() [2/3]

void CellexalVR.General.SelectionManager.AddGraphpointToSelection ( Graph.GraphPoint  graphPoint,
int  newGroup,
bool  hapticFeedback 
)

Adds a graphpoint to the current selection, and changes its color.

◆ AddGraphpointToSelection() [3/3]

void CellexalVR.General.SelectionManager.AddGraphpointToSelection ( Graph.GraphPoint  graphPoint,
int  newGroup,
bool  hapticFeedback,
Color  color 
)

Adds a graphpoint to the current selection, and changes its color.

◆ CancelSelection()

void CellexalVR.General.SelectionManager.CancelSelection ( )

Unselects anything selected.

◆ Clear()

void CellexalVR.General.SelectionManager.Clear ( )

Removes all points from the current selection, and clears the selection history.

◆ ConfirmSelection()

void CellexalVR.General.SelectionManager.ConfirmSelection ( )

Adds rigidbody to all selected cells, making them fall to the ground.

Confirms a selection and dumps the relevant data to a .txt file.

◆ DoClientSelectAdd() [1/2]

void CellexalVR.General.SelectionManager.DoClientSelectAdd ( string  graphName,
string  label,
int  newGroup,
Color  color 
)

If selecting from client then graphpoint to be added needs to be found by searching since it has not collided with selection tool.

Parameters
graphNameThe name of the graph that the point is in.
labelThe label of the cell (graphpoint)
newGroupThe group which the cell is to be added to.
colorColour that the graphpoint should be coloured by.

◆ DoClientSelectAdd() [2/2]

void CellexalVR.General.SelectionManager.DoClientSelectAdd ( string  graphName,
string  label,
int  newGroup,
Color  color,
bool  cube 
)

Same as above but this function is called when coluring the cubes between same cells in different graphs.

Parameters
graphName
label
newGroup
color
cubeIf a cube should be coloured as well as the graphpoint.

◆ DumpAnnotatedSelectionToTextFile()

void CellexalVR.General.SelectionManager.DumpAnnotatedSelectionToTextFile ( string  filePath = "")

Writes the cells that have added annotation to a text file. Only cell id and annotation is written to the file.

Parameters
selectionThe selected graphpoints
filePath
annotationThe string to write next to cell id as annotation.

◆ DumpSelectionToTextFile() [1/2]

void CellexalVR.General.SelectionManager.DumpSelectionToTextFile ( )

Dumps the current selection to a .txt file.

◆ DumpSelectionToTextFile() [2/2]

void CellexalVR.General.SelectionManager.DumpSelectionToTextFile ( List< Graph.GraphPoint selection,
string  filePath = "" 
)

Dumps the confirmed selection to a text file in the output folder. The file contains the cell id and the colour of the selection group and which graph it was selected from.

Parameters
selection

◆ GetColor()

Color CellexalVR.General.SelectionManager.GetColor ( int  index)

Gets a selection colors.

Parameters
indexThe index of the color. Indices outside the range of the array colors will be corrected with remainder division.

◆ GetCurrentSelection()

List<Graph.GraphPoint> CellexalVR.General.SelectionManager.GetCurrentSelection ( )

Get the current (not yet confirmed) selection.

Returns
A List of all graphpoints currently selected.

◆ GetLastSelection()

List<Graph.GraphPoint> CellexalVR.General.SelectionManager.GetLastSelection ( )

Gets the last selection that was confirmed.

Returns
A List of all graphpoints that were selected.

◆ GoBackOneColorInHistory()

void CellexalVR.General.SelectionManager.GoBackOneColorInHistory ( )

Go back in history until the color changes. This unselects all the last cells that have the same color.

If the user selects 2 cells as red then 3 cells as blue and then 4 cells as red, in that order, the 4 last red cells would be unselected when calling this method.

◆ GoBackOneStepInHistory()

void CellexalVR.General.SelectionManager.GoBackOneStepInHistory ( )

Goes back one step in the history of selecting cells.

◆ GoForwardOneColorInHistory()

void CellexalVR.General.SelectionManager.GoForwardOneColorInHistory ( )

Go forward in history until the color changes. This re-selects all the last cells that have the same color.

◆ GoForwardOneStepInHistory()

void CellexalVR.General.SelectionManager.GoForwardOneStepInHistory ( )

Go forward one step in the history of selecting cells.

◆ RecolorSelectionPoints()

void CellexalVR.General.SelectionManager.RecolorSelectionPoints ( )

Helper function to recolour only the points that are in the current selection.

◆ SelectAll()

void CellexalVR.General.SelectionManager.SelectAll ( )

Selects all points in to current group. If filter is active it queues all points for evaluation.


The documentation for this class was generated from the following file: