• Home
  • Manual
  • API Documentation
Search Results for

    Show / Hide Table of Contents
      • ABRFilterExample
      • ABRQueryExample
      • ABRSpaceConvertExample
      • BackgroundColor
      • DebugDraw
      • DisableABRLights
      • GenerateDataAndUseStyle
      • Grabbable
      • Grabber
      • HideShowMenu
      • LightEditor
      • LightEditorTile
      • PerformanceEnhancer
      • SVScreenshot
    • IVLab.ABREngine
      • ABRConfig
      • ABRConfig.Consts
      • ABRConfig.GroupToDataMatrixOverrideFields
      • ABRDataContainer
      • ABREngine
      • ABREngine.StateChangeDelegate
      • ABRInputAttribute
      • ABRInputGenre
      • ABRInputIndexerModule
      • ABRLight
      • ABRLightManager
      • ABRPlateType
      • ABRServer
      • ABRStateParser
      • AnglePrimitive
      • BooleanPrimitive
      • ColormapVisAsset
      • DataImpression
      • DataImpressionGroup
      • DataManager
      • DataPath
      • DataPath.DataPathType
      • DataPoint
      • DataRange<T>
      • DataTopology
      • Dataset
      • FilePathVisAssetFetcher
      • FloatPrimitive
      • GlyphGradient
      • GlyphVisAsset
      • GradientBlendMap
      • HttpDataLoader
      • HttpStateFileLoader
      • HttpVisAssetFetcher
      • IABRInput
      • IABRStateLoader
      • IColormapVisAsset
      • ICoordSpaceConverter
      • IDataAccessor
      • IDataImpressionRenderInfo
      • IDataLoader
      • IDataVariable<T>
      • IFloatPrimitive
      • IGlyphVisAsset
      • IHasDataset
      • IHasKeyData
      • IIntegerPrimitive
      • IKeyDataRenderInfo
      • ILineTextureVisAsset
      • IPrimitive
      • IPrimitiveGradient
      • ISurfaceTextureVisAsset
      • ITextureGradient
      • IVisAsset
      • IVisAssetFetcher
      • IVisAssetGradient<T>
      • IVolumeCoordSpaceConverter
      • IVolumeDataAccessor
      • InstancedMeshRenderer
      • InstancedSurfaceDataImpression
      • IntegerPrimitive
      • KeyData
      • LengthPrimitive
      • LineKeyData
      • LineTextureGradient
      • LineTextureVisAsset
      • MediaDataLoader
      • Notifier
      • PathStateFileLoader
      • PercentPrimitive
      • PointKeyData
      • PrimitiveGradient
      • RawABRInput
      • RawDataset
      • RawDataset.BinaryData
      • RawDataset.JsonHeader
      • RawDatasetAdapter
      • RawPrimitiveGradient
      • RawVisAssetGradient
      • RenderHints
      • ResourceStateFileLoader
      • ResourceVisAssetFetcher
      • ResourcesDataLoader
      • ScalarDataVariable
      • SerializableFloatArray
      • SerializableVectorArray
      • SimpleGlyphDataImpression
      • SimpleLineDataImpression
      • SimpleLineRenderInfo
      • SimpleSurfaceDataImpression
      • SimpleSurfaceRenderInfo
      • SimpleVolumeDataImpression
      • StateLocalVisAssetFetcher
      • SurfaceKeyData
      • SurfaceTextureGradient
      • SurfaceTextureVisAsset
      • TextStateFileLoader
      • TypeExtentions
      • UnityObjectSerializer
      • UpdateLevel
      • VectorDataVariable
      • VisAsset
      • VisAssetGradient
      • VisAssetLoader
      • VisAssetManager
      • VolumeKeyData
    • IVLab.ABREngine.Examples
      • CSVToPoints
      • CreateDataset
      • InteractiveState
      • MtStHelensData
      • MtStHelensVisDriver
    • IVLab.ABREngine.ExtensionMethods
      • DirectoryInfoExtensions
      • ScriptableObjectExtensions
    • IVLab.ABREngine.Legends
      • ABRLegend
      • ABRLegendEntry
      • ABRLegendEntry.Label
      • ABRLegendGeometry

    Class VisAssetManager

    The VisAssetManager is where all VisAssets are stored within the ABREngine. VisAssets can be loaded and fetched from various sources defined in VisAssetFetchers. Currently, VisAssets may be loaded from any of the following:

    1. The state itself (`localVisAssets`)
    2. The media directory on the machine ABR is running on
    3. Any Resources folder (in Assets or in any Package)
    4. A VisAsset server
    Inheritance
    object
    VisAssetManager
    Namespace: IVLab.ABREngine
    Assembly: IVLab.ABREngine.Runtime.dll
    Syntax
    public class VisAssetManager
    Examples

    VisAssets can be loaded manually from your media folder, resources folder, or a network resource. This example loads a colormap 66b3cde4-034d-11eb-a7e6-005056bae6d8 from Resources (it's included in the ABREngine/Resources/media folder).

    public class VisAssetManagerExample : MonoBehaviour
    {
        void Start()
        {
            // Note, we could've used `LoadVisAsset` explicitly here, but
            // GetVisAsset will automatically try to load the VisAsset if it
            // doesn't already exist.
            ColormapVisAsset cmap = ABREngine.Instance.VisAssets.GetVisAsset<ColormapVisAsset>(new System.Guid("66b3cde4-034d-11eb-a7e6-005056bae6d8"));
        }
    
        void Update()
        {
            // If you want to access the colormap later, you can use `GetVisAsset`.
            ColormapVisAsset cmapInUpdate = ABREngine.Instance.VisAssets.GetVisAsset<ColormapVisAsset>(new System.Guid("66b3cde4-034d-11eb-a7e6-005056bae6d8");
        }
    }

    You can also get the "default" visasset for a few VisAsset types. Keep in mind that the GetDefault<T>() method may not be defined for the VisAsset type that you want to get!

    public class VisAssetManagerExample : MonoBehaviour
    {
        void Start()
        {
            ColormapVisAsset cmap = ABREngine.Instance.VisAssets.GetDefault<ColormapVisAsset>() as ColormapVisAsset;
        }
    }

    Constructors

    | Improve this Doc View Source

    VisAssetManager(string)

    Initialize a new VisAssetManager and define all of the places VisAssets may be loaded from.

    Declaration
    public VisAssetManager(string visassetPath)
    Parameters
    Type Name Description
    string visassetPath

    Path to the VisAssets folder within ABR's media folder.

    Fields

    | Improve this Doc View Source

    VISASSET_JSON

    Name of the artifact.json files that each VisAsset has

    Declaration
    public const string VISASSET_JSON = "artifact.json"
    Field Value
    Type Description
    string
    | Improve this Doc View Source

    appDataPath

    Application data path for internal access

    Declaration
    public string appDataPath
    Field Value
    Type Description
    string

    Properties

    | Improve this Doc View Source

    LocalVisAssets

    Any (custom) visassets that are solely described inside the state and do not exist on disk or on a server somewhere.

    Declaration
    public JObject LocalVisAssets { get; set; }
    Property Value
    Type Description
    JObject
    | Improve this Doc View Source

    VisAssetGradients

    Any VisAsset gradients that are contained within the state (updated directly from state)

    Declaration
    public Dictionary<string, RawVisAssetGradient> VisAssetGradients { get; set; }
    Property Value
    Type Description
    Dictionary<string, RawVisAssetGradient>

    Methods

    | Improve this Doc View Source

    GetDefault<T>()

    Obtain the default visasset for a particular type, if there is one.

    Declaration
    public IVisAsset GetDefault<T>() where T : IVisAsset
    Returns
    Type Description
    IVisAsset
    Type Parameters
    Name Description
    T
    Remarks

    If using the VisAsset immediately as the type T, you will likely need to do a cast (e.g. ColormapVisAsset c = ....GetDefault<ColormapVisAsset>() as ColormapVisAsset).

    | Improve this Doc View Source

    GetVisAsset<T>(Guid)

    Get a visasset by its unique identifier.

    Declaration
    public T GetVisAsset<T>(Guid uuid) where T : IVisAsset
    Parameters
    Type Name Description
    Guid uuid

    UUID of the VisAsset to get from the engine.

    Returns
    Type Description
    T

    Returns the VisAsset, if found. If not found, tries to load the VisAsset then return it.

    Type Parameters
    Name Description
    T

    Any VisAsset type.

    | Improve this Doc View Source

    GetVisAssets()

    Get the UUIDs of every VisAsset that's been imported into ABR

    Declaration
    public List<Guid> GetVisAssets()
    Returns
    Type Description
    List<Guid>

    Returns a list containing UUIDs of each VisAsset in ABR.

    | Improve this Doc View Source

    LoadVisAsset(Guid, bool)

    Load a particular VisAsset described by its UUID.

    Declaration
    public IVisAsset LoadVisAsset(Guid visAssetUUID, bool replaceExisting = false)
    Parameters
    Type Name Description
    Guid visAssetUUID
    bool replaceExisting
    Returns
    Type Description
    IVisAsset

    Returns the IVisAsset that was loaded, or null if the VisAsset was not found.

    | Improve this Doc View Source

    LoadVisAssetPalette()

    Load all VisAssets located in the Media directory into memory.

    Declaration
    [Obsolete("LoadVisAssetPalette is obsolete because it only takes into consideration VisAssets in the media directory")]
    public void LoadVisAssetPalette()
    | Improve this Doc View Source

    LoadVisAsset<T>(Guid, bool)

    Load a VisAsset of a specific type.

    Declaration
    public T LoadVisAsset<T>(Guid visAssetUUID, bool replaceExisting = false) where T : IVisAsset
    Parameters
    Type Name Description
    Guid visAssetUUID

    UUID of the VisAsset to load from any VisAsset loader.

    bool replaceExisting
    Returns
    Type Description
    T

    Returns the VisAsset of type T that was loaded, or null if the VisAsset was not found.

    Type Parameters
    Name Description
    T

    Any VisAsset type.

    | Improve this Doc View Source

    TryGetVisAsset(Guid, out IVisAsset)

    Attempt to retrieve a VisAsset.

    Declaration
    public bool TryGetVisAsset(Guid guid, out IVisAsset visAsset)
    Parameters
    Type Name Description
    Guid guid
    IVisAsset visAsset
    Returns
    Type Description
    bool

    Returns true if the VisAsset is currently loaded into the memory.

    | Improve this Doc View Source

    UnloadVisAsset(Guid)

    Unload a particular VisAsset described by its UUID.

    Declaration
    public void UnloadVisAsset(Guid visAssetUUID)
    Parameters
    Type Name Description
    Guid visAssetUUID
    Remarks

    Note that this method does not check if the VisAsset is in use, so be careful when calling it!

    • Improve this Doc
    • View Source
    In This Article
    Back to top Interactive Visualization Lab
    Copyright 2023, Regents of the University of Minnesota, All Rights Reserved