Newer
Older
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { PluginStateObject } from '../../../state/objects';
import { VolumeIsoValue } from '../../../../mol-model/volume';
import { Structure } from '../../../../mol-model/structure';
export class VolumeServerInfo extends PluginStateObject.Create<VolumeServerInfo.Data>({ name: 'Volume Streaming', typeClass: 'Object' }) { }
export namespace VolumeServerInfo {
// for em, the EMDB access code, for x-ray, the PDB id
dataId: string,
header: VolumeServerHeader,
emDefaultContourLevel?: VolumeIsoValue,
structure: Structure
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
}
}
export interface VolumeServerHeader {
/** Format version number */
formatVersion: string,
/** Axis order from the slowest to fastest moving, same as in CCP4 */
axisOrder: number[],
/** Origin in fractional coordinates, in axisOrder */
origin: number[],
/** Dimensions in fractional coordinates, in axisOrder */
dimensions: number[],
spacegroup: VolumeServerHeader.Spacegroup,
channels: string[],
/** Determines the data type of the values */
valueType: VolumeServerHeader.ValueType,
/** The value are stored in blockSize^3 cubes */
blockSize: number,
sampling: VolumeServerHeader.Sampling[],
/** Precision data the server can show. */
availablePrecisions: VolumeServerHeader.DetailLevel[],
isAvailable: boolean
}
export namespace VolumeServerHeader {
export type ValueType = 'float32' | 'int8'
export namespace ValueType {
export const Float32: ValueType = 'float32';
export const Int8: ValueType = 'int8';
}
export type ValueArray = Float32Array | Int8Array
export type DetailLevel = { precision: number, maxVoxels: number }
export interface Spacegroup {
number: number,
size: number[],
angles: number[],
/** Determine if the data should be treated as periodic or not. (e.g. X-ray = periodic, EM = not periodic) */
isPeriodic: boolean,
}
export interface ValuesInfo {
mean: number,
sigma: number,
min: number,
max: number
}
export interface Sampling {
byteOffset: number,
/** How many values along each axis were collapsed into 1 */
rate: number,
valuesInfo: ValuesInfo[],
/** Number of samples along each axis, in axisOrder */
sampleCount: number[]
}
}