CellexalVR  1.1.0
A virtual reality platform for the exploration and analysis of single-cell gene expression data
CellexalVR.AnalysisLogic.PointCloudGenerator Class Reference

This class handles the generation of the points clouds so it is the equivalent of the CellexalVR.AnalysisObjects.GraphGenerator but for point clouds. Instantiates a point cloud prefab or spatial point cloud depending on the dataset. More...

Inheritance diagram for CellexalVR.AnalysisLogic.PointCloudGenerator:

Public Member Functions

PointCloud CreateNewPointCloud (bool spatial=false)
 Create a new points cloud or spatial point cloud. More...
 
HistoImage CreateNewHistoImage (PointCloud parentPC)
 Create a point cloud that also contains a histology image. More...
 
PointCloud CreateFromOld (Transform oldPc, bool spatial=true)
 Create a new point cloud based on an existing one. For example when slicing a graph. More...
 
void BuildSlices (Transform oldPc, GraphSlice[] newSlices)
 Iterates through the graphslices to create and builds them. More...
 
void AddGraphPoint (string cellName, float x, float y, float z)
 Add graph point to the point cloud currently being built. More...
 
void AddGraphPoint (string cellName, float x, float y)
 Add graph point to the point cloud currently being built. Sets the z coordinate to zero for a 2D graph. More...
 
IEnumerator SpawnPoints (PointCloud pc, PointCloud parentPC, List< Point > points)
 Spawn new points based on the given points and a parent point cloud. Used when slicing. More...
 
void SpawnPoints (PointCloud pc)
 Spawn the points and create poisition texture map. More...
 
PointCloud FindPointCloud (string pcName)
 Retrieve the point cloud with the given name. More...
 
void SpawnPoints (HistoImage hi, PointCloud parentPC)
 Spawn the points of a histology image point cloud. More...
 
IEnumerator CreateColorTextureMap (Dictionary< string, float3 > points, HistoImage hi, PointCloud parentCloud)
 Create the texture that handles the color of each point. This texture is sent to the visual effects graph that then colors the points. More...
 
IEnumerator CreateColorTextureMap (List< Point > points, PointCloud pc, PointCloud parentCloud)
 Create the texture that handles the color of each point. This texture is sent to the visual effects graph that then colors the points. More...
 
IEnumerator CreateColorTextureMap ()
 Create the texture that handles the color of each point. This texture is sent to the visual effects graph that then colors the points. More...
 
IEnumerator ReadMetaData (string dir)
 Read meta data file. Previously stored in a meta.cell file but this is when each point belongs to just one cluster in the file. More...
 

Public Attributes

int nrOfGraphs = 0
 
int mdsFileCount
 
bool creatingGraph
 
float3 minCoordValues
 
float3 maxCoordValues
 
float3 longestAxis
 
float3 scaledOffset
 
Texture2D colorMap
 
Texture2D alphaMap
 
Texture2D clusterMap
 
Dictionary< int, string > indToLabelDict = new Dictionary<int, string>()
 
Dictionary< int, string > clusterDict = new Dictionary<int, string>()
 
Dictionary< string, Color > colorDict = new Dictionary<string, Color>()
 
Dictionary< string, List< Vector2Int > > clusters = new Dictionary<string, List<Vector2Int>>()
 
Dictionary< string, float3 > scaledCoordinates = new Dictionary<string, float3>()
 
List< PointCloudpointClouds = new List<PointCloud>()
 
int pointCount
 
bool readingFile
 

Static Public Attributes

static PointCloudGenerator instance
 
const int textureWidth = 1000
 

Detailed Description

This class handles the generation of the points clouds so it is the equivalent of the CellexalVR.AnalysisObjects.GraphGenerator but for point clouds. Instantiates a point cloud prefab or spatial point cloud depending on the dataset.

Member Function Documentation

◆ AddGraphPoint() [1/2]

void CellexalVR.AnalysisLogic.PointCloudGenerator.AddGraphPoint ( string  cellName,
float  x,
float  y 
)

