a NVMesh encapsulates some mesh data and provides methods to query and operate on meshes

Constructors

  • Parameters

    • pts: Float32Array

      a 3xN array of vertex positions (X,Y,Z coordinates).

    • tris: Uint32Array

      a 3xN array of triangle indices (I,J,K; indexed from zero). Each triangle generated from three vertices.

    • name: string = ''

      a name for this image. Default is an empty string

    • rgba255: Uint8Array = ...

      the base color of the mesh. RGBA values from 0 to 255. Default is white

    • opacity: number = 1.0

      the opacity for this mesh. default is 1

    • visible: boolean = true

      whether or not this image is to be visible

    • gl: WebGL2RenderingContext

      WebGL rendering context

    • connectome: string | LegacyConnectome = null

      specify connectome edges and nodes. Default is null (not a connectome).

    • dpg: ValuesArray = null

      Data per group for tractography, see TRK format. Default is null (not tractograpgy)

    • dps: ValuesArray = null

      Data per streamline for tractography, see TRK format. Default is null (not tractograpgy)

    • dpv: ValuesArray = null

      Data per vertex for tractography, see TRK format. Default is null (not tractograpgy)

    • colorbarVisible: boolean = true

      does this mesh display a colorbar

    • anatomicalStructurePrimary: string = ''

      region for mesh. Default is an empty string

    Returns NVMesh

Methods

  • load and return a new NVMesh instance from a base64 encoded string

    Parameters

    • __namedParameters: Partial<LoadFromBase64Params> = {}

    Returns Promise<NVMesh>

  • factory function to load and return a new NVMesh instance from a file in the browser

    Parameters

    • __namedParameters: Partial<LoadFromFileParams> = {}

    Returns Promise<NVMesh>

    NVMesh instance

  • factory function to load and return a new NVMesh instance from a given URL

    Parameters

    • __namedParameters: Partial<LoadFromUrlParams> = {}

    Returns Promise<NVMesh>