Skip to content
Snippets Groups Projects
Commit d733ec7a authored by David Sehnal's avatar David Sehnal
Browse files

wip volume streaming

parent ed7cd5dc
No related branches found
No related tags found
No related merge requests found
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { PluginBehavior } from 'mol-plugin/behavior';
import { PluginStateObject } from 'mol-plugin/state/objects';
export class VolumeStreaming extends PluginStateObject.CreateBehavior<VolumeStreaming.Behavior>({ name: 'Volume Streaming' }) { }
export namespace VolumeStreaming {
export interface BehaviorParams {
}
export class Behavior implements PluginBehavior<{}> {
register(ref: string): void {
throw new Error('Method not implemented.');
}
unregister(): void {
throw new Error('Method not implemented.');
}
}
}
\ No newline at end of file
/**
* 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';
export class VolumeServerInfo extends PluginStateObject.Create<VolumeServerInfo.Data>({ name: 'Volume Streaming', typeClass: 'Object' }) { }
export namespace VolumeServerInfo {
export interface Data {
serverUrl: string,
kind: 'x-ray' | 'em',
// for em, the EMDB access code, for x-ray, the PDB id
dataId: string,
header: VolumeServerHeader
}
}
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[]
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment