/** * Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Adam Midlik * @author Aliaksei Chareshneu */ import { Mesh } from 'molstar/lib/mol-geo/geometry/mesh/mesh'; import { CifFile } from 'molstar/lib/mol-io/reader/cif'; import { Box3D } from 'molstar/lib/mol-math/geometry'; import { Shape } from 'molstar/lib/mol-model/shape'; import { PluginStateObject } from 'molstar/lib/mol-plugin-state/objects'; import { PluginContext } from 'molstar/lib/mol-plugin/context'; import { StateObjectRef, StateObjectSelector, StateTransformer } from 'molstar/lib/mol-state'; import { Color } from 'molstar/lib/mol-util/color'; import { ParamDefinition as PD } from 'molstar/lib/mol-util/param-definition'; export declare const BACKGROUND_SEGMENT_VOLUME_THRESHOLD = 0.5; export declare const BACKGROUND_OPACITY = 0.2; export declare const FOREROUND_OPACITY = 1; export declare const VolsegTransform: StateTransformer.Builder.Root; export declare const isMeshlistData: (value: MeshlistData) => value is MeshlistData; /** Data type for `MeshlistStateObject` - list of meshes */ export interface MeshlistData { segmentId: number; segmentName: string; detail: number; meshIds: number[]; mesh: Mesh; /** Reference to the object which created this meshlist (e.g. `MeshStreaming.Behavior`) */ ownerId?: string; segmentationId?: string; } export declare namespace MeshlistData { function empty(): MeshlistData; function fromCIF(data: CifFile, segmentId: number, segmentName: string, detail: number): Promise; function stats(meshListData: MeshlistData): string; function getShape(data: MeshlistData, color: Color): Shape; function combineBBoxes(boxes: (Box3D | null)[]): Box3D | null; function bbox(data: MeshlistData): Box3D | null; function allVerticesUsed(data: MeshlistData): boolean; } declare const MeshlistStateObject_base: { new (data: MeshlistData, props?: { label: string; description?: string | undefined; } | undefined): { /** Reference to the object which created this meshlist (e.g. `MeshStreaming.Behavior`) */ id: import("molstar/lib/mol-util").UUID; type: PluginStateObject.TypeInfo; label: string; description?: string | undefined; data: MeshlistData; }; type: PluginStateObject.TypeInfo; is(obj?: import("molstar/lib/mol-state").StateObject> | undefined): obj is import("molstar/lib/mol-state").StateObject; }; export declare class MeshlistStateObject extends MeshlistStateObject_base { } export declare const ParseMeshlistTransformer: StateTransformer>; export declare const MeshShapeTransformer: StateTransformer>; declare const meshSegmentParams: { id: PD.Numeric; label: PD.Text; color: PD.Color; detail: PD.Numeric; }; export type meshSegmentParamsValues = PD.Values; export declare const VolsegMeshDataParams: { meshSegmentParams: PD.ObjectList>; }; export type VolsegMeshDataParamsValues = PD.Values; export type MeshData = { meshSegmentParams: meshSegmentParamsValues; parsedCif: CifFile; }; export declare class VolsegMeshData { meshData: MeshData[]; constructor(meshData: MeshData[]); } declare const VolsegMeshSegmentation_base: { new (data: VolsegMeshData, props?: { label: string; description?: string | undefined; } | undefined): { /** Reference to the object which created this meshlist (e.g. `MeshStreaming.Behavior`) */ id: import("molstar/lib/mol-util").UUID; type: PluginStateObject.TypeInfo; label: string; description?: string | undefined; data: VolsegMeshData; }; type: PluginStateObject.TypeInfo; is(obj?: import("molstar/lib/mol-state").StateObject> | undefined): obj is import("molstar/lib/mol-state").StateObject; }; export declare class VolsegMeshSegmentation extends VolsegMeshSegmentation_base { } export declare const CreateMeshlistStateObject: StateTransformer>; /** Download data and create state tree hierarchy down to visual representation. */ export declare function createMeshFromUrl(plugin: PluginContext, meshDataUrl: string, segmentId: number, detail: number, collapseTree: boolean, color?: Color, parent?: StateObjectSelector | StateObjectRef, transparentIfBboxAbove?: number, name?: string, ownerId?: string): Promise; export {};