Public Function GetVariableProfiles() As IList(Of VoxelVariableProfile)
public IList<VoxelVariableProfile> GetVariableProfiles()
Public Function GetVariableProfiles() As IList(Of VoxelVariableProfile)
public IList<VoxelVariableProfile> GetVariableProfiles()
{
// Note: call within QueuedTask.Run()
{
var profiles = voxelLayer.GetVariableProfiles();
var sel_profile = voxelLayer.SelectedVariableProfile;
//Select any profile as long as it is not the current selected variable
var not_selected = profiles.Where(p => p.Variable != sel_profile.Variable).ToList();
if (not_selected.Count() > 0)
{
voxelLayer.SetSelectedVariableProfile(not_selected.First());
}
}
}
{
var variable_profiles = voxelLayer.GetVariableProfiles();
}
{
var variable = voxelLayer.GetVariableProfiles().First();
var renderer = variable.Renderer;
if (variable.DataType == VoxelVariableDataType.Continuous)
{
//Renderer will be stretch
var stretchRenderer = renderer as CIMVoxelStretchRenderer;
//access the renderer
}
else //VoxelVariableDataType.Discrete
{
//Renderer will be unique value
var uvr = renderer as CIMVoxelUniqueValueRenderer;
//access the renderer
}
}
{
var variable = voxelLayer.GetVariableProfiles().First();
var max = variable.MaxNumberOfIsosurfaces;
if (max >= variable.GetIsosurfaces().Count)
{
//no more surfaces can be created on this variable
}
}
{
var variable = voxelLayer.GetVariableProfiles().First();
if (variable.DataType != VoxelVariableDataType.Continuous)
{
//No iso surfaces
//Iso surface can only be created for VoxelVariableDataType.Continuous
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)