Skip to content
Snippets Groups Projects
Commit cfaef4c5 authored by Alexander Rose's avatar Alexander Rose
Browse files

added more volume param docs

parent 3ec2c6de
No related branches found
No related tags found
No related merge requests found
...@@ -92,15 +92,15 @@ export namespace VolumeStreaming { ...@@ -92,15 +92,15 @@ export namespace VolumeStreaming {
topRight: PD.Vec3(box.max), topRight: PD.Vec3(box.max),
}, { description: 'Static box defined by cartesian coords.', isFlat: true }), }, { description: 'Static box defined by cartesian coords.', isFlat: true }),
'selection-box': PD.Group({ 'selection-box': PD.Group({
radius: PD.Numeric(5, { min: 0, max: 50, step: 0.5 }), radius: PD.Numeric(5, { min: 0, max: 50, step: 0.5 }, { description: 'Radius in \u212B within which the volume is shown.' }),
bottomLeft: PD.Vec3(Vec3.create(0, 0, 0), { isHidden: true }), bottomLeft: PD.Vec3(Vec3.create(0, 0, 0), { isHidden: true }),
topRight: PD.Vec3(Vec3.create(0, 0, 0), { isHidden: true }), topRight: PD.Vec3(Vec3.create(0, 0, 0), { isHidden: true }),
}, { description: 'Box around last-interacted element.', isFlat: true }), }, { description: 'Box around last-interacted element.', isFlat: true }),
'cell': PD.Group({}), 'cell': PD.Group({}),
// 'auto': PD.Group({ }), // TODO based on camera distance/active selection/whatever, show whole structure or slice. // 'auto': PD.Group({ }), // TODO based on camera distance/active selection/whatever, show whole structure or slice.
}, { options: ViewTypeOptions as any }), }, { options: ViewTypeOptions, description: 'Controls what of the volume is displayed. "Off" hides the volume alltogether. "Bounded box" shows the volume inside the given box. "Arround Interaction" shows the volume around the element/atom last interacted with. "Whole Structure" shows the volume for the whole structure.' }),
detailLevel: PD.Select<number>(Math.min(3, info.header.availablePrecisions.length - 1), detailLevel: PD.Select<number>(Math.min(3, info.header.availablePrecisions.length - 1),
info.header.availablePrecisions.map((p, i) => [i, `${i + 1} [ ${Math.pow(p.maxVoxels, 1 / 3) | 0}^3 cells ]`] as [number, string])), info.header.availablePrecisions.map((p, i) => [i, `${i + 1} [ ${Math.pow(p.maxVoxels, 1 / 3) | 0}^3 cells ]`] as [number, string]), { description: 'Determines the maximum number of voxels. Depending on the size of the volume options are in the range from 0 (0.52M voxels) to 6 (25.17M voxels).' }),
channels: info.kind === 'em' channels: info.kind === 'em'
? PD.Group({ ? PD.Group({
'em': channelParam('EM', Color(0x638F8F), info.emDefaultContourLevel || VolumeIsoValue.relative(1), info.header.sampling[0].valuesInfo[0], channelParams['em']) 'em': channelParam('EM', Color(0x638F8F), info.emDefaultContourLevel || VolumeIsoValue.relative(1), info.header.sampling[0].valuesInfo[0], channelParams['em'])
...@@ -113,7 +113,7 @@ export namespace VolumeStreaming { ...@@ -113,7 +113,7 @@ export namespace VolumeStreaming {
}; };
} }
export const ViewTypeOptions = [['off', 'Off'], ['box', 'Bounded Box'], ['selection-box', 'Surroundings'], ['cell', 'Whole Structure']]; export const ViewTypeOptions = [['off', 'Off'], ['box', 'Bounded Box'], ['selection-box', 'Around Interaction'], ['cell', 'Whole Structure']] as [ViewTypes, string][];
export type ViewTypes = 'off' | 'box' | 'selection-box' | 'cell' export type ViewTypes = 'off' | 'box' | 'selection-box' | 'cell'
......
...@@ -14,11 +14,12 @@ import { ParameterControls, ParamOnChange } from '../controls/parameters'; ...@@ -14,11 +14,12 @@ import { ParameterControls, ParamOnChange } from '../controls/parameters';
import { Slider } from '../controls/slider'; import { Slider } from '../controls/slider';
import { VolumeIsoValue, VolumeData } from '../../../mol-model/volume'; import { VolumeIsoValue, VolumeData } from '../../../mol-model/volume';
import { Vec3 } from '../../../mol-math/linear-algebra'; import { Vec3 } from '../../../mol-math/linear-algebra';
import { ColorNames } from '../../../mol-util/color/names';
const ChannelParams = { const ChannelParams = {
color: PD.Color(0 as any), color: PD.Color(ColorNames.black, { description: 'Display color of the volume.' }),
wireframe: PD.Boolean(false), wireframe: PD.Boolean(false, { description: 'Control display of the volume as a wireframe.' }),
opacity: PD.Numeric(0.3, { min: 0, max: 1, step: 0.01 }) opacity: PD.Numeric(0.3, { min: 0, max: 1, step: 0.01 }, { description: 'Opacity of the volume.' })
}; };
type ChannelParams = PD.Values<typeof ChannelParams> type ChannelParams = PD.Values<typeof ChannelParams>
...@@ -180,7 +181,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf ...@@ -180,7 +181,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf
// TODO: factor common things out // TODO: factor common things out
const OptionsParams = { const OptionsParams = {
entry: PD.Select(params.entry.name, b.data.entries.map(info => [info.dataId, info.dataId] as [string, string])), entry: PD.Select(params.entry.name, b.data.entries.map(info => [info.dataId, info.dataId] as [string, string]), { description: 'Which entry with volume data to display.' }),
view: PD.MappedStatic(params.entry.params.view.name, { view: PD.MappedStatic(params.entry.params.view.name, {
'off': PD.Group({}, { description: 'Display off.' }), 'off': PD.Group({}, { description: 'Display off.' }),
'box': PD.Group({ 'box': PD.Group({
...@@ -190,7 +191,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf ...@@ -190,7 +191,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf
isRelative: PD.Boolean(isRelative, { description: 'Use relative or absolute iso values.' }) isRelative: PD.Boolean(isRelative, { description: 'Use relative or absolute iso values.' })
}, { description: 'Static box defined by cartesian coords.' }), }, { description: 'Static box defined by cartesian coords.' }),
'selection-box': PD.Group({ 'selection-box': PD.Group({
radius: PD.Numeric(5, { min: 0, max: 50, step: 0.5 }), radius: PD.Numeric(5, { min: 0, max: 50, step: 0.5 }, { description: 'Radius in \u212B within which the volume is shown.' }),
detailLevel, detailLevel,
isRelative: PD.Boolean(isRelative, { description: 'Use relative or absolute iso values.' }) isRelative: PD.Boolean(isRelative, { description: 'Use relative or absolute iso values.' })
}, { description: 'Box around last-interacted element.' }), }, { description: 'Box around last-interacted element.' }),
...@@ -199,7 +200,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf ...@@ -199,7 +200,7 @@ export class VolumeStreamingCustomControls extends PluginUIComponent<StateTransf
isRelative: PD.Boolean(isRelative, { description: 'Use relative or absolute iso values.' }) isRelative: PD.Boolean(isRelative, { description: 'Use relative or absolute iso values.' })
}, { description: 'Box around the structure\'s bounding box.' }), }, { description: 'Box around the structure\'s bounding box.' }),
// 'auto': PD.Group({ }), // TODO based on camera distance/active selection/whatever, show whole structure or slice. // 'auto': PD.Group({ }), // TODO based on camera distance/active selection/whatever, show whole structure or slice.
}, { options: [['off', 'Off'], ['box', 'Bounded Box'], ['selection-box', 'Surroundings'], ['cell', 'Whole Structure']] }) }, { options: [['off', 'Off'], ['box', 'Bounded Box'], ['selection-box', 'Surroundings'], ['cell', 'Whole Structure']], description: 'Controls what of the volume is displayed. "Off" hides the volume alltogether. "Bounded box" shows the volume inside the given box. "Arround Interaction" shows the volume around the element/atom last interacted with. "Whole Structure" shows the volume for the whole structure.' })
}; };
const options = { const options = {
entry: params.entry.name, entry: params.entry.name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment