Skip to main content

Class: Surface

Surface class for storing surface data Each Surface represents a single segment in a 3D volume.

Constructors​

new Surface()​

new Surface(props): Surface

Creates an instance of Surface.

Parameters​

• props: SurfaceData

The properties to initialize the Surface with.

Returns​

Surface

Defined in​

packages/core/src/cache/classes/Surface.ts:24

Properties​

frameOfReferenceUID​

readonly frameOfReferenceUID: string

Defined in​

packages/core/src/cache/classes/Surface.ts:12


id​

readonly id: string

Defined in​

packages/core/src/cache/classes/Surface.ts:10


sizeInBytes​

readonly sizeInBytes: number

Defined in​

packages/core/src/cache/classes/Surface.ts:11

Accessors​

centroid​

get centroid(): Point3

Gets the centroid of the surface.

Returns​

Point3

The centroid of the surface.

Defined in​

packages/core/src/cache/classes/Surface.ts:144


color​

get color(): RGB

Gets the color of the surface.

set color(color): void

Sets the color of the surface.

Parameters​

• color: RGB

The new color for the surface.

Returns​

RGB

The color of the surface.

Defined in​

packages/core/src/cache/classes/Surface.ts:72


flatPointsArray​

get flatPointsArray(): number[]

Gets a flat array of all points.

Returns​

number[]

A flat array of all points.

Defined in​

packages/core/src/cache/classes/Surface.ts:152


points​

get points(): number[]

Gets the points of the surface.

set points(points): void

Sets the points of the surface and updates the centroid.

Parameters​

• points: number[]

The new points for the surface.

Returns​

number[]

The points of the surface.

Defined in​

packages/core/src/cache/classes/Surface.ts:88


polys​

get polys(): number[]

Gets the polygons of the surface.

set polys(polys): void

Sets the polygons of the surface.

Parameters​

• polys: number[]

The new polygons for the surface.

Returns​

number[]

The polygons of the surface.

Defined in​

packages/core/src/cache/classes/Surface.ts:105


segmentIndex​

get segmentIndex(): number

Gets the segment index of the surface.

Returns​

number

The segment index of the surface.

Defined in​

packages/core/src/cache/classes/Surface.ts:121


totalNumberOfPoints​

get totalNumberOfPoints(): number

Gets the total number of points in the surface.

Returns​

number

The total number of points.

Defined in​

packages/core/src/cache/classes/Surface.ts:160


visible​

get visible(): boolean

Gets the visibility of the surface.

set visible(visible): void

Sets the visibility of the surface.

Parameters​

• visible: boolean

The new visibility for the surface.

Returns​

boolean

Defined in​

packages/core/src/cache/classes/Surface.ts:128