Add graph point to the point cloud currently being built. Sets the z coordinate to zero for a 2D graph.

Parameters
cellName
x
y

◆ AddGraphPoint() [2/2]

void CellexalVR.AnalysisLogic.PointCloudGenerator.AddGraphPoint ( string  cellName,
float  x,
float  y,
float  z 
)

Add graph point to the point cloud currently being built.

Parameters
cellName
x
y
z

◆ BuildSlices()

void CellexalVR.AnalysisLogic.PointCloudGenerator.BuildSlices ( Transform  oldPc,
GraphSlice[]  newSlices 
)

Iterates through the graphslices to create and builds them.

Parameters
oldPc
newSlices

◆ CreateColorTextureMap() [1/3]

IEnumerator CellexalVR.AnalysisLogic.PointCloudGenerator.CreateColorTextureMap ( )

Create the texture that handles the color of each point. This texture is sent to the visual effects graph that then colors the points.

Returns

◆ CreateColorTextureMap() [2/3]

IEnumerator CellexalVR.AnalysisLogic.PointCloudGenerator.CreateColorTextureMap ( Dictionary< string, float3 >  points,
HistoImage  hi,
PointCloud  parentCloud 
)

Create the texture that handles the color of each point. This texture is sent to the visual effects graph that then colors the points.

Parameters
points
hi
parentCloud
Returns

◆ CreateColorTextureMap() [3/3]

IEnumerator CellexalVR.AnalysisLogic.PointCloudGenerator.CreateColorTextureMap ( List< Point points,
PointCloud  pc,
PointCloud  parentCloud 
)

Create the texture that handles the color of each point. This texture is sent to the visual effects graph that then colors the points.

Parameters
points
pc
parentCloud
Returns

◆ CreateFromOld()

PointCloud CellexalVR.AnalysisLogic.PointCloudGenerator.CreateFromOld ( Transform  oldPc,
bool  spatial = true 
)

Create a new point cloud based on an existing one. For example when slicing a graph.

Parameters
oldPc
spatial
Returns

◆ CreateNewHistoImage()

HistoImage CellexalVR.AnalysisLogic.PointCloudGenerator.CreateNewHistoImage ( PointCloud  parentPC)

Create a point cloud that also contains a histology image.

Parameters
parentPC
Returns

◆ CreateNewPointCloud()

PointCloud CellexalVR.AnalysisLogic.PointCloudGenerator.CreateNewPointCloud ( bool  spatial = false)

Create a new points cloud or spatial point cloud.

Parameters
spatial
Returns

◆ FindPointCloud()

PointCloud CellexalVR.AnalysisLogic.PointCloudGenerator.FindPointCloud ( string  pcName)

Retrieve the point cloud with the given name.

Parameters
pcNameThe name of the point cloud.
Returns

◆ ReadMetaData()

IEnumerator CellexalVR.AnalysisLogic.PointCloudGenerator.ReadMetaData ( string  dir)

Read meta data file. Previously stored in a meta.cell file but this is when each point belongs to just one cluster in the file.

Parameters
dir
Returns

◆ SpawnPoints() [1/3]

void CellexalVR.AnalysisLogic.PointCloudGenerator.SpawnPoints ( HistoImage  hi,
PointCloud  parentPC 
)

Spawn the points of a histology image point cloud.

Parameters
hi
parentPC

◆ SpawnPoints() [2/3]

void CellexalVR.AnalysisLogic.PointCloudGenerator.SpawnPoints ( PointCloud  pc)

Spawn the points and create poisition texture map.

Parameters
pc

◆ SpawnPoints() [3/3]

IEnumerator CellexalVR.AnalysisLogic.PointCloudGenerator.SpawnPoints ( PointCloud  pc,
PointCloud  parentPC,
List< Point points 
)

Spawn new points based on the given points and a parent point cloud. Used when slicing.

Parameters
pcThe instatiated point cloud the points belongs to.
parentPCThe parent point cloud.
points
Returns

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