ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping.Voxel Namespace / IsosurfaceDefinition Class
Members Example

In This Topic
    IsosurfaceDefinition Class
    In This Topic
    Represents the definition of an Isosurface. Refer to ArcGIS.Desktop.Mapping.VoxelLayer
    Object Model
    IsosurfaceDefinition ClassCIMColor ClassVoxelLayer Class
    Syntax
    public class IsosurfaceDefinition 
    Public Class IsosurfaceDefinition 
    Remarks
    An isosurface is a surface created for a specific voxel variable profile where every voxel has the same value.
    Example
    Get/Set Selected Voxel Assets from the TOC
    var surfaces = MapView.Active.GetSelectedIsosurfaces();
    //set selected w/ MapView.Active.SelectVoxelIsosurface(isoSurface)
    var slices = MapView.Active.GetSelectedSlices();
    //set selected w/ MapView.Active.SelectVoxelSlice(slice)
    var sections = MapView.Active.GetSelectedSections();
    //set selected w/ MapView.Active.SelectVoxelSection(section)
    var locked_sections = MapView.Active.GetSelectedLockedSections();
    //set selected w/ MapView.Active.SelectVoxelLockedSection(locked_section)
    
    Create Isosurface
    //var voxelLayer = ... ;
    //Must be on the QueuedTask.Run()
    
    //Visualization must be surface
    if (voxelLayer.Visualization != VoxelVisualization.Surface)
        voxelLayer.SetVisualization(VoxelVisualization.Surface);
    
    //Get the variable profile on which to create the iso surface
    var variable = voxelLayer.SelectedVariableProfile;
    
    // o Visualization must be Surface
    // o Variable profile must be continuous
    // o Variable MaxNumberofIsoSurfaces must not have been reached...
    if (variable.CanCreateIsosurface)
    {
        //Note: calling create if variable.CanCreateIsosurface == false
        //will trigger an InvalidOperationException
    
        //Specify a voxel value for the iso surface
        //At 2.x - 
        //var min = variable.GetVariableStatistics().MinimumValue;
        //var max = variable.GetVariableStatistics().MaximumValue;
    
        var min = variable.Statistics.MinimumValue;
        var max = variable.Statistics.MaximumValue;
        var mid = (max + min) / 2;
    
        //color range (i.e. values that are being rendered)
        var renderer = variable.Renderer as CIMVoxelStretchRenderer;
        var color_min = renderer.ColorRangeMin;
        var color_max = renderer.ColorRangeMax;
    
        //keep the surface within the current color range (or it
        //won't render)
        if (mid < color_min)
        {
            mid = renderer.ColorRangeMin;
        }
        else if (mid > color_max)
        {
            mid = renderer.ColorRangeMax;
        }
    
        //Create the iso surface
        var suffix = Math.Truncate(mid * 100) / 100;
        variable.CreateIsosurface(new IsosurfaceDefinition()
        {
            Name = $"Surface {suffix}",
            Value = mid,
            IsVisible = true
        });
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.Voxel.IsosurfaceDefinition

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also