NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import VolumeComponent from 'ngl/src/component/volume-component.js'
public class | source

VolumeComponent

Extends:

Component → VolumeComponent

Component wrapping a Volume object

Example:

// get a volume component by loading a volume file into the stage
stage.loadFile( "url/for/volume" ).then( function( volumeComponent ){
    volumeComponent.addRepresentation( "surface" );
    volumeComponent.autoView();
} );

Constructor Summary

Public Constructor
public

constructor(stage: Stage, volume: Volume, params: ComponentParameters)

Member Summary

Public Members
public get

Component type

public

Method Summary

Public Methods
public

addRepresentation(type: String, params: VolumeRepresentationParameters): RepresentationComponent

Add a new volume representation to the component

public
public
public

Inherited Summary

From class Component
public get
public
public
public
public
public
public
public
public
public

Events emitted by the component

public
public
public
public
public
public
public

addAnnotation(position: Vector3, content: String | Element, params: Object): Annotation

Add an anotation object

public
public

Add a new representation to the component

public

autoView(duration: Integer): undefined

Automatically center and zoom the component

public
public

Iterator over each annotation and executing the callback

public

Iterator over each representation and executing the callback

public
public abstract
public
public
public
public
public

Remove all annotations from the component

public

Removes all representation components

public

Remove the give annotation from the component

public

Removes a representation component

public
public

Set position transform

public

Set rotation transform

public

Set scale transform

public
public

Set general transform.

public

Set the visibility of the component, including added representations

public
public

Public Constructors

public constructor(stage: Stage, volume: Volume, params: ComponentParameters) source

Override:

Component#constructor

Params:

NameTypeAttributeDescription
stage Stage

stage object the component belongs to

volume Volume

volume object to wrap

params ComponentParameters

component parameters

Public Members

public get type: String source

Component type

Override:

Component#type

public volume source

Public Methods

public addRepresentation(type: String, params: VolumeRepresentationParameters): RepresentationComponent source

Add a new volume representation to the component

Override:

Component#addRepresentation

Params:

NameTypeAttributeDescription
type String

the name of the representation, one of: surface, dot.

params VolumeRepresentationParameters

representation parameters

Return:

RepresentationComponent

the created representation wrapped into a representation component object

public dispose() source

Override:

Component#dispose

public getBoxUntransformed() source

Override:

Component#getBoxUntransformed

public getCenterUntransformed() source

Override:

Component#getCenterUntransformed