daiquiri-ui 2025.12.1__py3-none-any.whl → 2026.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- daiquiri_ui/__init__.py +0 -1
- daiquiri_ui/static/assets/Anchor-0b4a3d33.js +1 -0
- daiquiri_ui/static/assets/AutoscaleOption-3cb99678.js +1 -0
- daiquiri_ui/static/assets/{BPMVideoStream-7dfae0bb.js → BPMVideoStream-c3e09e8b.js} +1 -1
- daiquiri_ui/static/assets/{CanvasEnhancer-16124b1e.js → CanvasEnhancer-dd82c090.js} +1 -1
- daiquiri_ui/static/assets/ColorMap-be59ad21.js +1 -0
- daiquiri_ui/static/assets/CompositeMap-c93f5466.js +1 -0
- daiquiri_ui/static/assets/{ConnectUtils-b8bfa186.js → ConnectUtils-3923fa2f.js} +1 -1
- daiquiri_ui/static/assets/{Console-42bf9fd1.js → Console-d0028912.js} +1 -1
- daiquiri_ui/static/assets/{Cross-d0a1a410.js → Cross-d5df0df3.js} +1 -1
- daiquiri_ui/static/assets/{CrossMarker-2285e102.js → CrossMarker-71cd11cf.js} +2 -2
- daiquiri_ui/static/assets/DraggableRect-25d91c7d.js +1 -0
- daiquiri_ui/static/assets/DropdownButton-29cc265b.js +1 -0
- daiquiri_ui/static/assets/DropdownDetector-5016908a.js +1 -0
- daiquiri_ui/static/assets/{Editor-8c26c281.js → Editor-7b500b85.js} +9 -9
- daiquiri_ui/static/assets/EditorTree-7fc000d8.js +1 -0
- daiquiri_ui/static/assets/H5Viewer-d1305c58.js +1 -0
- daiquiri_ui/static/assets/{H5WebCurvePlot-136dfa6f.js → H5WebCurvePlot-61b08211.js} +1 -1
- daiquiri_ui/static/assets/HSegment-8d2c001e.js +43 -0
- daiquiri_ui/static/assets/HardwareButton-af41c610.js +1 -0
- daiquiri_ui/static/assets/Hdf5Plot-bbffc65f.js +1 -0
- daiquiri_ui/static/assets/{HistogramDomainSlider-5572e533.js → HistogramDomainSlider-304bdab4.js} +1 -1
- daiquiri_ui/static/assets/Image-ee61818a.js +1 -0
- daiquiri_ui/static/assets/Label-9d8979b3.js +1 -0
- daiquiri_ui/static/assets/{LoadingMessage-e1e479c5.js → LoadingMessage-03b4fa4f.js} +1 -1
- daiquiri_ui/static/assets/NewScanButton-0051d220.js +1 -0
- daiquiri_ui/static/assets/NewScanButton-57cf0c17.js +1 -0
- daiquiri_ui/static/assets/OptionsProcess-da629bfb.js +1 -0
- daiquiri_ui/static/assets/ParametersList-2d01832f.js +1 -0
- daiquiri_ui/static/assets/RectRoi-3693cc65.js +1 -0
- daiquiri_ui/static/assets/RectRuler-1fee3fd8.js +543 -0
- daiquiri_ui/static/assets/RulerButton-a95a6035.js +139 -0
- daiquiri_ui/static/assets/SampleDCList-dce0bd2b.js +1 -0
- daiquiri_ui/static/assets/SampleRegistration-544aa4bd.js +1 -0
- daiquiri_ui/static/assets/SavingButton-c3efc92c.js +1 -0
- daiquiri_ui/static/assets/ScanDataService-16f29ecd.js +1 -0
- daiquiri_ui/static/assets/ScanPlot0d-67c76bfe.js +1 -0
- daiquiri_ui/static/assets/ScanPlot0dValue-c0dd01b5.js +1 -0
- daiquiri_ui/static/assets/ScanPlot1d-3c930b95.js +1 -0
- daiquiri_ui/static/assets/ScanPlot1d-ee33c98b.js +1 -0
- daiquiri_ui/static/assets/{ScanPlot2d-c49ba2bc.js → ScanPlot2d-af57d8ad.js} +1 -1
- daiquiri_ui/static/assets/{ScanTable-4e677d2b.js → ScanTable-bc13760e.js} +1 -1
- daiquiri_ui/static/assets/ScanValue-00aab91b.js +1 -0
- daiquiri_ui/static/assets/SceneScale-e2a42af2.js +1 -0
- daiquiri_ui/static/assets/SchemaForm-7d897a32.js +1 -0
- daiquiri_ui/static/assets/{ScreenScale-ae820d30.js → ScreenScale-b2417934.js} +1 -1
- daiquiri_ui/static/assets/{SelectionPoint-d30865f3.js → SelectionPoint-a2cb4dfc.js} +1 -1
- daiquiri_ui/static/assets/{StackedNameState-3f198174.js → StackedNameState-4e8dc742.js} +1 -1
- daiquiri_ui/static/assets/Statistics.worker-54a0d965.js +46 -0
- daiquiri_ui/static/assets/{Synoptic-0f3dac61.js → Synoptic-8a3c67f3.js} +5 -5
- daiquiri_ui/static/assets/TomoAlign-b80a68c3.js +7 -0
- daiquiri_ui/static/assets/TomoBeamShaping-65a115e9.js +1 -0
- daiquiri_ui/static/assets/TomoDetector-500d46af.js +1 -0
- daiquiri_ui/static/assets/TomoDetector-e04a5a8b.js +1 -0
- daiquiri_ui/static/assets/TomoDetectorView-952499e6.js +64 -0
- daiquiri_ui/static/assets/TomoHolo-db2c8449.js +1 -0
- daiquiri_ui/static/assets/TomoPusherView-a50e2acd.js +1 -0
- daiquiri_ui/static/assets/TomoReconstructedSinogram-deee0779.js +191 -0
- daiquiri_ui/static/assets/TomoScanInfo-972a690b.js +1 -0
- daiquiri_ui/static/assets/{TomoScanList-d9bea762.js → TomoScanList-ede05c2a.js} +1 -1
- daiquiri_ui/static/assets/TomoService-e9741d6a.js +1 -0
- daiquiri_ui/static/assets/TomoSinogram-dce5808e.js +1 -0
- daiquiri_ui/static/assets/TomoTiling-04701bb7.js +69 -0
- daiquiri_ui/static/assets/TwoD-fee9523f.js +3 -0
- daiquiri_ui/static/assets/TwoDObject-2f30deac.js +1 -0
- daiquiri_ui/static/assets/TwoDObjectList-458e4824.js +1 -0
- daiquiri_ui/static/assets/{UseMouseModeInteraction-fc86164b.js → UseMouseModeInteraction-51c6269c.js} +1 -1
- daiquiri_ui/static/assets/VLineRoi-b38fe841.js +1 -0
- daiquiri_ui/static/assets/{VSegment-cf1ceafc.js → VSegment-f0d42c9a.js} +2 -2
- daiquiri_ui/static/assets/VSegmentRoi-d5e035cc.js +1 -0
- daiquiri_ui/static/assets/{VideoStream-4b855f43.js → VideoStream-a5200b21.js} +1 -1
- daiquiri_ui/static/assets/{VisViewpointRestore-097e2edf.js → VisViewpointRestore-4aa338ea.js} +3 -3
- daiquiri_ui/static/assets/{WorldScale-6e6ac5b5.js → WorldScale-23bd1dfb.js} +1 -1
- daiquiri_ui/static/assets/{ZoomPanCanvas-8f437b75.js → ZoomPanCanvas-23b61dbb.js} +1 -1
- daiquiri_ui/static/assets/{colormap-344855f8.js → colormap-6e43299c.js} +1 -1
- daiquiri_ui/static/assets/fontawesomemore-webfont-6ae56ae3.woff2 +0 -0
- daiquiri_ui/static/assets/{geometry-1fc3c1a0.js → geometry-cd448ec1.js} +1 -1
- daiquiri_ui/static/assets/hooks-171c0765.js +1 -0
- daiquiri_ui/static/assets/{hooks-cf59b64f.js → hooks-e0d9229c.js} +1 -1
- daiquiri_ui/static/assets/index-779a56ef.css +9 -0
- daiquiri_ui/static/assets/{index-a0f7b98c.js → index-a9bb7636.js} +7 -7
- daiquiri_ui/static/assets/index-b3c0133a.js +3576 -0
- daiquiri_ui/static/assets/{plotly-basic-889d4727.js → plotly-basic-ccc5794d.js} +2 -2
- daiquiri_ui/static/assets/{plotly-gl2d-e2e89493.js → plotly-gl2d-345cb34a.js} +2 -2
- daiquiri_ui/static/assets/store-5d136a2c.js +1 -0
- daiquiri_ui/static/assets/{types-46afffa0.js → types-c366a377.js} +1 -1
- daiquiri_ui/static/index.html +2 -2
- daiquiri_ui/static/meta.json +1 -1
- {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/METADATA +1 -1
- daiquiri_ui-2026.2.0.dist-info/RECORD +134 -0
- {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/WHEEL +1 -1
- daiquiri_ui/static/assets/Anchor-3fa6d19c.js +0 -1
- daiquiri_ui/static/assets/AutoscaleOption-d8d0ca8d.js +0 -1
- daiquiri_ui/static/assets/DraggableRect-db33e02e.js +0 -1
- daiquiri_ui/static/assets/DropdownButton-d066ece0.js +0 -1
- daiquiri_ui/static/assets/DropdownDetector-4ddfa946.js +0 -1
- daiquiri_ui/static/assets/EditorTree-b390ece1.js +0 -1
- daiquiri_ui/static/assets/H5Viewer-bbcf29f5.js +0 -1
- daiquiri_ui/static/assets/HSegment-8966b13f.js +0 -43
- daiquiri_ui/static/assets/HardwareButton-2e65150e.js +0 -1
- daiquiri_ui/static/assets/Hdf5Plot-3b35de75.js +0 -1
- daiquiri_ui/static/assets/Image-1ff7dca9.js +0 -1
- daiquiri_ui/static/assets/Label-3c95fb14.js +0 -1
- daiquiri_ui/static/assets/NewScanButton-25f65a41.js +0 -1
- daiquiri_ui/static/assets/NewScanButton-f40700e9.js +0 -1
- daiquiri_ui/static/assets/OptionsProcess-6fd11ce7.js +0 -1
- daiquiri_ui/static/assets/ParametersList-c91938bf.js +0 -1
- daiquiri_ui/static/assets/RectRoi-19381507.js +0 -1
- daiquiri_ui/static/assets/RulerButton-5c2020aa.js +0 -139
- daiquiri_ui/static/assets/SampleDCList-64bd9100.js +0 -1
- daiquiri_ui/static/assets/SampleRegistration-a354b270.js +0 -1
- daiquiri_ui/static/assets/SavingButton-c1839199.js +0 -1
- daiquiri_ui/static/assets/ScanPlot0d-d180ecd3.js +0 -1
- daiquiri_ui/static/assets/ScanPlot0dValue-0e33cb2c.js +0 -1
- daiquiri_ui/static/assets/ScanPlot1d-38bddb23.js +0 -1
- daiquiri_ui/static/assets/ScanPlot1d-543e4ac4.js +0 -1
- daiquiri_ui/static/assets/ScanValue-a303a86d.js +0 -1
- daiquiri_ui/static/assets/SceneScale-33094e68.js +0 -1
- daiquiri_ui/static/assets/SchemaForm-b27ccd55.js +0 -1
- daiquiri_ui/static/assets/TomoAlign-03e37551.js +0 -4
- daiquiri_ui/static/assets/TomoBeamShaping-6ec15838.js +0 -1
- daiquiri_ui/static/assets/TomoDetector-aead72a5.js +0 -1
- daiquiri_ui/static/assets/TomoDetectorView-aadf1539.js +0 -64
- daiquiri_ui/static/assets/TomoHolo-7eb20a1e.js +0 -1
- daiquiri_ui/static/assets/TomoReconstructedSinogram-53bbfb3b.js +0 -191
- daiquiri_ui/static/assets/TomoScanInfo-5ca06333.js +0 -1
- daiquiri_ui/static/assets/TomoSinogram-ecd9dca2.js +0 -1
- daiquiri_ui/static/assets/TomoTiling-1b9f4bf4.js +0 -69
- daiquiri_ui/static/assets/TwoD-ca5cd677.js +0 -3
- daiquiri_ui/static/assets/TwoDObject-86b91ffb.js +0 -1
- daiquiri_ui/static/assets/TwoDObjectList-143af6e7.js +0 -1
- daiquiri_ui/static/assets/VLineRoi-5130fa5a.js +0 -1
- daiquiri_ui/static/assets/colors-2395de5a.js +0 -1
- daiquiri_ui/static/assets/fontawesomemore-webfont-97d0220a.woff2 +0 -0
- daiquiri_ui/static/assets/hooks-457bfe32.js +0 -1
- daiquiri_ui/static/assets/index-0751d893.js +0 -3576
- daiquiri_ui/static/assets/index-f085dfca.css +0 -9
- daiquiri_ui/static/assets/store-c3eddf46.js +0 -1
- daiquiri_ui/static/resources/shaders/compare.frag.glsl +0 -386
- daiquiri_ui/static/resources/shaders/compare.vert.glsl +0 -11
- daiquiri_ui-2025.12.1.dist-info/RECORD +0 -128
- {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/licenses/LICENSE +0 -0
- {daiquiri_ui-2025.12.1.dist-info → daiquiri_ui-2026.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import{P as S,r as b,j as e,ay as I,aj as Z,B as ee,aM as H,a7 as C,bP as ae,aN as E,b8 as O,aO as $,a_ as _,bQ as G,ax as te,aP as V}from"./index-0751d893.js";import{O as X,u as T,b as Q,Q as U}from"./index-a0f7b98c.js";import{t as q}from"./QtyHelper-8429914f.js";import{k as J}from"./hooks-457bfe32.js";import{c as Y}from"./colors-2395de5a.js";import{A as N}from"./Anchor-3fa6d19c.js";import{b as oe}from"./UseMouseModeInteraction-fc86164b.js";import{a as ne}from"./types-46afffa0.js";const se={id:S.string,toggleLabel:S.string,href:S.string,target:S.string,onClick:S.func,title:S.node.isRequired,type:S.string,disabled:S.bool,align:ne,menuRole:S.string,renderMenuOnMount:S.bool,rootCloseEvent:S.string,flip:S.bool,bsPrefix:S.string,variant:S.string,size:S.string},B=b.forwardRef(({id:c,bsPrefix:a,size:t,variant:n,title:l,type:u="button",toggleLabel:d="Toggle dropdown",children:o,onClick:s,href:g,target:r,menuRole:v,renderMenuOnMount:m,rootCloseEvent:p,flip:x,...h},f)=>e.jsxs(I,{ref:f,...h,as:Z,children:[e.jsx(ee,{size:t,variant:n,disabled:h.disabled,bsPrefix:a,href:g,target:r,onClick:s,type:u,children:l}),e.jsx(I.Toggle,{split:!0,id:c,size:t,variant:n,disabled:h.disabled,childBsPrefix:a,children:e.jsx("span",{className:"visually-hidden",children:d})}),e.jsx(I.Menu,{role:v,renderOnMount:m,rootCloseEvent:p,flip:x,children:o})]}));B.propTypes=se;B.displayName="SplitButton";const re=B;class le extends ${constructor(){super({uniforms:{color:{value:new _},gapColor:{value:new _},dashSize:{value:0},gapSize:{value:0},scaleX:{value:0},scaleY:{value:0},origin:{value:new C},direction:{value:new C},lineWidth:{value:0}},vertexShader:`
|
|
2
|
-
uniform float scaleX; // signed scale
|
|
3
|
-
uniform float scaleY; // signed scale
|
|
4
|
-
uniform vec2 origin;
|
|
5
|
-
uniform vec2 direction;
|
|
6
|
-
out vec2 pixelCoord;
|
|
7
|
-
|
|
8
|
-
void main() {
|
|
9
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
10
|
-
vec2 p = vec2(position.x, position.y) - origin;
|
|
11
|
-
float l = dot(p, direction);
|
|
12
|
-
float d = dot(p, vec2(-direction.y, direction.x));
|
|
13
|
-
float scale = (abs(scaleX) + abs(scaleY)) * 0.5;
|
|
14
|
-
pixelCoord = vec2(l, d / scale);
|
|
15
|
-
}
|
|
16
|
-
`,fragmentShader:`
|
|
17
|
-
uniform vec4 color;
|
|
18
|
-
uniform vec4 gapColor;
|
|
19
|
-
uniform float gapSize;
|
|
20
|
-
uniform float dashSize;
|
|
21
|
-
uniform float lineWidth;
|
|
22
|
-
|
|
23
|
-
in vec2 pixelCoord;
|
|
24
|
-
|
|
25
|
-
void main() {
|
|
26
|
-
float alpha;
|
|
27
|
-
if (lineWidth >= 1.0) {
|
|
28
|
-
alpha = smoothstep(0.5, 0.0, abs(pixelCoord.y) - lineWidth * 0.5);
|
|
29
|
-
} else {
|
|
30
|
-
// simulate line thiner than 1px with alpha
|
|
31
|
-
alpha = lineWidth;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (dashSize == 0.0) {
|
|
35
|
-
gl_FragColor = vec4(color.r, color.g, color.b, alpha * color.a);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
float dist = abs(pixelCoord.x);
|
|
40
|
-
dist = mod(dist, (dashSize + gapSize));
|
|
41
|
-
if (dist <= dashSize) {
|
|
42
|
-
gl_FragColor = vec4(color.r, color.g, color.b, alpha * color.a);
|
|
43
|
-
} else {
|
|
44
|
-
gl_FragColor = vec4(gapColor.r, gapColor.g, gapColor.b, alpha * gapColor.a);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
`})}}H({LineWithDataDashMaterial:le});function W(c){const{p1:a,p2:t,lineWidth:n=1,color:l="black",gapColor:u,dashSize:d=0,gapSize:o=d,opacity:s=1,zIndex:g=0}=c,r=b.useRef(null),v=J(),[m,p,x]=b.useMemo(()=>{const h=new C(t[0]-a[0],t[1]-a[1]).normalize(),i=new C(-h.y,h.x).multiplyScalar(n+1),y=new ae;return y.moveTo(a[0]-i.x,a[1]-i.y),y.lineTo(a[0]+i.x,a[1]+i.y),y.lineTo(t[0]+i.x,t[1]+i.y),y.lineTo(t[0]-i.x,t[1]-i.y),y.closePath(),[y,new C(a[0],a[1]),h]},[a,t,n]);return b.useEffect(()=>{const h=Y(l,s),f=Y(u??"transparent",s);if(r.current){const i=r.current.uniforms;i.color.value=h,i.gapColor.value=f,i.dashSize.value=d,i.gapSize.value=o,i.origin.value=p,i.direction.value=x,i.lineWidth.value=n,E()}},[l,u,d,o,s,p,x,n]),O(({camera:h})=>{if(r.current===null)return;const f=h.scale.x/v.sx,i=h.scale.y/v.sy,y=r.current.uniforms;y.scaleX.value=f,y.scaleY.value=i,E()}),e.jsx("group",{"position-z":g,children:e.jsxs("mesh",{children:[e.jsx("ambientLight",{}),e.jsx("shapeGeometry",{attach:"geometry",args:[m]}),e.jsx("lineWithDataDashMaterial",{attach:"material",transparent:!0,ref:r})]})})}class ie extends ${constructor(){super({uniforms:{color:{value:new _},gapColor:{value:new _},radius:{value:0},startAngle:{value:0},angleRange:{value:0},dashSize:{value:0},gapSize:{value:0},scaleX:{value:0},scaleY:{value:0},lineWidth:{value:0}},vertexShader:`
|
|
48
|
-
uniform float scaleX; // signed scale
|
|
49
|
-
uniform float scaleY; // signed scale
|
|
50
|
-
out vec2 pixelCoord;
|
|
51
|
-
// out vec2 dataCoord;
|
|
52
|
-
|
|
53
|
-
void main() {
|
|
54
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
55
|
-
vec2 pixelScale = abs(vec2(scaleX, scaleY));
|
|
56
|
-
// dataCoord = vec2(position.x, position.y);
|
|
57
|
-
pixelCoord = vec2(position.x, position.y) / pixelScale;
|
|
58
|
-
}
|
|
59
|
-
`,fragmentShader:`
|
|
60
|
-
uniform vec4 color;
|
|
61
|
-
uniform vec4 gapColor;
|
|
62
|
-
uniform float gapSize;
|
|
63
|
-
uniform float dashSize;
|
|
64
|
-
uniform float lineWidth;
|
|
65
|
-
uniform float scaleX; // signed scale
|
|
66
|
-
uniform float scaleY; // signed scale
|
|
67
|
-
uniform float radius;
|
|
68
|
-
uniform float startAngle;
|
|
69
|
-
uniform float angleRange;
|
|
70
|
-
in vec2 pixelCoord;
|
|
71
|
-
|
|
72
|
-
const float M_PI = 3.1415926535897932384626433832795;
|
|
73
|
-
const float AA_DASH = 0.5;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Antialiasing following the line of dash and gap.
|
|
77
|
-
*
|
|
78
|
-
* The distances have to be in pixel.
|
|
79
|
-
*/
|
|
80
|
-
vec4 aa_dash_gap(float dist, float alpha, float dashSize, float gapSize) {
|
|
81
|
-
dist = mod(dist, (gapSize + dashSize));
|
|
82
|
-
float sd1 = (dist < dashSize) ? dist : dist - (dashSize + gapSize);
|
|
83
|
-
float sd2 = -(dist - dashSize);
|
|
84
|
-
if (abs(sd1) <= AA_DASH || abs(sd2) <= AA_DASH) {
|
|
85
|
-
if (abs(sd1) < abs(sd2)) {
|
|
86
|
-
float c = (sd1 + AA_DASH) * (0.5 / AA_DASH);
|
|
87
|
-
return (
|
|
88
|
-
vec4(color.r, color.g, color.b, alpha * color.a) * c
|
|
89
|
-
+ vec4(gapColor.r, gapColor.g, gapColor.b, alpha * gapColor.a) * (1.0 - c)
|
|
90
|
-
);
|
|
91
|
-
} else {
|
|
92
|
-
float c = (sd2 + AA_DASH) * (0.5 / AA_DASH);
|
|
93
|
-
return (
|
|
94
|
-
vec4(color.r, color.g, color.b, alpha * color.a) * c
|
|
95
|
-
+ vec4(gapColor.r, gapColor.g, gapColor.b, alpha * gapColor.a) * (1.0 - c)
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (dist <= dashSize) {
|
|
100
|
-
return vec4(color.r, color.g, color.b, alpha * color.a);
|
|
101
|
-
}
|
|
102
|
-
return vec4(gapColor.r, gapColor.g, gapColor.b, alpha * gapColor.a);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
void main() {
|
|
106
|
-
float r = length(pixelCoord);
|
|
107
|
-
float s = (abs(scaleX) + abs(scaleY)) * 0.5;
|
|
108
|
-
float ss = 1.0 / s;
|
|
109
|
-
float d = abs(r - radius * ss) - lineWidth * 0.5;
|
|
110
|
-
if (d > 1.5) {
|
|
111
|
-
discard;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
float sAngleRange = sign(angleRange);
|
|
115
|
-
float nAngleRange = abs(angleRange);
|
|
116
|
-
float rawA = atan(pixelCoord.x, pixelCoord.y);
|
|
117
|
-
float aa = mod(sAngleRange * (rawA - startAngle) + 8.0 * M_PI, 2.0 * M_PI);
|
|
118
|
-
|
|
119
|
-
if (nAngleRange < 2.0 * M_PI && aa < 0.0 || aa > nAngleRange) {
|
|
120
|
-
discard;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
float alpha;
|
|
124
|
-
if (lineWidth >= 1.0) {
|
|
125
|
-
alpha = smoothstep(0.25, 0.0, d);
|
|
126
|
-
} else {
|
|
127
|
-
// simulate line thiner than 1px with alpha
|
|
128
|
-
alpha = lineWidth;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (dashSize == 0.0) {
|
|
132
|
-
gl_FragColor = vec4(color.r, color.g, color.b, alpha * color.a);
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
float dist = aa * radius;
|
|
137
|
-
gl_FragColor = aa_dash_gap(dist * ss, alpha, dashSize * ss, gapSize * ss);
|
|
138
|
-
}
|
|
139
|
-
`})}}H({ArcDashMaterial:ie});function ce(c){const{center:a,radius:t,startAngle:n,angleRange:l,lineWidth:u=1,color:d="black",gapColor:o,dashSize:s=0,gapSize:g=s,opacity:r=1,zIndex:v=0}=c,m=b.useRef(null),p=J();return b.useEffect(()=>{const x=Y(d,r),h=Y(o??"transparent",r);if(m.current){const f=m.current.uniforms;f.color.value=x,f.radius.value=t,f.startAngle.value=((n+180)%360-180)*Math.PI/180,f.angleRange.value=l*Math.PI/180,f.gapColor.value=h,f.dashSize.value=s,f.gapSize.value=g,f.lineWidth.value=u,E()}},[d,t,n,l,o,s,g,r,u]),O(({camera:x})=>{if(m.current===null)return;const h=x.scale.x/p.sx,f=x.scale.y/p.sy,i=m.current.uniforms;i.scaleX.value=h,i.scaleY.value=f}),e.jsx("group",{position:[a[0],a[1],v],children:e.jsxs("mesh",{children:[e.jsx("ambientLight",{}),e.jsx("planeGeometry",{attach:"geometry",args:[(t+u)*2,(t+u)*2,1,1]}),e.jsx("arcDashMaterial",{attach:"material",transparent:!0,ref:m})]})})}function de(c){const{geometry:a,onGeometryChanged:t,zIndex:n,lineWidth:l=1,color:u="blue",opacity:d=1,readOnly:o=!1,visible:s=!0}=c,{x:g,y:r,angle:v,angleRange:m,radius:p}=a,x=v*Math.PI/180,h=(v-m*.5)*Math.PI/180,f=(v+m*.5)*Math.PI/180,i={x:g+Math.sin(h)*p,y:r+Math.cos(h)*p},y={x:g+Math.sin(f)*p,y:r+Math.cos(f)*p},D={x:g+Math.sin(x)*p*.5,y:r+Math.cos(x)*p*.5},P=`${m.toFixed(2)} deg`,R=10*p/(Math.PI*18),j=b.useCallback((M,w)=>{const A=new C(M.x-a.x,M.y-a.y),k=Math.atan2(A.x,A.y)*180/Math.PI,F=G(a.angle-a.angleRange*.5,k);t==null||t({...a,radius:A.length(),angle:a.angle+F*.5,angleRange:a.angleRange-F},w)},[a,t]),z=b.useCallback((M,w)=>{const A=new C(M.x-a.x,M.y-a.y),k=Math.atan2(A.x,A.y)*180/Math.PI,F=G(a.angle+a.angleRange*.5,k);t==null||t({...a,radius:A.length(),angle:a.angle+F*.5,angleRange:a.angleRange+F},w)},[a,t]);return s?e.jsxs(e.Fragment,{children:[e.jsx(ce,{center:[g,r],radius:p,startAngle:v-m*.5,angleRange:m,lineWidth:l,color:u,opacity:d,gapColor:"#F0F0F0",dashSize:R,gapSize:R,zIndex:n}),e.jsx(W,{p1:[g,r],p2:[i.x,i.y],lineWidth:l,color:u,opacity:d,zIndex:n}),e.jsx(W,{p1:[g,r],p2:[y.x,y.y],lineWidth:l,color:u,opacity:d,zIndex:n}),e.jsx(N,{geometry:{x:g,y:r},onGeometryChanged:(M,w)=>{t==null||t({...c.geometry,x:M.x,y:M.y},w)},color:u,readOnly:o,opacity:d,zIndex:n}),e.jsx(N,{geometry:i,onGeometryChanged:j,color:u,readOnly:o,opacity:d,zIndex:n}),e.jsx(N,{geometry:y,onGeometryChanged:z,color:u,readOnly:o,opacity:d,zIndex:n}),e.jsx(X,{x:D.x,y:D.y,style:{zIndex:100},center:!0,children:e.jsx("div",{className:"text-light p-1 rounded",style:{backgroundColor:"#000000A0"},children:P})})]}):e.jsx(e.Fragment,{})}function K(c){const t=10**Math.ceil(Math.log10(c)),n=c/t;return n>=1?Number(t):n>=.5?.5*t:n>=.25?.25*t:n>=.1?.1*t:c}function ue(c){const{data:a,plotUnit:t}=c,[n,l]=a,u=Q(),{width:d}=u.canvasSize,o=U(p=>{const x=u.getVisibleDomains(p),h=x.xVisibleDomain[1]-x.xVisibleDomain[0];return Math.abs(h)},[d]),s=b.useMemo(()=>K(o/15),[o]),g=n.distanceTo(l),r=n.clone().add(l).multiplyScalar(.5);function v(p,x){return x?x==="px"?`${p.toFixed(2)} px`:q(new V(p,x)).toPrec(.01).toString():p.toFixed(2)}const m=v(g,t);return e.jsxs(e.Fragment,{children:[e.jsx(W,{p1:[n.x,n.y],p2:[l.x,l.y],color:"red",gapColor:"#F0F0F0",dashSize:s,gapSize:s,lineWidth:2,zIndex:3,opacity:.75}),e.jsx(X,{x:r.x,y:r.y,style:{zIndex:100},center:!0,children:e.jsx("div",{className:"bg-dark text-light p-1 rounded",children:m})})]})}function ge(c){const{data:a,plotUnit:t}=c,[n,l]=a,u=Q(),{width:d}=u.canvasSize,o=U(j=>{const z=u.getVisibleDomains(j),M=z.xVisibleDomain[1]-z.xVisibleDomain[0];return Math.abs(M)},[d]),s=b.useMemo(()=>K(o/15),[o]),g=n,r=new te(l.x,n.y),v=r,m=l,p=Math.abs(g.x-r.x),x=Math.abs(v.y-m.y),h=g.clone().add(r).multiplyScalar(.5),f=v.clone().add(m).multiplyScalar(.5);function i(j,z){return z?z==="px"?`${j.toFixed(2)} px`:q(new V(j,z)).toPrec(.01).toString():j.toFixed(2)}const y=i(p,t),D=i(x,t),P=p>x*.05,R=x>p*.05;return e.jsxs(e.Fragment,{children:[P&&e.jsx(W,{p1:[g.x,g.y],p2:[r.x,r.y],color:"red",gapColor:"#F0F0F0",dashSize:s,gapSize:s,lineWidth:2,zIndex:3,opacity:.75}),R&&e.jsx(W,{p1:[v.x,v.y],p2:[m.x,m.y],color:"red",gapColor:"#F0F0F0",dashSize:s,gapSize:s,lineWidth:2,zIndex:3,opacity:.75}),P&&e.jsx(X,{x:h.x,y:h.y,style:{zIndex:100},center:!0,children:e.jsx("div",{className:"bg-dark text-light p-1 rounded",children:y})}),R&&e.jsx(X,{x:f.x,y:f.y,style:{zIndex:100},center:!0,children:e.jsx("div",{className:"bg-dark text-light p-1 rounded",children:D})})]})}function L(c,a){const t=new C(a.x-c.x,a.y-c.y),n=Math.atan2(t.x,t.y)*180/Math.PI;return{x:c.x,y:c.y,radius:t.length(),angle:n,angleRange:30}}function be(c){const{mouseMode:a,disabled:t=!1,plotUnit:n}=c,l=a==="measure-angle",[u,d]=b.useState({x:0,y:0,radius:0,angle:0,angleRange:0}),o=oe();return e.jsxs(e.Fragment,{children:[e.jsx(T,{id:"ruler3-selection-tool",disabled:a!=="measure-angle"||t,onSelectionChange:s=>{if(s===void 0)return;const g=L(s.data[0],s.data[1]);d(g)},onSelectionStart:()=>{o==null||o.actions.captureMouseInteraction()},onSelectionEnd:()=>{o==null||o.actions.releaseMouseInteraction()},onValidSelection:s=>{const g=L(s.data[0],s.data[1]);d(g)},children:s=>e.jsx(e.Fragment,{})}),l&&e.jsx(de,{geometry:u,onGeometryChanged:s=>{d(s)},color:"red",lineWidth:2,zIndex:2,opacity:.75}),e.jsx(T,{id:"ruler-selection-tool",disabled:a!=="measure-distance"||t,onSelectionStart:()=>{o==null||o.actions.captureMouseInteraction()},onSelectionEnd:()=>{o==null||o.actions.releaseMouseInteraction()},children:s=>e.jsx(ue,{...s,plotUnit:n})}),e.jsx(T,{id:"ruler2-selection-tool",disabled:a!=="measure-ortho"||t,onSelectionStart:()=>{o==null||o.actions.captureMouseInteraction()},onSelectionEnd:()=>{o==null||o.actions.releaseMouseInteraction()},children:s=>e.jsx(ge,{...s,plotUnit:n})})]})}function Me(c){const{mouseModeInteraction:a,disabled:t=!1,dropDirection:n}=c,{mouseMode:l,setOrResetMouseMode:u,setMouseMode:d}=a,[o,s]=b.useState("measure-distance"),r={"measure-distance":"fa-ruler","measure-ortho":"fa-ruler-combined","measure-angle":"fam-protractor"}[o]??"",v=l==="measure-distance"||l==="measure-ortho"||l==="measure-angle";return e.jsxs(re,{title:e.jsx("i",{className:`fa ${r} fa-lg"`}),variant:v?"primary":"secondary",align:{lg:"start"},className:n==="up"?"dropup":void 0,autoClose:!0,onClick:()=>{u(o)},disabled:t,children:[e.jsxs(I.Item,{active:l==="measure-distance",onClick:()=>{s("measure-distance"),d("measure-distance")},title:"Measure the distance between 2 points",children:[e.jsx("i",{className:"fa fa-ruler fa-lg"})," Measure distance"]}),e.jsxs(I.Item,{active:l==="measure-ortho",onClick:()=>{s("measure-ortho"),d("measure-ortho")},title:"Measure the orthogonal distance between 2 points",children:[e.jsx("i",{className:"fa fa-ruler-combined fa-lg"})," Measure orthogonal"]}),e.jsxs(I.Item,{active:l==="measure-angle",onClick:()=>{s("measure-angle"),d("measure-angle")},title:"Measure an angle",children:[e.jsx("i",{className:"fa fam-protractor fa-lg"})," Measure angle"]})]})}export{Me as R,re as S,be as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,j as s,p as n,E as i,dH as m,H as p,w as d,c as u,m as r,z as S,q as f,aw as g}from"./index-0751d893.js";import{S as h}from"./SavingButton-c1839199.js";function E(e){o.useEffect(()=>{e.actions.setParams({sampleid:e.currentSample})},[e.currentSample,e.actions]);const{operator:c,currentSample:a,sample:t,...l}=e;return s.jsx(n,{children:s.jsx(i,{children:s.jsxs("div",{className:"object",children:[s.jsxs("h5",{children:["Sample:"," ",e.currentSample?e.sample.name:"Create a sample first",s.jsx(m,{sampleid:e.currentSample,disabled:!e.operator}),s.jsx(h,{})]}),s.jsx(p,{pages:0,page:0,fetching:!1,per_page:0,total:0,filter:!0,scan:!0,...l,createScalarMap:!1,namespace:`sampledc${e.dcnamespace}`})]})})})}function C(e,c){const{datacollections:a,samples:t}=c.providers.metadata;return{operator:S.selector("operator",e),currentSample:r.selector("currentSample",e),sample:t.selector("results",e)[r.selector("currentSample",e)],datacollections:a.selector("ordered",e),dcnamespace:c.providers.metadata.datacollections.getNamespace(),namespace:a.getNamespace(),params:a.selector("params",e),per_page:a.selector("per_page",e),page:a.selector("page",e),total:a.selector("total",e),fetching:a.selector("fetching",e),selected:r.selector("selectedDataCollections",e)}}function x(e,c){const{datacollections:a}=c.providers.metadata;return{actions:{fetch:()=>a.fetch(),setParams:t=>a.setParams(t,!0),setPage:t=>a.setPage(t),setPageSize:t=>a.setPageSize(t),addSelection:t=>r.dispatch("SELECT_DATA_COLLECTION",t),removeSelection:t=>r.dispatch("UNSELECT_DATA_COLLECTION",t),resetSelection:()=>r.dispatch("RESET_DATA_COLLECTION_SELECTION")}}}const L=d({metadata:r})(u(C,x)(E));function j(e){const{providers:c,yamlNode:a,selectable:t,...l}=e;return f(a,l),g(a,"selectable",t),s.jsx(L,{providers:c,selectable:t})}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var oe=Object.defineProperty;var ie=(t,s,a)=>s in t?oe(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var u=(t,s,a)=>(ie(t,typeof s!="symbol"?s+"":s,a),a);import{k as V,j as e,v as re,i as z,D as ce,a2 as F,a3 as le,a4 as $,a5 as de,r as l,T as L,B as U,a6 as Y,a7 as w,a8 as me,a9 as pe,aa as q,u as ue,a as xe,N as fe,F as G,e as D,ab as K,ac as he,ad as ge,ae as je,w as ye,c as Se,m as N,t as ve,q as we}from"./index-0751d893.js";import{u as I,S as M,a as A,B as Ce,T as be}from"./store-c3eddf46.js";import{T as Me,I as Te,R as ke,a as B,$ as Re,m as De,U as Fe,j as Ie,B as Ae,C as Ee,Y as Pe,b as Be}from"./index-a0f7b98c.js";import{P as W}from"./SelectionPoint-d30865f3.js";import{L as Le}from"./hooks-457bfe32.js";import{C as _}from"./CrossMarker-2285e102.js";import{L as Ne}from"./Label-3c95fb14.js";import{f as Ve,H as ze,V as $e}from"./VisViewpointRestore-097e2edf.js";import{L as _e}from"./LoadingMessage-e1e479c5.js";import"./colors-2395de5a.js";import"./ScreenScale-ae820d30.js";function Oe({sampleactionpositionid:t}){const{fetch:s}=z();function a(){s(M.delete,{sampleactionpositionid:t})}return e.jsx(ce,{id:t,onClick:()=>a(),confirm:!0,show:!0})}function He(t,s){return s.sampleactionpositionid&&e.jsx(Oe,{sampleactionpositionid:s.sampleactionpositionid})}function Ue(){const{selectedSampleActionId:t}=I(),s=V(M.getList,t?{sampleactionid:t}:null),a=[{dataField:"id",text:"#"},{dataField:"type",text:"Type"},{dataField:"posx",text:"X"},{dataField:"posy",text:"Y"},{dataField:"",text:"",formatter:He,classes:"text-end"}];return e.jsx(e.Fragment,{children:e.jsx(re,{keyField:"sampleactionpositionid",data:s.rows||[],columns:a,noDataIndication:"No reference positions",overlay:!0})})}class Ye{constructor(){u(this,"actiontype");u(this,"has_result");u(this,"message");u(this,"positions");u(this,"sampleactionid");u(this,"status")}}class qe extends F(Ye,{pk:"sampleactionid",key:"SampleAction"}){}const Ge=le({path:"/metadata/samples/actions/:sampleactionid",schema:qe});class We{constructor(){u(this,"matrixid")}}class Ke extends F(We,{pk:"matrixid",key:"SetReferenceMatrix"}){}const Xe=new $({method:"POST",path:"/imageviewer/move/reference/matrix",schema:Ke,searchParams:{}});class Je{constructor(){u(this,"crop");u(this,"sampleactionid")}}class Qe extends Je{constructor(){super(...arguments);u(this,"exportid",0)}}class Ze extends F(Qe,{pk:"exportid",key:"ExportToSampleImage"}){}const et=new $({method:"POST",path:"/imageviewer/reference/export",schema:Ze,searchParams:{}});var j=(t=>(t.error="error",t.warning="warning",t.success="success",t.info="info",t))(j||{});function tt({sampleactionid:t,addToast:s}){const{visibleDomain:a}=A(),{fetch:n}=z(),[i,o]=l.useState(!1),[r,c]=l.useState(!1),p=l.useCallback(async()=>{if(t){o(!0);try{await n(Xe,{sampleactionid:t}),s({type:j.success,title:"Matrix calculated",text:"Transformation matrix successfully calculated"})}catch(m){const x=await m.response.json();s({type:j.error,title:"Couldn't calculate matrix",text:x.error})}o(!1)}},[t]),d=l.useCallback(async()=>{if(t){c(!0);try{await n(et,{sampleactionid:t,crop:{x:a.xVisibleDomain.map(m=>Math.max(0,Math.round(m))),y:a.yVisibleDomain.map(m=>Math.max(0,Math.round(m)))}}),s({type:j.success,title:"Reference Exported",text:"Exported reference to sample image"})}catch(m){const x=await m.response.json();s({type:j.error,title:"Couldn't export reference to sample image",text:x.error})}c(!1)}},[t]);return e.jsxs(e.Fragment,{children:[e.jsx(L,{tooltip:"Select this reference for coordinate transform",children:e.jsxs(U,{size:"sm",onClick:()=>void p(),disabled:i,children:[i&&e.jsx("i",{className:"fa fa-spinner fa-spin"}),!i&&e.jsx("i",{className:"fa fa-th"})]})}),e.jsx(L,{tooltip:"Export this image transform to the 2d view",children:e.jsxs(U,{size:"sm",onClick:()=>void d(),className:"ms-1",disabled:r,children:[r&&e.jsx("i",{className:"fa fa-spinner fa-spin"}),!r&&e.jsx("i",{className:"fa fa-file-export"})]})})]})}function st(t,s,a,n){return e.jsx(e.Fragment,{children:s.has_result&&e.jsx(tt,{...s,...n})})}function at({sampleid:t,addToast:s}){const{selectedSampleActionId:a,setSelectedSampleActionId:n,setSelectedSampleActionHasResult:i}=I(),o=V(Ge.getList,{actiontype:"reference",...t?{sampleid:t}:null}),r=[{dataField:"sampleactionid",text:"Id"},{dataField:"status",text:"Status"},{dataField:"message",text:"Message",classes:"text-break"},{dataField:"has_result",text:"Image",formatter:(c,p)=>p.has_result?"Yes":"No"},{text:"",dataField:"",formatter:st,classes:"text-end text-nowrap",formatExtraData:{addToast:s}}];return e.jsx(e.Fragment,{children:e.jsx(de,{keyField:"sampleactionid",data:o.rows||[],columns:r,noDataIndication:"No reference images",selectedItems:a!==void 0?[a]:[],actions:{addSelection:c=>{const{sampleactionid:p}=c;n(p);const d=o.rows.filter(m=>m.sampleactionid===p);d.length>0&&i(d[0].has_result??!1)},removeSelection:c=>{},resetSelection:()=>{}}})})}function nt(t){const{abscissaConfig:s,ordinateConfig:a,title:n,showAxes:i,children:o}=t;return e.jsx(Me,{abscissaConfig:s,ordinateConfig:a,aspect:"equal",title:n,showAxes:i,children:e.jsx(Le,{children:o})})}class ot{constructor(){u(this,"moveid");u(this,"positions")}}class it extends F(ot,{pk:"moveid",key:"MoveToReference"}){}const rt=new $({method:"POST",path:"/imageviewer/move/reference",schema:it,searchParams:{}}),ct={values:new Float32Array([0]),bins:new Float32Array([0,255])};function lt(t){const s={width:256,height:256},[a,n]=l.useState(void 0),[i,o]=l.useState(new Y(new w,new w(1,1))),[r,c]=l.useState(ct);return l.useEffect(()=>{async function p(){if(t)try{const d=await Ve(t,"sample_registration","sample_registration"),{histogram:m,layers:x,yDomain:h,zDomain:y}=d,C=new ze(s,x);n(C),c(m),o(new Y(new w(h[0],y[0]),new w(h[1],y[1])))}catch{console.log("Could not fetch dataset")}}p()},[t]),{api:a,histogram:r,tilingBox:i}}function dt({sampleactionid:t}){const[s,a]=l.useState(void 0);return l.useEffect(()=>{a(()=>me.create({baseURL:pe(),params:{sampleactionid:t},...q.getOptions()}))},[q.token,t]),s}function mt(t){const{currentAction:s,setCurrentAction:a,colorMap:n,setColorMap:i,scaleType:o,setScaleType:r,invertColorMap:c,setInvertColorMap:p,setCustomDomain:d,customDomain:m,doMove:x,setDoMove:h}=A(),y=ue(),C=xe(),{dataDomain:E,histogram:P,currentSample:b}=t;return e.jsxs(fe,{bg:"cyan",className:"p-2",style:{zIndex:99},children:[e.jsx(G,{children:e.jsx(Ce,{children:e.jsxs(be,{type:"radio",name:"action",value:s,onChange:f=>a(f),className:"me-1",children:[e.jsxs(D,{id:"reference",value:"reference",size:"sm",disabled:!b,children:[e.jsx("i",{className:"fa fa-map-marker me-1"}),"Reference"]}),e.jsxs(D,{id:"poi",value:"poi",size:"sm",disabled:!b,children:[e.jsx("i",{className:"fa fa-map-pin me-1"}),"POI"]}),e.jsxs(D,{id:"pan",value:"pan",size:"sm",children:[e.jsx("i",{className:"fa fa-arrows me-1"}),"Pan"]}),e.jsxs(D,{id:"move",value:"move",size:"sm",disabled:!y||!!C,children:[e.jsx("i",{className:"fa fa-map-marker me-1"}),"Move",e.jsx(L,{tooltip:"Enable Move",children:e.jsx(G.Check,{className:"d-inline ms-1",type:"checkbox",checked:x,value:"1",onChange:()=>h(!x)})})]})]})})}),e.jsx(Te,{dataDomain:E,customDomain:m,scaleType:o,onCustomDomainChange:f=>d(f),histogram:P}),e.jsx(ke,{value:o,onScaleChange:r,options:[B.Linear,B.SymLog,B.Sqrt]}),e.jsx(Re,{value:n,onValueChange:i,invert:c,onInversionChange:()=>p(!c)})]})}function pt(){return e.jsx(_,{x:1e3,y:1e3,color:K.primary,sizeInScreen:20,lineWidth:1})}function ut({beam:t}){return e.jsx(e.Fragment,{children:t&&e.jsx(_,{x:t[0],y:t[1],color:K.warning,sizeInScreen:20,lineWidth:1})})}function xt({positions:t}){return e.jsx(e.Fragment,{children:t==null?void 0:t.filter(s=>s.type==="reference").map(s=>e.jsxs(e.Fragment,{children:[e.jsx(_,{x:s.posx,y:s.posy,color:"magenta",sizeInScreen:20,lineWidth:1},s.sampleactionpositionid),e.jsx(Ne,{color:"magenta",datapos:[s.posx,s.posy],text:`${s.id}`})]}))})}function ft({currentAction:t,setReference:s,move:a}){return e.jsxs(e.Fragment,{children:[t==="reference"&&e.jsx(W,{onClick:n=>void s(Math.round(n.dataPt.x),Math.round(n.dataPt.y))}),t==="pan"&&e.jsxs(e.Fragment,{children:[e.jsx(Ae,{button:Ee.Left}),e.jsx(Pe,{})]}),t==="move"&&e.jsx(W,{onClick:n=>a(Math.round(n.dataPt.x),Math.round(n.dataPt.y))})]})}function ht(){const{getVisibleDomains:t}=Be(),s=he(r=>r.camera),{setVisibleDomain:a}=A();function n(r){a(r)}const i=l.useCallback(ge(n,200),[]),o=t(s);return i(o),null}function gt(t){const{api:s,tilingBox:a,dataDomain:n,sampleactionid:i,referenceBeam:o,addToast:r}=t,{fetch:c,invalidateAll:p}=z(),d=a.getSize(new w),m=a.getCenter(new w),{colorMap:x,scaleType:h,invertColorMap:y,customDomain:C,currentAction:E,setCurrentAction:P,doMove:b}=A(),[f,X]=l.useState(0);l.useEffect(()=>{const g=setInterval(()=>{const S=s.getPendingTilesCount();S!==f&&X(S)},1e3);return()=>{clearTimeout(g)}},[s,f]);const{cameraViewport:J,setCameraViewport:Q}=I(),Z=De(C,n),[ee]=Fe(Z,n,h),te={sampleactionid:i,type:"reference"},T=V(M.getList,te),se=l.useCallback(async(g,S)=>{const k=T.rows.length>0?Math.max(...T.rows.map(R=>R.id)):0;await c(M.getList.push,{posx:g,posy:S,sampleactionid:i,type:"reference",id:k+1}),p(M.getList),P("pan")},[T]),ae=l.useCallback(async(g,S)=>{var k,R,O,H;try{const v=await c(rt,{x:g,y:S,execute:b});r({type:j.info,title:"Move To Poisiton",text:`${(k=v.positions)==null?void 0:k.x.motor}: ${(R=v.positions)==null?void 0:R.x.destination}, ${(O=v.positions)==null?void 0:O.y.motor}: ${(H=v.positions)==null?void 0:H.y.destination}`})}catch(v){const ne=await v.response.json();r({type:j.error,title:"Couldn't move to position",text:ne.error})}},[i,b]);return e.jsx("div",{style:{flex:"1",display:"flex",flexDirection:"column"},children:e.jsxs(nt,{abscissaConfig:{visDomain:[0,d.x]},ordinateConfig:{visDomain:[0,d.y],flip:!0},children:[e.jsx(_e,{info:f>0?`Waiting for ${f} tiles`:""}),e.jsx($e,{viewpoint:J,setViewpoint:Q}),e.jsx("group",{position:[m.x,m.y,0],children:e.jsx(Ie,{size:{width:d.x,height:d.y},api:s,colorMap:x,invertColorMap:y,domain:ee,scaleType:h,displayLowerResolutions:!1,qualityFactor:0})}),e.jsx(ht,{}),e.jsx(ut,{beam:o==null?void 0:o.beam}),e.jsx(xt,{positions:T.rows}),e.jsx(pt,{}),e.jsx(ft,{currentAction:E,setReference:se,move:(...g)=>void ae(...g)})]})})}function jt(t){var p,d;const{selectedSampleActionId:s,selectedSampleActionHasResult:a}=I(),n=dt({sampleactionid:s}),{api:i,tilingBox:o,histogram:r}=lt(n),c=[0,254];return s?a?i?e.jsxs(e.Fragment,{children:[e.jsx(mt,{dataDomain:c,histogram:r,...t}),s&&a&&e.jsx(gt,{sampleactionid:s,dataDomain:c,api:i,tilingBox:o,referenceBeam:(d=(p=t.sources)==null?void 0:p["1"])==null?void 0:d.reference,addToast:t.addToast})]}):null:e.jsx("p",{style:{padding:"10px"},children:"Selected reference does not have an image"}):e.jsx("p",{style:{padding:"10px"},children:"Please select a reference image"})}function yt(t){const s=je();return e.jsxs("div",{className:"h-100",style:{display:"flex",flexDirection:"row"},children:[e.jsx("div",{style:{flex:"1 1 70%",display:"flex",flexDirection:"column",backgroundColor:"#efefef",borderRadius:"3px"},children:e.jsx(jt,{...t,addToast:s})}),e.jsxs("div",{style:{flex:"1 1 30%",padding:"0.5rem"},children:[e.jsx(l.Suspense,{fallback:e.jsx("p",{children:"..."}),children:e.jsx(at,{sampleid:t.currentSample,addToast:s})}),e.jsx(l.Suspense,{fallback:e.jsx("p",{children:"..."}),children:e.jsx(Ue,{})})]})]})}const St=(t,s)=>{const{samples:a}=s.providers.metadata,{sources:n}=s.providers.twod;return{currentSample:N.selector("currentSample",t),sample:a.selector("results",t)[N.selector("currentSample",t)],sources:n.selector("results",t)}},vt=(t,s)=>({}),wt=ye({metadata:N,twod:ve})(Se(St,vt)(yt));function Bt(t){const{providers:s,yamlNode:a,datacollectionid:n,fileName:i,...o}=t;return we(a,o),e.jsx(wt,{})}export{Bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var l=(a,s,t)=>s in a?d(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var o=(a,s,t)=>(l(a,typeof s!="symbol"?s+"":s,t),t);import{r as h,P as i,j as e,h as u,F as p,l as g,R as m,C as v,w as f,c as x,n as S}from"./index-0751d893.js";var n;let b=(n=class extends h.Component{constructor(){super(...arguments);o(this,"onSubmit",(t,r,c)=>c(t).then(()=>{this.props.actions.fetchSaving()}))}render(){return e.jsx(u,{id:"saving",button:e.jsx("i",{className:"fa fa-cog"}),buttonProps:{className:"me-1 float-end",disabled:this.props.disabled},title:"Saving Configuration",children:e.jsx(p,{children:g.map(this.props.saving.arguments,(t,r)=>e.jsxs(p.Group,{as:m,children:[e.jsx(p.Label,{column:!0,sm:3,children:r}),e.jsx(v,{children:t})]},r))})})}},o(n,"defaultProps",{disabled:!1}),o(n,"propTypes",{actions:i.shape({fetchSaving:i.func.isRequired}).isRequired,saving:i.shape({arguments:i.shape({})}).isRequired,disabled:i.bool}),n);const j=(a,s)=>({saving:s.providers.app.saving.selector("results",a)}),P=(a,s)=>({actions:{fetchSaving:()=>s.providers.app.saving.fetch()}}),C=f({app:S})(x(j,P)(b));export{C as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var O=Object.defineProperty;var I=(c,n,s)=>n in c?O(c,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):c[n]=s;var S=(c,n,s)=>(I(c,typeof n!="symbol"?n+"":n,s),s);import{r as b,an as L,j as e,g as z,R as v,C as x,B as m,F as C,l as j,ao as w,ap as M,I as P,p as V,aq as W,y as $,w as F,c as H,s as p,ar as U,U as X,as as B,q as Y}from"./index-0751d893.js";import{F as q,z as T,E as G,c as K}from"./index-a0f7b98c.js";import{h as J,i as Q,H as Z}from"./H5WebCurvePlot-136dfa6f.js";import{D as _}from"./DropdownButton-d066ece0.js";import{m as ee}from"./ConnectUtils-b8bfa186.js";import"./types-46afffa0.js";const se=[0,1];function te(c){const{x:n,y:s,dataValues:t,size:a,colorMap:l,title:h,onClick:y}=c,A=q(t)||se,g=t.length,N=T(n,g),k=T(s,g),r=b.useMemo(()=>L(t),[t]);return e.jsx(G,{abscissaParams:{value:N},ordinateParams:{value:k},dataArray:r,domain:A,colorMap:l,size:a,onPointClick:y,title:h})}function ae(c){const{data:n,onClick:s}=c,[t]=n;if(t===void 0)return e.jsx("div",{children:"No data. Please select a scan."});const{marker:a,x:l,y:h}=t,{color:y,colorscale:A,size:g}=a;return J(y)?e.jsx(te,{x:l,y:h,dataValues:y,colorMap:A,size:g,onClick:s,title:t.name}):e.jsx("div",{children:"Values are undefined. Please select a series."})}function ce(c){const{data:n,onClick:s}=c;return n.length===0?e.jsx("div",{children:"No data to display"}):Q(n)?e.jsx(ae,{data:n,onClick:s}):e.jsx(Z,{data:n,insetLegend:!0,onClick:s,curveType:K.LineAndGlyphs})}function ne(c){const n=s=>{c.onChange({type:s.target.name,axis:s.target.value})};return e.jsx(_,{title:"Axes",children:e.jsxs(z,{className:"series-select",children:[e.jsxs(v,{children:[e.jsx(x,{xs:1,children:e.jsx(m,{size:"sm",onClick:()=>c.unselectAxes("x"),className:"mx-auto",children:"x"})}),e.jsx(x,{xs:1,children:e.jsx(m,{size:"sm",onClick:()=>c.unselectAxes("y"),className:"mx-auto",children:"y"})}),e.jsx(x,{className:"text-end",children:e.jsx(m,{size:"sm",onClick:()=>c.resetAxes(),children:"Reset"})})]}),c.series.map(s=>e.jsxs(v,{children:[e.jsx(x,{xs:1,children:e.jsx(C.Check,{checked:s===c.selected.x,name:"x",type:"radio",onChange:n,value:s,className:"my-auto"})}),e.jsx(x,{xs:1,children:e.jsx(C.Check,{checked:s===c.selected.y,name:"y",type:"radio",onChange:n,value:s,className:"my-auto"})}),e.jsx(C.Label,{column:!0,className:"justify-content-start col-10",children:s})]},s))]})})}function ie(c){const n=s=>{c.onChange(s.target.name,s.target.checked)};return e.jsx(_,{title:"Series",children:e.jsxs(z,{className:"series-select",children:[e.jsx("div",{className:"text-end",children:e.jsx(m,{size:"sm",onClick:()=>c.resetSeries(),children:"Reset"})}),c.series.map(s=>e.jsx(C.Check,{className:"justify-content-start",checked:s in c.selected,type:"checkbox",id:`${s}-check`,label:s,onChange:n,name:s},s))]})})}function re(c,n){return c.length===n.length?{xData:c,yData:n}:c.length>n.length?{xData:c.slice(0,n.length),yData:n}:{xData:c,yData:n.slice(0,c.length)}}let oe=class extends b.Component{constructor(s){super(s);S(this,"doSetPageSize");S(this,"doSetPage");S(this,"pageRef");S(this,"onClick",s=>{s!==void 0&&this.props.actions.selectPoint(s)});S(this,"setPageSize",s=>{this.doSetPage(1),this.doSetPageSize(Number.parseInt(s.target.value,10))});S(this,"setPage",s=>{this.doSetPage(Number.parseInt(s.target.value,10),!0)});S(this,"selectSeries",(s,t)=>{t?this.props.actions.selectSeries(s):this.props.actions.unselectSeries(s)});this.doSetPageSize=j.debounce(this.props.actions.setPageSize,500),this.doSetPage=j.debounce(this.props.actions.setPage,500),this.pageRef=b.createRef()}componentDidMount(){const{options:s={},actions:t}=this.props,{preSelectedXAxis:a,preSelectedSeries:l}=s;t.setFollow(),a&&t.selectAxes({type:"x",axis:a}),l&&(Array.isArray(l)?l.forEach(h=>t.selectSeries(h)):t.selectSeries(l))}componentDidUpdate(s){const t=this.props.data[this.props.selectedScan]||{},a=s.data[s.selectedScan]||{};t.page!==a.page&&this.pageRef.current&&(this.pageRef.current.value=`${t.page||1}`),s.selectedSeries!==this.props.selectedSeries&&this.props.actions.setParams({scalars:[...this.props.selectedAxes.x?[this.props.selectedAxes.x]:[],...this.props.selectedAxes.y?[this.props.selectedAxes.y]:[],...Object.keys(this.props.selectedSeries)]},!0),s.selectedAxes!==this.props.selectedAxes&&this.props.actions.setParams({scalars:[...this.props.selectedAxes.x?[this.props.selectedAxes.x]:[],...this.props.selectedAxes.y?[this.props.selectedAxes.y]:[],...Object.keys(this.props.selectedSeries)]},!0)}render(){const s=w(this.props.scans);if(s===null)return e.jsx("span",{children:"No scan loaded."});const t=this.props.selectedScan||s,a=this.props.data[t]||{};if(!a.data)return e.jsx("span",{children:"Waiting for scan data"});const l=Object.keys(this.props.selectedSeries).length>0?Object.keys(this.props.selectedSeries):a.axes.ys.scalars.filter(r=>!r.startsWith("timer")).slice(0,2),h=[];if(a.axes.xs.length===2&&!this.props.selectedAxes.x||this.props.selectedAxes.x&&this.props.selectedAxes.y){let r=[],i=[];if(this.props.selectedAxes.x&&this.props.selectedAxes.y){const o=a.data[this.props.selectedAxes.x],d=a.data[this.props.selectedAxes.y];if(!o||!d)return e.jsxs("span",{children:["The selected axes are not valid for the current scan"," ",e.jsx(m,{size:"sm",onClick:()=>this.props.actions.resetAxes(),children:"Reset"})]});r=o.data,i=d.data}else{const o=a.data[a.axes.xs[0]],d=a.data[a.axes.xs[1]];r=o?o.data:[],i=d?d.data:[]}j.each(l,o=>{var f;if(!a.axes.ys.scalars.includes(o))return;const d=a.data[o];if(d){const u={x:r,y:i,type:"scattergl",name:d.name,mode:"markers",text:(f=d.data)==null?void 0:f.map(E=>E.toPrecision(4)),marker:{size:10,color:d.data&&[...d.data],colorscale:"Viridis"}};h.push(u)}})}else{const r=this.props.selectedScans?[...Object.values(this.props.selectedScans).map(i=>this.props.data[i])]:[a];try{j.each(r,i=>{let o;if(i.axes.xs.length===0&&!this.props.selectedAxes.x)o={data:[0],name:"index",shape:[1]};else{const f=this.props.selectedAxes.x||i.axes.xs[0];o=i.data[f]}const d=this.props.scans[i.scanid];if(!o)throw new Error("The selected axes are not valid for the current scan(s)");if(o.data.length===0)throw new Error("Waiting for data for the selected axes");j.each(l,f=>{if(!i.axes.ys.scalars.includes(f))return;const u=i.data[f];if(!u)return;if(!u.data){console.log(`Data for ${i.scanid} series ${u.name} not loaded yet`);return}o.name==="index"&&(o.data=j.range(u.data.length));const{xData:E,yData:R}=re(o.data,u.data),D={x:[...E],y:R,type:"scattergl",name:i.scanid===t&&d?u.name:`${M.unix(d.start_timestamp).format("DD-MM-YYYY HH:mm:ss")}: ${u.name}`};h.push(D)})})}catch(i){if(i instanceof Error)return e.jsxs("span",{children:[i.message,e.jsx(m,{style:{marginLeft:"1rem"},size:"sm",onClick:()=>this.props.actions.resetAxes(),children:"Reset"})]})}}const{options:A}=this.props,{preSelectedXAxis:g,preSelectedSeries:N}=A,{backend:k="h5web"}=A;return e.jsxs("div",{className:"plot1d-container",children:[e.jsx(z,{children:e.jsxs(v,{children:[e.jsx(x,{xs:"auto",className:"gx-1",children:e.jsx(ne,{onChange:r=>this.props.actions.selectAxes(r),series:[...a.axes.xs,...a.axes.ys.scalars],selected:this.props.selectedAxes,resetAxes:this.props.actions.resetAxes,unselectAxes:this.props.actions.unselectAxes})}),e.jsx(x,{xs:"auto",className:"gx-1",children:e.jsx(ie,{onChange:this.selectSeries,series:a.axes.ys.scalars,selected:this.props.selectedSeries,resetSeries:this.props.actions.resetSeries})}),e.jsx(x,{xs:"auto",className:"gx-1",children:e.jsxs(P,{children:[e.jsx(P.Text,{children:"Points"}),e.jsxs(C.Control,{as:"select",onChange:this.setPageSize,value:this.props.pageSize,children:[[5,10,25,100,1e3].map(r=>a.npoints===null||r<a.npoints?e.jsx("option",{value:r,children:r},r):null),a.npoints!==null&&e.jsx("option",{value:a.npoints,children:`All (${a.npoints})`})]})]})}),e.jsx(x,{xs:"auto",className:"gx-1",children:e.jsxs(P,{children:[e.jsx(P.Text,{children:"Page"}),e.jsx(m,{size:"sm",onClick:()=>this.doSetPage(a.page-1,!0),disabled:a.page===1,children:e.jsx("i",{className:"fa fa-caret-left"})}),e.jsx(C.Control,{ref:this.pageRef,type:"number",onChange:this.setPage,defaultValue:a.page,max:a.pages,min:1}),e.jsx(m,{size:"sm",onClick:()=>this.doSetPage(a.page+1,!0),disabled:a.page===a.pages,children:e.jsx("i",{className:"fa fa-caret-right"})})]})}),this.props.fetching&&e.jsx(x,{xs:"auto",children:e.jsx("i",{className:"fa fa-spin fa-spinner"})})]})}),e.jsx(V,{children:k==="h5web"?e.jsx(W,{children:e.jsx(ce,{data:h,onClick:this.onClick})}):e.jsx($,{data:h,layout:{},onClick:r=>{var i;return this.onClick((i=r.points[0])==null?void 0:i.pointNumber)}})}),(g||N)&&e.jsxs("span",{children:[N," vs. ",g]})]})}};function le(c,n,s){const{data:t,list:a}=n.providers.scans;return{data:t.selector("results",c),scans:a.selector("results",c),pageSize:t.selector("per_page",c)||25,fetching:t.selector("fetching",c),selectedSeries:p.selector("selectedDataSeries",c),selectedAxes:p.selector("selectedDataAxes",c),selectedScan:p.selector("selectedScan",c),selectedScans:p.selector("selectedScans",c)}}function de(c,n){return{actions:{selectPoint:t=>p.dispatch("SCAN_CURRENT_POINT",Number.parseInt(t.toString(),10)),setPageSize:t=>n.providers.scans.data.setPageSize(t,!0),setPage:(t,a)=>n.providers.scans.data.setPage(t,a),setParams:(t,a)=>n.providers.scans.data.setParams(t,a),fetchScanSpectra:t=>n.providers.scans.spectra.fetch(t),selectSeries:t=>p.dispatch("SCAN_DATA_SELECT_SERIES",t),unselectSeries:t=>p.dispatch("SCAN_DATA_UNSELECT_SERIES",t),resetSeries:t=>p.dispatch("SCAN_DATA_RESET_SERIES",t),selectAxes:t=>p.dispatch("SCAN_DATA_SELECT_AXES",t),unselectAxes:t=>p.dispatch("SCAN_DATA_UNSELECT_AXES",t),resetAxes:t=>p.dispatch("SCAN_DATA_RESET_AXES",t),setFollow:()=>{n.selectedScan===void 0&&p.dispatch("RESET_SCAN_SELECTION")}}}}const pe=F({scans:p})(H(ee(le),de)(oe));function je(c){const{providers:n,yamlNode:s,backend:t,preSelectedXAxis:a,preSelectedSeries:l,...h}=c;return U(s,"backend",t),X(s,"preSelectedXAxis",a),B(s,"preSelectedSeries",l),Y(s,h),e.jsx(pe,{providers:n,options:{backend:t,preSelectedXAxis:a,preSelectedSeries:l}})}export{je as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ao as j,r as v,j as a,at as y,R as b,C as N,au as w,w as E,c as C,s as f,a1 as k,U as h,av as O,q as T}from"./index-0751d893.js";import{m as R}from"./ConnectUtils-b8bfa186.js";function F(r){const{options:s,selectedScan:e,currentPoint:n,data:i,scans:p,actions:c}=r,{series:t}=s,o=j(p);if(v.useEffect(()=>{c.setFollow(),c.setPage(void 0),c.setParams({scalars:[t]}),o&&c.setParams({scanid:o},!0)},[]),v.useEffect(()=>{let l=e;l||o&&(l=o),l&&c.setParams({scanid:l},!0)},[e]),!t)return a.jsxs("div",{className:"bg-warning rounded p-1",children:[a.jsx("i",{className:"fa fa-warning m-1"}),"Please specify a `series` in the config"]});const g=s.name||t;if(o===null)return a.jsxs("span",{children:[g,": No scan loaded."]});const u=i[e||o]||{};if(!u.data)return a.jsxs("span",{children:[g,": Waiting for scan data"]});if(!u.axes.ys.scalars.includes(t))return a.jsxs("div",{className:"bg-warning rounded p-1",children:["Scan does not include `",t,"`"]});const m=u.data[t];if(!m)return a.jsxs("div",{className:"bg-warning rounded p-1",children:["No y data yet for `",t,"`"]});if(!m.data)return a.jsxs("div",{className:"bg-warning rounded p-1",children:["Data not yet loaded for `",t,"`"]});const x=n!==null?n:m.data.length-1,d=m.data[x];let S="primary";s.comparator&&s.comparison&&(S=y(s.comparator,d,s.comparison)?"success":"danger");let P=String(d);return s.round!==void 0&&d!==void 0&&!Number.isNaN(d)&&(P=d.toFixed(s.round)),a.jsx("div",{className:"scanplot0d-value",children:a.jsxs(b,{children:[a.jsxs(N,{children:[g,":"]}),a.jsxs(N,{children:[a.jsx(w,{bg:S,children:P}),a.jsxs("span",{className:"invisible",children:["[",x,", ",u.page,"]"]})]})]})})}const I=(r,s,e)=>{const{data:n,list:i}=s.providers.scans;return{data:n.selector("results",r),scans:i.selector("results",r),currentPoint:f.selector("currentPoint",r),selectedScan:f.selector("selectedScan",r)}},z=(r,s)=>({actions:{setFollow:()=>{s.selectedScan===void 0&&f.dispatch("RESET_SCAN_SELECTION")},setPageSize:e=>s.providers.scans.data.setPageSize(e,!0),setPage:(e,n)=>s.providers.scans.data.setPage(e,n),setParams:(e,n)=>s.providers.scans.data.setParams(e,n)}}),A=E({scans:f})(C(R(I),z)(F));function V(r){const{yamlNode:s,providers:e,series:n,name:i,round:p,comparison:c,comparator:t,...o}=r;return k(s,"series",n),h(s,"name",i),O(s,"round",p),h(s,"comparison",c),h(s,"comparator",t),T(s,o),a.jsx(A,{providers:e,options:{series:n,name:i,round:p,comparison:c,comparator:t}})}export{V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var P=Object.defineProperty;var v=(o,r,t)=>r in o?P(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t;var h=(o,r,t)=>(v(o,typeof r!="symbol"?r+"":r,t),t);import{r as g,ao as C,l as u,j as s,g as b,F as x,R as w,C as f,B as N,p as R,y as E}from"./index-0751d893.js";import{H as I}from"./H5WebCurvePlot-136dfa6f.js";class $ extends g.Component{constructor(t){super(t);h(this,"point");h(this,"max");h(this,"lastScanId");h(this,"onChangePoint",t=>{const e=Number(t.target.value);e<this.max&&this.props.actions.selectPoint(e)});h(this,"clearSelection",()=>{this.props.actions.clearPoint()});this.point=g.createRef(),this.max=0}componentDidUpdate(t){const{currentPoint:e}=this.props,{scanid:n,npoints_avail:a}=this.data();if(!n)return;const c=this.lastScanId!==n;this.lastScanId=n;const i=this.max!==a;this.max=a;const l=e??this.max-1;this.point.current&&(this.point.current.value=`${l}`),l!==-1&&(t.currentPoint!==e&&e!==null&&e!==void 0&&this.fetchScanSpectra(e),e===null&&(c||i||t.currentPoint!==null)&&this.fetchScanSpectra(l))}data(){return this.props.data[this.selectedScan()]||{}}selectedScan(){return this.props.selectedScan?this.props.selectedScan:C(this.props.scans)||0}async fetchScanSpectra(t){if(this.data().scanid&&!(t<0&&this.props.currentPoint&&this.props.currentPoint<0)&&!this.props.fetching)try{await this.props.actions.fetchScanSpectra({scanid:this.selectedScan(),point:t})}catch(e){console.log("Couldn't load scan spectra",e)}}generateXData(t,e){const{conversion:n}=e;return n?u.range(t.length).map(a=>a*n.scale+n.zero):u.range(t.length)}generateSeries(t,e,n=void 0){if(!t)return;const[a]=t.data;return a?{x:[...n?e.data[n].data[0]:this.generateXData(a,e)],y:[...a],type:"scattergl",name:t.name}:void 0}render(){if(Object.keys(this.props.spectra).length===0)return s.jsx("span",{children:"Waiting for scan spectra"});const{selectable:t=!0,options:e={},spectra:n}=this.props,{backend:a="h5web",preSelectedXAxis:c,preSelectedSeries:i,plotTitle:l,insetLegend:j}=e,p=[];return i?(Array.isArray(i)?i:[i]).forEach(d=>{const y=n.data[d],S=this.generateSeries(y,n,c);S&&p.push(S)}):u.each(n.data,m=>{const d=this.generateSeries(m,n);d&&p.push(d)}),s.jsxs("div",{className:"plot1d-container",children:[t&&s.jsx(b,{children:s.jsxs(x.Group,{as:w,children:[s.jsx(x.Label,{column:!0,sm:3,children:"Point"}),s.jsx(f,{children:s.jsx(x.Control,{type:"number",ref:this.point,onChange:this.onChangePoint,min:"0",max:this.max})}),this.props.currentPoint!==null&&s.jsx(f,{xs:2,children:s.jsx(N,{onClick:this.clearSelection,children:"Follow"})}),this.props.fetching&&s.jsx(f,{xs:1,children:s.jsx("div",{className:"my-auto ms-2",children:s.jsx("i",{className:"fa fa-spin fa-spinner"})})})]})}),s.jsx(R,{children:a==="h5web"?s.jsx(I,{insetLegend:j,data:p,layout:this.props.layout}):s.jsx(E,{className:"plot",data:p,layout:this.props.layout??{}})}),(c||i||l)&&s.jsx("span",{children:l||`${i} vs. ${c}`})]})}}export{$ as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as d,c as S,s as r,ar as m,U as p,as as u,aw as h,q as P,j as N}from"./index-0751d893.js";import{S as f}from"./ScanPlot1d-38bddb23.js";import{m as g}from"./ConnectUtils-b8bfa186.js";import"./H5WebCurvePlot-136dfa6f.js";import"./index-a0f7b98c.js";function O(s,t,e){return{data:t.providers.scans.data.selector("results",s),scans:t.providers.scans.list.selector("results",s),spectra:t.providers.scans.spectra.selector("results",s),fetching:t.providers.scans.spectra.selector("fetching",s),currentPoint:r.selector("currentPoint",s),currentImageNode:r.selector("currentImageNode",s),selectedScan:r.selector("selectedScan",s)}}function T(s,t){return{actions:{selectPoint:e=>r.dispatch("SCAN_CURRENT_POINT",Number.parseInt(e,10)),clearPoint:()=>r.dispatch("SCAN_CURRENT_POINT",null),fetchScanSpectra:e=>t.providers.scans.spectra.fetch(e),setPage:e=>t.providers.scans.spectra.setPage(e)}}}const v=d({scans:r})(S(g(O),T)(f));function R(s){const{providers:t,yamlNode:e,backend:a,preSelectedXAxis:c,preSelectedSeries:n,plotTitle:o,insetLegend:i,...l}=s;return m(e,"backend",a),p(e,"preSelectedXAxis",c),u(e,"preSelectedSeries",n),p(e,"title",o),h(e,"insetLegend",i),P(e,l),N.jsx(v,{providers:t,options:{backend:a,preSelectedXAxis:c,preSelectedSeries:n,plotTitle:o,insetLegend:i}})}export{R as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ao as u,r as j,j as s,R as l,C as c,w as x,c as f,s as d,a1 as S,U as N,q as v}from"./index-0751d893.js";import{m as w}from"./ConnectUtils-b8bfa186.js";function E(n){const{options:a,selectedScan:t,scans:e,actions:o}=n,{scanKey:r,name:p}=a,h=u(e);j.useEffect(()=>{o.setFollow()},[]);const i=p??r;if(h===null)return s.jsx("div",{className:"scan-value",children:s.jsxs(l,{children:[s.jsxs(c,{children:[i,":"]}),s.jsx(c,{children:"No scan loaded"})]})});const m=(e[t||h]||{})[r];return m?s.jsx("div",{className:"scan-value",children:s.jsxs(l,{children:[s.jsxs(c,{children:[i,":"]}),s.jsx(c,{children:m})]})}):s.jsx("div",{className:"scan-value",children:s.jsxs(l,{children:[s.jsxs(c,{children:[i,":"]}),s.jsxs(c,{children:[s.jsx("i",{className:"fa fa-warning me-1"}),"No data for this scan"]})]})})}const C=(n,a,t)=>{const{list:e}=a.providers.scans;return{scans:e.selector("results",n),selectedScan:d.selector("selectedScan",n)}},y=(n,a)=>({actions:{setFollow:()=>{a.selectedScan===void 0&&d.dispatch("RESET_SCAN_SELECTION")}}}),O=x({scans:d})(f(w(C),y)(E));function I(n){const{yamlNode:a,providers:t,scanKey:e,name:o,...r}=n;return S(a,"scanKey",e),N(a,"name",o),v(a,r),s.jsx(O,{providers:t,options:{scanKey:e,name:o}})}export{I as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as g,b8 as S,j as t,aP as v}from"./index-0751d893.js";import{b as j,Q as F,O as w}from"./index-a0f7b98c.js";import{S as k}from"./ScreenScale-ae820d30.js";import{t as B}from"./QtyHelper-8429914f.js";const G=g.forwardRef(({children:n,percentLocation:r},s)=>{const i=g.useRef(null);g.useImperativeHandle(s,()=>i.current,[]);const c=j();return S(({camera:l})=>{const e=i.current;if(!e)return;const a=c.getVisibleDomains(l),o=a.xVisibleDomain[0]+(a.xVisibleDomain[1]-a.xVisibleDomain[0])*(r[0]/100),m=a.yVisibleDomain[0]+(a.yVisibleDomain[1]-a.yVisibleDomain[0])*(1-r[1]/100);e.position.x=o,e.position.y=m}),t.jsx("group",{ref:i,children:t.jsx("group",{children:n})})});function C(n){const s=10**Math.ceil(Math.log10(n)),i=n/s;return i>=1?Number(s):i>=.5?.5*s:i>=.25?.25*s:i>=.1?.1*s:n}function q(n){const{unit:r,percentWidth:s=30,percentLocation:i=75}=n,c=j(),{width:l}=c.canvasSize,e=F(m=>{const b=c.getVisibleDomains(m),{xVisibleDomain:x,yVisibleDomain:y}=b,h=x[1]-x[0],f=l/Math.abs(h),p=C(Math.abs(h)*s/100),R=p*f,D=x[0]+h*i/100,M=y[1];function V(d,u){return u==="px"?`${d} ${u}`:`${B(new v(d,"mm")).toPrec(.1)}`}const L=V(p,r);return{pixelRange:R,dataRange:p,dataX:D,dataY:M,text:L}},[r,l,s,i]),a=2,o=10;return t.jsxs(t.Fragment,{children:[t.jsx(w,{x:e.dataX,y:e.dataY,style:{color:"black"},children:t.jsx("div",{style:{top:"50%",left:"50%",position:"relative",transform:"translate(-100%, 0%)",borderRadius:5,paddingLeft:5,paddingRight:5,backgroundColor:"#FFFFFF80",fontWeight:"bold",fontSize:"100%",zIndex:100},children:e.text})}),t.jsx(G,{percentLocation:[i,0],children:t.jsx(k,{children:t.jsxs("group",{"position-y":26,children:[t.jsxs("mesh",{position:[0,0,0],children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[e.pixelRange,a+2,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:"white",opacity:1})]}),t.jsxs("mesh",{position:[e.pixelRange*.5,0,0],children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[a+2,o+2,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:"white",opacity:1})]}),t.jsxs("mesh",{position:[-e.pixelRange*.5,0,0],children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[a+2,o+2,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:"white",opacity:1})]}),t.jsxs("mesh",{position:[0,0,0],children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[e.pixelRange,a,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:"black",opacity:1})]}),t.jsxs("mesh",{position:[e.pixelRange*.5,0,0],children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[a,o,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:"black",opacity:1})]}),t.jsxs("mesh",{position:[-e.pixelRange*.5,0,0],children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[a,o,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:"black",opacity:1})]})]})})})]})}export{q as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1 as o,aw as u,U as p,q as l,j as x,S as c}from"./index-0751d893.js";function S(n){const{providers:i,yamlNode:s,schema:r,url:a,requireOperator:t,submitText:e,...m}=n;return o(s,"schema",r),o(s,"url",a),u(s,"requireOperator",t),p(s,"submitText",e),l(s,m),x.jsx(c,{providers:i,options:{schema:r,url:a,requireOperator:t,submitText:e}})}export{S as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as u,a8 as Be,aA as $e,aB as Ve,aC as Xe,aD as We,aE as qe,aF as Se,aG as Ke,aH as Qe,aI as Ne,aJ as Ye,aK as Ze,aL as we,aM as Je,aN as ie,j as t,aO as et,I as Ae,F as te,aP as ce,ay as F,aj as $,B as y,aQ as A,aR as tt,g as Ue,R as B,C as p,aS as at,aT as se,aU as q,aV as nt,A as rt,a1 as it,aw as st,av as ot,U as lt,q as ct}from"./index-0751d893.js";import{V as dt,u as ut}from"./VLineRoi-5130fa5a.js";import{N as mt,u as ft,a as xt,b as _e,c as Ie}from"./hooks-457bfe32.js";import{u as ht,T as gt,D as vt,S as pe,L as jt}from"./UseMouseModeInteraction-fc86164b.js";import{o as oe}from"./index-a0f7b98c.js";import{A as E}from"./colormap-344855f8.js";import{S as Oe}from"./ScreenScale-ae820d30.js";import{D as yt,S as Ct,Z as St,A as Nt}from"./DraggableRect-db33e02e.js";import{D as Te}from"./DropdownButton-d066ece0.js";import{S as At}from"./SceneScale-33094e68.js";import{S as ze,R as _t,a as It}from"./RulerButton-5c2020aa.js";import{L as pt}from"./LoadingMessage-e1e479c5.js";import"./types-46afffa0.js";import"./QtyHelper-8429914f.js";import"./colors-2395de5a.js";import"./Anchor-3fa6d19c.js";var N=(e=>(e[e.NONE=0]="NONE",e[e.LAPLACIAN_3x3=1]="LAPLACIAN_3x3",e[e.LAPLACIAN_9x9=2]="LAPLACIAN_9x9",e[e.SHARPENING_3x3=3]="SHARPENING_3x3",e[e.UNSHARPENING_3x3=4]="UNSHARPENING_3x3",e[e.UNSHARPENING_5x5=5]="UNSHARPENING_5x5",e[e.SMOOTH_3x3=6]="SMOOTH_3x3",e[e.SMOOTH_5x5=7]="SMOOTH_5x5",e[e.SMOOTH_7x7=8]="SMOOTH_7x7",e))(N||{});const Z={0:{name:"No filter",size:0,coefs:Float32Array.from([0,0,0,0,0,0,0,0,0])},1:{name:"Laplacian 3×3",size:3,coefs:Float32Array.from([0,-1,0,-1,4,-1,0,-1,0])},2:{name:"Laplacian 9×9",size:9,coefs:Float32Array.from([0,1,1,2,2,2,1,1,0,1,2,4,5,5,5,4,2,1,1,4,5,3,0,3,5,4,1,2,5,3,-12,-24,-12,3,5,2,2,5,0,-24,-40,-24,0,5,2,2,5,3,-12,-24,-12,3,5,2,1,4,5,3,0,3,5,4,1,1,2,4,5,5,5,4,2,1,0,1,1,2,2,2,1,1,0])},3:{name:"Sharpening 3×3",size:3,coefs:Float32Array.from([-1,-1,-1,-1,9,-1,-1,-1,-1])},4:{name:"Unsharpening 3×3",size:3,coefs:Float32Array.from([0,-1,0,-1,5,-1,0,-1,0])},5:{name:"Unsharpening 5×5",size:5,coefs:Float32Array.from([1/256,4/256,6/256,4/256,1/256,4/256,16/256,24/256,16/256,4/256,6/256,24/256,-476/256,24/256,6/256,4/256,16/256,24/256,16/256,4/256,1/256,4/256,6/256,4/256,1/256])},6:{name:"Gaussian 3×3",size:3,coefs:Float32Array.from([1/16,2/16,1/16,2/16,4/16,2/16,1/16,2/16,1/16])},7:{name:"Gaussian 5×5",size:5,coefs:Float32Array.from([1/273,4/273,7/273,4/273,1/273,4/273,16/273,26/273,16/273,4/273,7/273,26/273,41/273,26/273,7/273,4/273,16/273,26/273,16/273,4/273,1/273,4/273,7/273,4/273,1/273])},8:{name:"Gaussian 7×7",size:7,coefs:Float32Array.from([1/4096,6/4096,15/4096,20/4096,15/4096,6/4096,1/4096,6/4096,36/4096,90/4096,120/4096,90/4096,36/4096,6/4096,15/4096,90/4096,225/4096,300/4096,225/4096,90/4096,15/4096,20/4096,120/4096,300/4096,400/4096,300/4096,120/4096,20/4096,15/4096,90/4096,225/4096,300/4096,225/4096,90/4096,15/4096,6/4096,36/4096,90/4096,120/4096,90/4096,36/4096,6/4096,1/4096,6/4096,15/4096,20/4096,15/4096,6/4096,1/4096])}},Ot={float32:Ke,float16:Qe,uint8:Ne,uint16:Ye,uint32:Ze,uint8_clamped:Ne};function Rt(e,a){if(e===void 0)return;const[n,s]=e.shape,r=a!=null&&a.magNearest?$e:Ve,o=new Xe(e.data,s,n,We,Ot[e.dtype],qe,Se,Se,r);return o.needsUpdate=!0,o}function Re(e,a){return u.useMemo(()=>Rt(e,a),[e,a])}function Le(e,a){const n=`resources/shaders/${e}`,[s,r]=u.useState();return u.useEffect(()=>{Be.get(n).then(o=>r({name:e,data:o.data,id:a}))},[n]),s}const Lt=we("daiquiri.components.tomo.TomoAlign");var g=(e=>(e[e.IMAGE_A=0]="IMAGE_A",e[e.IMAGE_B=1]="IMAGE_B",e[e.DIFF=100]="DIFF",e[e.ERROR=101]="ERROR",e[e.MAX=102]="MAX",e[e.MIN=103]="MIN",e[e.MUL=104]="MUL",e[e.HSPLITTER=105]="HSPLITTER",e[e.DIFF_COLOR=200]="DIFF_COLOR",e[e.ERROR_COLOR=201]="ERROR_COLOR",e[e.MAX_COLOR=202]="MAX_COLOR",e[e.MIN_COLOR=203]="MIN_COLOR",e[e.MUL_COLOR=204]="MUL_COLOR",e[e.HSPLITTER_COLOR=205]="HSPLITTER_COLOR",e[e.CUSTOM=300]="CUSTOM",e))(g||{});class Mt extends et{constructor(){super({uniforms:{textureA:{value:null},normA:{value:{min:0,max:0,mode:0}},textureB:{value:null},normB:{value:{min:0,max:0,mode:0}},mode:{value:0},sizeCoef:{value:1},lateral:{value:0},tilt:{value:0},domain:{value:{min:0,max:1}},verticalSeparator:{value:0},kernelCoefs:{value:Float32Array.from([0,0,0,0,0,0,0,0,0])},kernelSize:{value:0}}})}}Je({CompareMaterial:Mt});function bt(e,a,n){return a===0||(a===105||a===205)&&e.y<n?-1:1}function Et(e){const{lateral:a,threshold:n=4,displayMode:s,verticalSeparator:r,disabled:o}=e,c=u.useRef(void 0),i=u.useCallback(x=>{const d=bt(x.dataPt,s,r);c.current={lateral:a,startData:x.dataPt,startScreen:x.htmlPt,gestureStarted:!1,coef:d}},[a,s,r]),f=u.useCallback(x=>{const d=c.current;if(d===void 0)return!1;const{htmlPt:h}=x;return Math.max(Math.abs(h.x-d.startScreen.x),Math.abs(h.y-d.startScreen.y))<=n},[n]),v=u.useCallback(x=>{const d=c.current;if(d===void 0)return;if(!d.gestureStarted){if(f(x))return;c.current={...d,gestureStarted:!0}}const h=x.dataPt.x-d.startData.x;e.onLateralIntermediateChanged(d.lateral+h*2*d.coef)},[f,e.onLateralIntermediateChanged]),j=u.useCallback(x=>{const d=c.current;if(d){const h=x.dataPt.x-d.startData.x;e.onLateralChanged(d.lateral+h*2*d.coef)}c.current=void 0},[f,e.onLateralChanged]);function O(){return oe("pointerdown",i),oe("pointermove",v),oe("pointerup",j),t.jsx(t.Fragment,{})}return t.jsx(t.Fragment,{children:!o&&t.jsx(O,{})})}function wt(e){var b,I,D;const a=u.useRef(null),{displayMode:n=1,lateral:s=0,tilt:r=0,autoScale:o=E.None,stateA:c,stateB:i,verticalSeparator:f=0,customFunc:v,filterMode:j=N.NONE,lateralInteration:O=!1}=e,x=(b=Le("compare.vert.glsl"))==null?void 0:b.data,d=(I=Le("compare.frag.glsl"))==null?void 0:I.data,[h,w]=u.useState(0),L=u.useMemo(()=>e.pixelSize===void 0?1:e.pixelSize.to("mm").scalar,[e.pixelSize]),U=u.useMemo(()=>{if(v===void 0)return d;if(d!==void 0)return d.replace("// CUSTOM FUNC INJECTION //",v)},[d,v]),z=Re(e.imageA,{magNearest:!0}),_=Re(e.imageB,{magNearest:!0}),[T,P]=u.useMemo(()=>{if(j in Z){const{size:X,coefs:k}=Z[j];return[X,k]}console.log(`Unsupported ${j}`);const{size:m,coefs:M}=Z[N.NONE];return[m,M]},[j]);u.useEffect(()=>{w(m=>m+1)},[U,x]);const V=u.useMemo(()=>{if(c===void 0||i===void 0)return{min:0,max:1};switch(o){case E.None:return{min:0,max:1};case E.Minmax:return{min:Math.min(c.min??0,i.min??0),max:Math.max(c.max??1,i.max??1)};case E.StdDev3:{const m=Math.min(c.min??0,i.min??0),M=Math.max(c.max??1,i.max??1),X=((c.mean??.5)+(i.mean??.5))*.5,k=((c.std??.5)+(i.std??.5))*.5;return{min:Math.max(m,X-3*k),max:Math.min(M,X+3*k)}}default:console.warn(`Unsupported norm ${o}`)}return{min:0,max:1}},[c,i,o]);u.useEffect(()=>{if(a.current){const m=a.current.uniforms;m.mode.value=n,m.sizeCoef.value=L,m.tilt.value=r,m.lateral.value=s,m.domain.value=V,m.verticalSeparator.value=f,m.kernelCoefs.value=P,m.kernelSize.value=T,ie()}},[a.current,n,L,s,r,c,i,V,f,P,T,h]);function H(m){return m instanceof mt?{min:m.transfer.min,max:m.transfer.max,mode:1}:{min:0,max:0,mode:0}}u.useEffect(()=>{if(a.current){const m=a.current.uniforms;m.textureA.value=z,m.normA.value=H(e.imageA),ie()}},[h,z,a.current]),u.useEffect(()=>{if(a.current){const m=a.current.uniforms;m.textureB.value=_,m.normB.value=H(e.imageB),ie()}},[h,_,a.current]);const[C,S]=((D=e.imageA)==null?void 0:D.shape)??[1024,1024];return u.useEffect(()=>{Lt(`Debug vertexShader?:${x!==void 0} fragmentShader?:${U!==void 0} textureA?:${z!==void 0} textureB?:${_!==void 0}`)},[x,U,z,_]),x===void 0||U===void 0||z===void 0||_===void 0?t.jsx(t.Fragment,{}):t.jsxs("mesh",{children:[t.jsx("planeGeometry",{attach:"geometry",args:[S*L*2,C*L*2,1,1]}),t.jsx(Et,{lateral:s*L,onLateralChanged:m=>{var M;(M=e.onLateralChanged)==null||M.call(e,.5*m/L)},onLateralIntermediateChanged:m=>{var M;(M=e.onLateralIntermediateChanged)==null||M.call(e,.5*m/L)},threshold:0,displayMode:n,verticalSeparator:f,disabled:!O}),t.jsx("compareMaterial",{attach:"material",ref:a,vertexShader:x,fragmentShader:U},h)]})}function ae(e,a,n,s){if(a===n)return e;if(a==="rad"&&n==="deg")return 180*e/Math.PI;if(a==="deg"&&n==="rad")return Math.PI*e/180;if(a==="px"){if(s!==void 0){const r=s.to("mm").scalar;return ae(e*r,"mm",n,void 0)}return Number.NaN}if(n==="px"){if(s!==void 0){const r=ae(e,a,"mm",void 0),o=s.to("mm").scalar;return r/o}return Number.NaN}try{return ce(e,a).to(n).scalar}catch{return console.error(`Convertion ${a}->${n} is not provided`),Number.NaN}}function Ut(e){return e==="um"?"μm":e}function le(e){const{style:a,className:n,decimals:s=2}=e,r=u.useRef(null),o=u.useRef(void 0),[c,i]=u.useState(!1),f=u.useMemo(()=>e.preferedDisplayUnit!==void 0&&(e.pixelSize===void 0||e.unit==="px"||e.preferedDisplayUnit==="px")?e.preferedDisplayUnit:e.displayUnit??e.unit,[e.displayUnit,e.unit,e.preferedDisplayUnit,e.pixelSize]),v=u.useCallback(d=>{if(!(d===void 0||f===void 0))return ae(d,f,e.unit,e.pixelSize)},[e.unit,f,e.pixelSize]),j=u.useCallback(d=>{if(!(d===void 0||f===void 0))return ae(d,e.unit,f,e.pixelSize)},[e.unit,f,e.pixelSize]);function O(){var w;if(o.current===void 0)return;const d=o.current,h=v(d);o.current=void 0,r.current&&(r.current.value=d.toFixed(s)),h!==void 0&&((w=e.onChange)==null||w.call(e,h)),i(!1)}function x(){var d;o.current!==void 0&&(o.current=void 0,r.current&&(r.current.value=((d=j(e.value))==null?void 0:d.toFixed(s))??""),i(!1))}return u.useEffect(()=>{var d;o.current||r.current&&(r.current.value=((d=j(e.value))==null?void 0:d.toFixed(s))??"")},[e.value]),t.jsxs(Ae,{className:n,style:a,children:[t.jsx(te.Control,{ref:r,step:e.step,type:"number",style:{backgroundColor:c?"#FFFF80":"transparent"},onChange:d=>{i(!0),o.current=Number.parseFloat(d.target.value)},onBlur:()=>{x()},onKeyDown:d=>/^[ a-z]$/i.test(d.key)?(d.preventDefault(),!1):(d.stopPropagation(),d.key==="Enter"&&O(),!0)}),t.jsx(Ae.Text,{children:Ut(f)})]})}function Me(e){const{style:a,className:n}=e,s=u.useRef({value:0,dragging:!1});return t.jsx(te.Range,{className:n,style:a,min:e.min,max:e.max,value:e.value,step:e.step,onChange:r=>{var c,i;const o=Number.parseFloat(r.target.value);s.current.value=o,s.current.dragging?(c=e.onIntermediateChange)==null||c.call(e,o):(i=e.onChange)==null||i.call(e,o)},onMouseDown:r=>{s.current.dragging=!0},onMouseUp:r=>{var o;s.current.dragging=!1,(o=e.onChange)==null||o.call(e,s.current.value)}})}function be(e){const{geometry:a,lineWidth:n=2,color:s="blue",opacity:r=1,zIndex:o=1,visible:c=!0,readOnly:i=e.onGeometryChanged===void 0}=e,[f,v]=u.useState(!1);return c?t.jsxs("group",{position:[0,a.y,o],children:[t.jsx(Oe,{children:t.jsx(yt,{pos:[0,a.y],size:[999999,Ct],pointer:"ns-resize",zIndex:o+St,enabled:!i,onPositionChanged:(j,O)=>{var x;(x=e.onGeometryChanged)==null||x.call(e,{y:j[1]},O)},onEnter:()=>{v(!0)},onLeave:()=>{v(!1)}})}),t.jsx("group",{children:t.jsx(Oe,{children:t.jsxs("mesh",{children:[t.jsx("ambientLight",{}),t.jsx("planeGeometry",{attach:"geometry",args:[999999,f?Nt:n,1,1]}),t.jsx("meshBasicMaterial",{attach:"material",transparent:!0,color:s,opacity:r})]})})})]}):t.jsx(t.Fragment,{})}function Tt(e){const{as:a,onSelect:n,value:s}=e;function r(i){const{name:f}=Z[i],v=i===N.NONE?"fa fa-fw fa-xmark":s===i?"fa fa-fw fa-circle-dot":"fa fa-fw fa-circle";return t.jsxs(F.Item,{eventKey:i,onClick:()=>{n(i)},children:[t.jsx("i",{className:v})," ",f]})}const{name:o}=Z[s],c=s===N.NONE?"Apply a convolution filter":`Filter ${o} enabled`;return t.jsxs(Te,{variant:s!==N.NONE?"primary":"secondary",as:a,title:t.jsx("i",{title:c,className:"fa fa-filter fa-fw fa-lg"}),id:"bg-vertical-dropdown-6",children:[r(N.NONE),r(N.LAPLACIAN_3x3),r(N.LAPLACIAN_9x9),r(N.SHARPENING_3x3),r(N.UNSHARPENING_3x3),r(N.UNSHARPENING_5x5),r(N.SMOOTH_3x3),r(N.SMOOTH_5x5),r(N.SMOOTH_7x7)]})}function zt(e){const[a,n,s]=ft(e,{behavior:"destroyFuture"}),[r,o]=u.useState(void 0),c=u.useMemo(()=>({...a,...r}),[a,r]);function i(f,v){v?o(j=>({...j,...f})):(n(j=>({...j,...f})),o(()=>{}))}return[c,i,s]}function kt(e){const{config:a}=e;return t.jsxs(Te,{title:t.jsx("i",{title:"Extra options",className:"fa fa-sliders fa-fw fa-lg"}),children:[t.jsxs(F.Header,{children:[t.jsx("h5",{style:{width:"8em"},children:"Auto contrast"}),t.jsxs($,{children:[t.jsx(y,{variant:a.autoscaleMode===E.None?"primary":"secondary",onClick:()=>{a.setAutoscaleMode(E.None)},children:"None"}),t.jsx(y,{variant:a.autoscaleMode===E.Minmax?"primary":"secondary",onClick:()=>{a.setAutoscaleMode(E.Minmax)},children:"Min/max"}),t.jsx(y,{variant:a.autoscaleMode===E.StdDev3?"primary":"secondary",onClick:()=>{a.setAutoscaleMode(E.StdDev3)},children:"3×std"})]})]}),t.jsx(F.Header,{children:t.jsxs(A,{direction:"horizontal",children:[t.jsx("h5",{style:{width:"8em"},children:"Vertical line"}),t.jsx(y,{title:"Show/hide a vertical line",variant:a.displayVLine?"primary":"secondary",onClick:()=>{a.setDisplayVLine(n=>!n)},children:t.jsx("i",{className:`fa ${a.displayVLine?"fa-eye":"fa-eye-slash"} fa-fw fa-lg`})})]})}),t.jsx(F.Header,{children:t.jsxs(A,{direction:"horizontal",children:[t.jsx("h5",{style:{width:"8em"},children:"Horizontal line"}),t.jsx(y,{title:"Show/hide an horizontal line",variant:a.displayHLine?"primary":"secondary",onClick:()=>{a.setDisplayHLine(n=>!n)},children:t.jsx("i",{className:`fa ${a.displayHLine?"fa-eye":"fa-eye-slash"} fa-fw fa-lg`})})]})}),t.jsx(F.Header,{children:t.jsxs(A,{direction:"horizontal",children:[t.jsx("h5",{style:{width:"8em"},children:"Show axes"}),t.jsx(y,{title:"Show/hide the axes",variant:a.displayAxes?"primary":"secondary",onClick:()=>{a.setDisplayAxes(!a.displayAxes)},children:t.jsx("i",{className:`fa ${a.displayAxes?"fa-eye":"fa-eye-slash"} fa-fw fa-lg`})})]})}),t.jsx(F.Header,{children:t.jsxs(A,{direction:"horizontal",children:[t.jsx("h5",{style:{width:"8em"},children:"Axis unit"}),t.jsxs($,{children:[t.jsx(y,{title:"Display axis as pixel",variant:a.preferedUnit==="px"?"primary":"secondary",onClick:()=>{a.setPreferedUnit("px")},children:"px"}),t.jsx(y,{title:"Display axis as milimeter if possible",variant:a.preferedUnit==="mm"?"primary":"secondary",onClick:()=>{a.setPreferedUnit("mm")},children:"mm"})]})]})})]})}function Ft(e){const{value:a,onChanged:n}=e;return t.jsxs($,{children:[t.jsx(y,{variant:a===g.IMAGE_A?"primary":"secondary",title:"Only display the image A",onClick:()=>{n(g.IMAGE_A)},children:t.jsx("i",{className:"fa fa-a fa-fw fa-lg"})}),t.jsx(y,{variant:a===g.IMAGE_B?"primary":"secondary",title:"Only display the image B",onClick:()=>{n(g.IMAGE_B)},children:t.jsx("i",{className:"fa fa-b fa-fw fa-lg"})})]})}function Ht(e){const{value:a,onChanged:n,mixedMode:s,onMixedModeChanged:r}=e;function o(i){return i>=100&&i<300}function c(i){return t.jsx(y,{variant:a===i.value?"primary":"secondary",onClick:()=>{n(i.value),r(i.value)},children:i.children})}return t.jsxs(ze,{title:t.jsx("i",{title:"Blend the two images",className:"fa fam-compare-mode fa-lg"}),variant:o(a)?"primary":"secondary",align:{lg:"start"},autoClose:!1,onClick:()=>{n(s)},children:[t.jsxs(F.Header,{children:[t.jsxs("h5",{children:[t.jsx("i",{className:"fa fam-compare-mode"})," Grey scale"]}),t.jsxs($,{children:[t.jsx(c,{value:g.MIN,children:"Min"}),t.jsx(c,{value:g.MAX,children:"Max"}),t.jsx(c,{value:g.DIFF,children:"Diff"}),t.jsx(c,{value:g.ERROR,children:"Error"}),t.jsx(c,{value:g.MUL,children:"A×B"}),t.jsx(c,{value:g.HSPLITTER,children:"Split"})]})]}),t.jsxs(F.Header,{children:[t.jsxs("h5",{children:[t.jsxs("span",{className:"fa-stack",children:[t.jsx("i",{className:"fa fam-compare-mode-left fa-stack-1x",style:{color:"cyan"}}),t.jsx("i",{className:"fa fam-compare-mode-center fa-stack-1x"}),t.jsx("i",{className:"fa fam-compare-mode-right fa-stack-1x",style:{color:"lime"}})]})," ","Green & Cyan"]}),t.jsxs($,{children:[t.jsx(c,{value:g.MIN_COLOR,children:"Min"}),t.jsx(c,{value:g.MAX_COLOR,children:"Max"}),t.jsx(c,{value:g.DIFF_COLOR,children:"Diff"}),t.jsx(c,{value:g.ERROR_COLOR,children:"Error"}),t.jsx(c,{value:g.MUL_COLOR,children:"A×B"}),t.jsx(c,{value:g.HSPLITTER_COLOR,children:"Split"})]})]})]})}function Pt(e){const a=u.useRef(e.defaultValue??""),[n,s]=u.useState(!1);function r(i){a.current=i,s(!0)}function o(){var i;(i=e.onChange)==null||i.call(e,a.current),s(!1)}const c=i=>{i.key==="Enter"&&i.ctrlKey&&o()};return tt.useEffect(()=>(document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}),[]),t.jsxs(A,{direction:"vertical",gap:1,className:"mx-auto",children:[t.jsx("textarea",{rows:5,cols:40,defaultValue:a.current,onChange:i=>{r(i.target.value)}}),t.jsx(y,{variant:n?"primary":"secondary",onClick:()=>{o()},children:"Apply (Ctrl+Return)"})]})}function Dt(e){const{value:a,onChanged:n,customFunc:s,onCustomFuncChanged:r}=e;return t.jsx(ze,{title:t.jsx("i",{title:"Advanced blending based on custom webgl code",className:"fa fa-square-root-variable fa-fw fa-lg"}),variant:a===g.CUSTOM?"primary":"secondary",align:{lg:"start"},autoClose:!1,onClick:()=>{n(g.CUSTOM)},children:t.jsx(F.Header,{children:t.jsx(Pt,{defaultValue:s,onChange:o=>{r(o)}})})})}function Gt(e){const{nabu_method:a,nabu_lateral_corr:n,nabu_camera_tilt:s,nabu_exception:r}=e;return!a&&!n&&!s&&!r?null:{method:a,lateral_corr:n,camera_tilt:s,exception:r}}function Bt(e){const{lateral_motor:a,camera_tilt_motor:n}=e;return!a&&!n?null:{lateral_motor:a,camera_tilt_motor:n}}function $t(e){return e==="um"?"μm":e}function Vt(e,a,n,s){return u.useMemo(()=>{function r(i){return i==="um"?"μm":i}function o(i){return i.toFixed(s).replace(/\.?0+$/,"")}if(e===null)return["∅",""];if(a===n)return[o(e),r(n)];const c=ce(e,a);return[o(c.to(n).scalar),r(n)]},[e,a,n])}function Ee(e){const{value:a=null,unit:n,displayUnit:s,style:r,className:o,decimals:c=2}=e,[i,f]=Vt(a,n,s??n,c);return t.jsxs("span",{style:r,className:o,title:`${a} ${n}`,children:[i," ",$t(f)]})}function Xt(e){var o;const{nabuCorrection:a,decimals:n=2,lateralUnit:s="mm"}=e;if(a===null)return t.jsx(t.Fragment,{});const r=(o=a.exception)==null?void 0:o.message;return t.jsxs(Ue,{children:[t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Estimator"}),t.jsx(p,{xs:8,children:a.method?"nabu":"none"})]}),t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Method"}),t.jsx(p,{xs:8,children:a.method})]}),t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Lateral"}),t.jsx(p,{xs:8,children:t.jsx(Ee,{value:(a==null?void 0:a.lateral_corr)??0,unit:"mm",displayUnit:s,decimals:n})})]}),t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Tilt"}),t.jsx(p,{xs:8,children:t.jsx(Ee,{value:(a==null?void 0:a.camera_tilt)??0,unit:"deg",decimals:n})})]}),r&&t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Failure?"}),t.jsx(p,{xs:8,children:r})]})]})}function Wt(e){var n,s;const{description:a}=e;return a===null?t.jsx(t.Fragment,{}):t.jsxs(Ue,{children:[t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Lateral axis"}),t.jsx(p,{xs:8,children:(n=a.lateral_motor)==null?void 0:n.name})]}),t.jsxs(B,{children:[t.jsx(p,{xs:4,children:"Tilt axis"}),t.jsx(p,{xs:8,children:(s=a.camera_tilt_motor)==null?void 0:s.name})]})]})}function qt(e){var xe,he,ge,ve,je,ye;const{imageA:a,imageB:n,pixelSize:s,config:r,parameters:o,procedure:c,ignoreTilt:i=!1,decimals:f=2,lateralUnit:v="um"}=e,[j,O]=u.useState(g.MIN_COLOR),[x,d]=u.useState(g.MIN_COLOR),h=u.useRef(null),[w,L]=u.useState(0),[U,z]=u.useState(0),_=ht("zoom"),{mouseMode:T}=_,[P,V]=u.useState(void 0),[H,C]=u.useState(N.NONE),[S,b]=u.useState(0),[I,D]=u.useState(`// a: Intensity from image A, [0..1], -1 = out
|
|
2
|
-
// b: Intensity from image B, [0..1], -1 = out
|
|
3
|
-
// return: R, G, B, alpha values, [0..1]
|
|
4
|
-
return vec4(a, b, 0.0, 1.0);`),m=xt(),M=at(c.id),[X,k,K]=zt({lateral:0,tilt:0});u.useEffect(()=>{K.reset({lateral:o.nabu_lateral_corr??0,tilt:(i?0:o.nabu_camera_tilt??0)*(Math.PI/180)})},[o.nabu_lateral_corr??0,o.nabu_camera_tilt??0]);const{tilt:J,lateral:G}=X,Q=u.useMemo(()=>{if(s!==void 0&&r.preferedUnit!=="px")return s.to("mm").scalar},[r.preferedUnit,s]);function de(l){k({tilt:l},!0)}function ee(l){k({lateral:l},!0)}function ue(l){k({tilt:l},!1)}function W(l){k({lateral:l},!1)}u.useEffect(()=>{var l;(l=h.current)==null||l.actions.clearLater()},[a,n]);const[ne,re]=((xe=a==null?void 0:a[0])==null?void 0:xe.shape)??[1024,1024],{abscissaConfig:ke,ordinateConfig:Fe}=u.useMemo(()=>{const l=Q?"mm":"px",R=Q??1;return{abscissaConfig:{visDomain:[-re*R*.8,re*R*.8],label:`x (${l})`},ordinateConfig:{visDomain:[-ne*R*.6,ne*R*.6],label:`y (${l})`}}},[re,ne,Q]),Y=((he=c.properties)==null?void 0:he.state)==="AWAITING_USER_INPUT",He=((ge=c.properties)==null?void 0:ge.state)==="ABORTING",Pe=c.properties.state==="RUNNING"||Y||He,me=Gt(o),fe=Bt(o);u.useEffect(()=>{!Y&&_.mouseMode==="move-lateral"&&_.resetMouseMode()},[Y]);const De=u.useMemo(()=>({"move-lateral":"ew-resize"}),[]);return t.jsxs(A,{direction:"horizontal",gap:2,onKeyDown:l=>{var R,Ce;l.key===" "&&(d(Ge=>Ge===g.IMAGE_A?g.IMAGE_B:g.IMAGE_A),l.preventDefault()),l.key==="ArrowLeft"&&(W(G-Number(((R=e.pixelSize)==null?void 0:R.scalar)??0)*.5),l.preventDefault()),l.key==="ArrowRight"&&(W(G+Number(((Ce=e.pixelSize)==null?void 0:Ce.scalar)??0)*.5),l.preventDefault())},tabIndex:-1,style:e.style,children:[t.jsxs(A,{direction:"vertical",style:{alignSelf:"stretch",flexGrow:4,minWidth:0},children:[t.jsxs(gt,{align:"center",style:{zIndex:1},children:[t.jsx(vt,{mouseModeInteraction:_}),t.jsxs($,{children:[t.jsx(y,{title:"Reset zoom",variant:"secondary",onClick:()=>{var l;(l=h==null?void 0:h.current)==null||l.actions.resetZoom()},children:t.jsx("i",{className:"fa fa-expand fa-fw fa-lg"})}),t.jsx(y,{disabled:!m[2].canUndo,title:"Undo the last changes applied to the corrections",onClick:()=>{m[2].undo()},children:t.jsx("i",{className:"fa fa-reply fa-fw fa-lg"})}),t.jsx(y,{disabled:!m[2].canRedo,title:"Redo the last reverted changes applied to the corrections",onClick:()=>{m[2].redo()},children:t.jsx("i",{className:"fa fa-share fa-fw fa-lg"})})]}),t.jsx(pe,{}),t.jsx(_t,{mouseModeInteraction:_}),t.jsx(Ft,{value:x,onChanged:l=>{d(l)}}),t.jsx(Ht,{value:x,onChanged:l=>{d(l)},mixedMode:j,onMixedModeChanged:O}),t.jsx(Dt,{value:x,onChanged:l=>{d(l)},customFunc:I,onCustomFuncChanged:l=>{D(l)}}),t.jsx(Tt,{value:H,onSelect:l=>{C(l)}}),t.jsx(pe,{}),t.jsx(kt,{config:r})]}),t.jsx(u.Suspense,{fallback:null,children:t.jsxs(jt,{undoableViewpoint:m,plotRef:h,abscissaConfig:ke,ordinateConfig:Fe,aspect:"equal",showAxes:r.displayAxes,onMouseInteractionOverlayChanged:V,cursors:De,mouseMode:T,children:[t.jsx(At,{unit:Q===void 0?"px":"mm"}),t.jsx(pt,{loading:e.loading,warning:a===void 0||n===void 0?"No data":void 0}),a&&n&&t.jsx(wt,{imageA:a[0],imageB:n[0],stateA:a[1],stateB:n[1],displayMode:x,lateral:-G*2/(((ve=e.pixelSize)==null?void 0:ve.scalar)??0),pixelSize:r.preferedUnit!=="px"?e.pixelSize:void 0,onLateralChanged:l=>{var R;W(-l*(((R=e.pixelSize)==null?void 0:R.scalar)??0))},onLateralIntermediateChanged:l=>{var R;ee(-l*(((R=e.pixelSize)==null?void 0:R.scalar)??0))},tilt:J,autoScale:r.autoscaleMode,verticalSeparator:S,customFunc:I,filterMode:H,lateralInteration:P===void 0&&T==="move-lateral"}),t.jsx(dt,{geometry:{x:w},onGeometryChanged:l=>{L(l.x)},visible:r.displayVLine}),t.jsx(be,{geometry:{y:U},onGeometryChanged:l=>{z(l.y)},visible:r.displayHLine}),t.jsx(be,{geometry:{y:S},color:"red",onGeometryChanged:l=>{b(l.y)},visible:x===g.HSPLITTER||x===g.HSPLITTER_COLOR}),t.jsx(It,{mouseMode:T,disabled:P!==void 0,plotUnit:Q===void 0?"px":"mm"})]})})]}),t.jsx(A,{direction:"vertical",gap:2,className:"m-1",style:{width:"20em"},children:t.jsxs(A,{style:{minWidth:"20em"},className:"mt-4",direction:"vertical",gap:2,children:[t.jsx(se,{in:!!fe,dimension:"height",children:t.jsxs("div",{children:[t.jsx("h4",{children:"Description"}),t.jsx(Wt,{description:fe})]})}),t.jsx(se,{in:!!me,dimension:"height",children:t.jsxs("div",{children:[t.jsx("h4",{children:"Estimation"}),t.jsx(Xt,{nabuCorrection:me,lateralUnit:v,decimals:f})]})}),t.jsx(se,{in:Y,dimension:"height",children:t.jsxs("div",{children:[t.jsx("h4",{children:"Correction"}),t.jsxs(A,{className:"mb-2",direction:"horizontal",children:[t.jsx(y,{className:"me-1",variant:T==="move-lateral"?"primary":"secondary",title:"Shift the two images to compare and edit the ROIs",onClick:()=>{_.setOrResetMouseMode("move-lateral")},children:t.jsx("i",{className:"fa fa-arrow-right-arrow-left fa-fw fa-lg"})}),t.jsxs($,{children:[t.jsx(y,{disabled:!K.canUndo,title:"Undo the last changes applied to the corrections",onClick:()=>{K.undo()},children:t.jsx("i",{className:"fa fa-reply fa-fw fa-lg"})}),t.jsx(y,{disabled:!K.canRedo,title:"Redo the last reverted changes applied to the corrections",onClick:()=>{K.redo()},children:t.jsx("i",{className:"fa fa-share fa-fw fa-lg"})})]})]}),t.jsxs(A,{direction:"horizontal",gap:2,children:[t.jsx(te.Label,{style:{width:"5em"},children:"Lateral"}),t.jsxs(A,{direction:"vertical",gap:2,children:[t.jsx(le,{value:G,unit:"mm",preferedDisplayUnit:v,step:.01,decimals:f,onChange:l=>{W(l)},onIntermediateChange:l=>{ee(l)}}),t.jsx(le,{value:G,unit:"mm",decimals:f,preferedDisplayUnit:"px",pixelSize:e.pixelSize,step:.01,onChange:l=>{W(l)},onIntermediateChange:l=>{ee(l)}}),t.jsx(Me,{min:-200*(((je=e.pixelSize)==null?void 0:je.scalar)??0),max:200*(((ye=e.pixelSize)==null?void 0:ye.scalar)??0),value:G,step:.01,onChange:l=>{W(l)},onIntermediateChange:l=>{ee(l)}})]})]}),!i&&t.jsxs(A,{direction:"horizontal",gap:2,children:[t.jsx(te.Label,{style:{width:"5em"},children:"Tilt"}),t.jsxs(A,{direction:"vertical",gap:2,children:[t.jsx(le,{step:.01,value:J,unit:"rad",decimals:f,displayUnit:"deg",onChange:l=>{ue(l)},onIntermediateChange:l=>{de(l)}}),t.jsx(Me,{min:-1,max:1,step:.01,value:J,onChange:l=>{ue(l)},onIntermediateChange:l=>{de(l)}})]})]}),t.jsxs(A,{className:"mx-auto mt-4 justify-content-center",direction:"horizontal",gap:2,children:[t.jsx(y,{variant:"danger",size:"lg",disabled:!Y,onClick:()=>{M.call("validate",{lateral_corr:G,camera_tilt:i?null:J*180/Math.PI})},title:"This will apply the correction to the axes of the beamline",children:"Apply corrections"}),t.jsx(y,{size:"lg",onClick:()=>{M.call("abort")},disabled:!Pe,children:"Abort"})]})]})})]})})]})}function Kt(){const[e,a]=q("tomo/align/colormap/autoscalemode",E.StdDev3),[n,s]=q("tomo/align/axes",!0),[r,o]=q("tomo/align/vline",!1),[c,i]=q("tomo/align/hline",!1),[f,v]=q("tomo/align/crosshair",!1),[j,O]=q("tomo/align/preferedunit","mm");return{autoscaleMode:e,setAutoscaleMode:a,displayAxes:n,setDisplayAxes:s,displayVLine:r,setDisplayVLine:o,displayHLine:c,setDisplayHLine:i,crossHair:f,setCrossHair:v,preferedUnit:j,setPreferedUnit:O}}we("daiquiri.components.tomo.TomoAlign");function Qt(e){var H;const{options:a}=e,n=Kt(),{procedure:s,ignoretilt:r=!1,decimals:o,lateralunit:c}=a,i=nt(s??""),f=(i==null?void 0:i.properties)??{},v=(f==null?void 0:f.parameters)??{},j=(H=v.data_scan)==null?void 0:H.key,O=u.useMemo(()=>{if(v.pixel_size_mm!==void 0)return new ce(v.pixel_size_mm,"mm")},[v.pixel_size_mm]),x=ut({scanId:j,channelNames:["proj0","proj0_min","proj0_max","proj0_min_positive","proj0_mean","proj0_std","proj180","proj180_min","proj180_max","proj180_min_positive","proj180_mean","proj180_std"],start:0,stop:1});function d(C){var b,I;if(((b=x==null?void 0:x.request)==null?void 0:b.scanId)!==j)return;const S=(I=x.data[C])==null?void 0:I.pick(0,null,null);return S&&Ie(S)}function h(C){var I;const S=(I=x.data[C])==null?void 0:I.pick(0,null,null);return S===void 0?void 0:Ie(S).data[0]}function w(C){const S=h(`${C}_min`),b=h(`${C}_max`),I=h(`${C}_min_positive`),D=h(`${C}_mean`),m=h(`${C}_std`);if(!(S===void 0||b===void 0||I===void 0||D===void 0||m===void 0))return{min:S,max:b,mean:D,std:m,minPositive:I}}const L=d("proj0"),U=d("proj180"),z=w("proj0"),_=w("proj180");function T(C,S){return u.useMemo(()=>{if(!(C===void 0||S===void 0))return[C,S]},[C,S])}const P=T(L,z),V=T(U,_);try{_e(L),_e(U)}catch{return t.jsx(t.Fragment,{children:"Image data unsupported"})}return i===null?t.jsxs(rt,{variant:"danger",children:["Procedure ",s," is not available"]}):t.jsx(qt,{procedureId:j==null?void 0:j.toString(),config:n,procedure:i,parameters:v,pixelSize:O,imageA:P,imageB:V,loading:x.loading,ignoreTilt:r,decimals:o,lateralUnit:c,style:{flexGrow:1,flexShrink:1,minWidth:0,minHeight:0,alignSelf:"stretch",width:"100%",height:"100%"}})}function Yt(e){return t.jsx(Qt,{...e})}function xa(e){const{yamlNode:a,procedure:n,ignoretilt:s,decimals:r,lateralunit:o,...c}=e;it(a,"procedure",n),st(a,"ignoretilt",s),ot(a,"decimals",r),lt(a,"lateralunit",o),ct(a,c);const i={procedure:n,ignoretilt:s,decimals:r,lateralunit:o};return t.jsx(Yt,{options:i})}export{xa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as y,l as T,an as he,aW as fe,j as e,au as G,ay as I,g as je,R as k,C as p,aj as R,B as Q,aU as v,aX as be,aY as Te,aZ as Fe,aQ as Pe,a1 as Re,q as He}from"./index-0751d893.js";import{T as x,a as E,I as ke,A as Ie}from"./AutoscaleOption-d8d0ca8d.js";import{u as Ee,L as Oe,a as ze,T as J,D as Le,S as Be}from"./UseMouseModeInteraction-fc86164b.js";import{O as ge,F as ye,a as pe,h as Ue,k as te,H as ae,m as Ye,U as Ge,l as $e,w as We}from"./index-a0f7b98c.js";import{R as Ve}from"./RectRoi-19381507.js";import{u as Ke,a as Qe,b as _e,D as qe}from"./DropdownDetector-4ddfa946.js";import{O as Ae}from"./OptionsProcess-6fd11ce7.js";import{u as Xe}from"./colormap-344855f8.js";import{L as Ze}from"./LoadingMessage-e1e479c5.js";import{d as Me,t as ve}from"./hooks-457bfe32.js";import"./Image-1ff7dca9.js";import"./Anchor-3fa6d19c.js";import"./ScreenScale-ae820d30.js";import"./DraggableRect-db33e02e.js";function Je(s,a){const[o,t]=(a==null?void 0:a.shape)??[0,0],i=y.useMemo(()=>s===null?null:{xmin:Math.round(T.clamp(Math.min(s.x1,s.x2),0,t)),xmax:Math.round(T.clamp(Math.max(s.x1,s.x2),0,t)),ymin:Math.round(T.clamp(Math.min(s.y1,s.y2),0,o)),ymax:Math.round(T.clamp(Math.max(s.y1,s.y2),0,o))},[s,t,o]);return y.useMemo(()=>{if(i===null||!a||!a.shape||a.shape.length!==2||i.xmin>=i.xmax||i.ymin>=i.ymax)return null;const c=he(a.data,a.shape).hi(i.ymax,i.xmax).lo(i.ymin,i.xmin),r=fe.sum(c),d=(i.ymax-i.ymin)*(i.xmax-i.xmin);return r/d},[i,a])}function $(s,a){const[o,t]=(a==null?void 0:a.shape)??[0,0],i=y.useMemo(()=>s===null?null:{xmin:Math.round(T.clamp(Math.min(s.x1,s.x2),0,t)),xmax:Math.round(T.clamp(Math.max(s.x1,s.x2),0,t)),ymin:Math.round(T.clamp(Math.min(s.y1,s.y2),0,o)),ymax:Math.round(T.clamp(Math.max(s.y1,s.y2),0,o))},[s,t,o]);return y.useMemo(()=>{if(i===null||!a||!a.shape||a.shape.length!==2)return null;if(i.xmin>=i.xmax)return{sum:0,n:0};if(i.ymin>=i.ymax)return{sum:0,n:0};const c=he(a.data,a.shape).hi(i.ymax,i.xmax).lo(i.ymin,i.xmin),r=fe.sum(c),d=(i.ymax-i.ymin)*(i.xmax-i.xmin);return{sum:r,n:d}},[i,a])}function W(s,a){return s===null?a:a===null?s:{sum:s.sum+a.sum,n:s.n+a.n}}function V(s){return s===null?null:s.sum/s.n}function K(s){const{geometry:a,image:o}=s,t=Je(a,o);return e.jsxs(e.Fragment,{children:[t!==null&&e.jsx(ge,{x:Math.min(a.x1,a.x2),y:Math.min(a.y1,a.y2),children:e.jsx("div",{className:"ms-2 mt-2",title:"Mean grey level",children:e.jsxs("div",{className:"bg-dark text-light p-1 rounded font-tabular-nums",children:[e.jsx("i",{className:"fa-solid fa-circle-half-stroke fa-fw fa-lg"})," ",t.toFixed(2)]})})}),e.jsx(Ve,{...s})]})}function es(s){const{geometry00:a,geometry01:o,geometry10:t,geometry11:i,image:l}=s,c=$(a,l),r=$(o,l),d=$(t,l),u=$(i,l);if(c===null&&r===null&&d===null&&u===null)return e.jsx(e.Fragment,{});const m=c,h=r,j=d,g=u;function n(L){return`${Math.abs(L).toFixed(1)}`}const D=V(W(h,m))??0,O=V(W(g,j))??0,z=V(W(m,j))??0,_=V(W(h,g))??0,F=D-O,N=z-_;return e.jsx(e.Fragment,{children:e.jsxs("table",{cellSpacing:10,className:"mt-3",children:[e.jsxs("tr",{children:[e.jsx("td",{children:" "}),e.jsx("td",{children:" "}),e.jsxs("td",{className:"text-center",style:{width:"5em"},children:["Top",N>0&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"+",n(N)]})]}),e.jsx("td",{children:" "}),e.jsx("td",{children:" "})]}),e.jsxs("tr",{children:[e.jsx("td",{children:" "}),e.jsx("td",{children:" "}),e.jsx("td",{className:"text-center",children:N>0?e.jsx(G,{bg:"info",title:"More intensity on top",children:"↑"}):" "}),e.jsx("td",{children:" "}),e.jsx("td",{children:" "})]}),e.jsxs("tr",{children:[e.jsxs("td",{className:"pe-2 text-center",style:{width:"5em"},children:["Left",F>0&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"+",n(F)]})]}),e.jsx("td",{children:F>0?e.jsx(G,{bg:"info",title:"More intensity on left",children:"←"}):" "}),e.jsx("td",{children:" "}),e.jsx("td",{children:F<0?e.jsx(G,{bg:"info",title:"More intensity on right",children:"→"}):" "}),e.jsxs("td",{className:"ps-2 text-center",style:{width:"5em"},children:["Right",F<0&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"+",n(-F)]})]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:" "}),e.jsx("td",{children:" "}),e.jsx("td",{className:"text-center",children:N<0?e.jsx(G,{bg:"info",title:"More intensity on bottom",children:"↓"}):" "}),e.jsx("td",{children:" "}),e.jsx("td",{children:" "})]}),e.jsxs("tr",{children:[e.jsx("td",{children:" "}),e.jsx("td",{children:" "}),e.jsxs("td",{className:"ps-2 text-center",style:{width:"5em"},children:["Bottom",N<0&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"+",n(-N)]})]}),e.jsx("td",{children:" "}),e.jsx("td",{children:" "})]})]})})}function ss(s,a){return s===a?"primary":"secondary"}function w(s){return e.jsx(Q,{variant:ss(s.var,s.value),onClick:()=>{s.setter(s.value)},className:"text-nowrap",size:"sm",children:s.children})}function ts(s){const{as:a=void 0,variant:o="secondary",config:t}=s;return e.jsxs(I,{as:a,children:[e.jsx(I.Toggle,{id:"dropdown-basic",variant:o,className:"d-flex align-items-center",children:e.jsx("i",{className:"fa fa-sliders fa-fw fa-lg"})}),e.jsx(I.Menu,{className:"dropdown-menu-center",children:e.jsx("div",{className:"ms-1 me-1",style:{minWidth:"300px"},children:e.jsxs(je,{children:[e.jsxs(k,{children:[e.jsx(p,{className:"my-auto",children:"Display axes"}),e.jsx(p,{xs:7,children:e.jsxs(R,{children:[e.jsx(w,{var:t.displayAxes,value:!0,setter:t.setDisplayAxes,children:"Yes"}),e.jsx(w,{var:t.displayAxes,value:!1,setter:t.setDisplayAxes,children:"No"})]})})]}),e.jsxs(k,{className:"mt-1",children:[e.jsx(p,{className:"my-auto",children:"Crosshair"}),e.jsx(p,{xs:7,children:e.jsxs(R,{children:[e.jsx(w,{var:t.crossHair,value:!0,setter:t.setCrossHair,children:"Yes"}),e.jsx(w,{var:t.crossHair,value:!1,setter:t.setCrossHair,children:"No"})]})})]}),e.jsxs(k,{className:"mt-1",children:[e.jsx(p,{className:"my-auto",children:"Mean level"}),e.jsx(p,{xs:7,children:e.jsxs(R,{children:[e.jsx(w,{var:t.displayMean,value:!0,setter:t.setDisplayMean,children:"Show"}),e.jsx(w,{var:t.displayMean,value:!1,setter:t.setDisplayMean,children:"Hide"})]})})]}),e.jsxs(k,{className:"mt-1",children:[e.jsx(p,{className:"my-auto",children:"Timestamp"}),e.jsx(p,{xs:7,children:e.jsxs(R,{children:[e.jsx(w,{var:t.displayEpoch,value:!0,setter:t.setDisplayEpoch,children:"Show"}),e.jsx(w,{var:t.displayEpoch,value:!1,setter:t.setDisplayEpoch,children:"Hide"})]})})]}),e.jsxs(k,{className:"mt-1",children:[e.jsx(p,{className:"my-auto",children:"Histogram"}),e.jsx(p,{xs:7,children:e.jsxs(R,{children:[e.jsx(w,{var:t.displayHistogram,value:!0,setter:t.setDisplayHistogram,children:"Show"}),e.jsx(w,{var:t.displayHistogram,value:!1,setter:t.setDisplayHistogram,children:"Hide"})]})})]})]})})})]})}function as(){const[s,a]=v("tomo/detectorview/axes",!0),[o,t]=v("tomo/detectorview/crosshair",!1),[i,l]=v("tomo/detectorview/mean",!0),[c,r]=v("tomo/detectorview/epoch",!1),[d,u]=v("tomo/detectorview/histogram",!1),[m,h]=v("tomo/beamshaping/rois/marging-percent",.1);return{displayAxes:s,setDisplayAxes:a,crossHair:o,setCrossHair:t,displayMean:i,setDisplayMean:l,displayEpoch:c,setDisplayEpoch:r,displayHistogram:d,setDisplayHistogram:u,roiMarginPencent:m,setRoiMarginPencent:h}}function ee(s,a){return s===void 0?"":Math.round(s)===s?s.toFixed(0):s.toFixed(a)}function ns(s,a){switch(a){case x.Dark:case x.Flat:case x.Proj:return[ee(s,0),"count"];case x.FlatfieldNorm:case x.ProjDarkNorm:case x.ProjFlatNorm:case x.ProjNorm:return[ee(s,2),"count/s"];default:return[ee(s,2),""]}}function is(s){const[a,o]=ns(s.pixel,s.dataKind);return e.jsx("table",{children:e.jsxs("tbody",{children:[e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{className:"pe-2",children:"Coord x/y"}),e.jsxs("td",{className:"text-end",children:[s.px.toFixed(0)," × ",s.py.toFixed(0)]}),e.jsx("td",{className:"text-start",children:"px"})]}),s.pixel!==void 0&&e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{className:"pe-2",children:"Intensity"}),e.jsx("td",{className:"text-end",children:a}),e.jsx("td",{className:"text-start",children:o})]})]})})}function os(s){const{x:a,y:o,showMean:t,mean:i,showEpoch:l,epoch:c}=s,r=y.useMemo(()=>{if(c!==void 0)return new Date(c*1e3)},[c]);if(!l&&(!t||i===void 0))return e.jsx(e.Fragment,{});function d(u){return u===void 0?"Undefined":`${u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:1})}`}return e.jsxs(ge,{x:a,y:o,children:[t&&i!==void 0&&e.jsx("div",{className:"ms-2 mt-2",title:"Mean grey level",children:e.jsxs("div",{className:"bg-dark text-light p-1 rounded font-tabular-nums",children:[e.jsx("i",{className:"fa-solid fa-circle-half-stroke fa-fw fa-lg"})," ",i.toFixed(2)]})}),l&&e.jsx("div",{className:"ms-2 mt-2",title:`Timestamp (${(r==null?void 0:r.toUTCString())??"undefined"})`,children:e.jsxs("div",{className:"bg-dark text-light p-1 rounded font-tabular-nums",children:[e.jsx("i",{className:"fa-solid fa-clock fa-fw fa-lg"})," ",d(r)]})})]})}function ls(s,a){return s===a?"primary":"secondary"}function se(s){return e.jsx(Q,{variant:ls(s.var,s.value),onClick:()=>{s.setter(s.value)},className:"text-nowrap",size:"sm",children:s.children})}function rs(s){const{as:a=void 0,variant:o="secondary",config:t}=s;return e.jsxs(I,{as:a,children:[e.jsx(I.Toggle,{id:"dropdown-basic",variant:o,className:"d-flex align-items-center",children:e.jsx("i",{className:"fa fa-sliders fa-fw fa-lg"})}),e.jsx(I.Menu,{className:"dropdown-menu-center",children:e.jsx("div",{className:"ms-1 me-1",style:{minWidth:"300px"},children:e.jsx(je,{children:e.jsxs(k,{children:[e.jsx(p,{className:"my-auto",children:"ROI margins"}),e.jsx(p,{xs:7,children:e.jsxs(R,{children:[e.jsx(se,{var:t.roiMarginPencent,value:.01,setter:t.setRoiMarginPencent,children:"1%"}),e.jsx(se,{var:t.roiMarginPencent,value:.05,setter:t.setRoiMarginPencent,children:"5%"}),e.jsx(se,{var:t.roiMarginPencent,value:.1,setter:t.setRoiMarginPencent,children:"10%"})]})})]})})})})]})}const de=[.1,1];function cs(s){const{histogram:a,scaleType:o,onDomainChange:t,domain:i=[0,1]}=s,l=Me(a),{bins:c,values:r}=l,d=ve(o),u=ye(c,d),m=y.useMemo(()=>u||(s.dataMin!==void 0&&s.dataMax!==void 0?d===pe.Log&&(s.dataMin<=0||s.dataMax<=0)?de:[s.dataMin,s.dataMax]:de),[u,s.dataMin,s.dataMax,d]),[h,j]=y.useState([null,null]);return y.useEffect(()=>{j(i)},[i[0],i[1]]),h[0]===null||h[1]===null?e.jsx(e.Fragment,{}):e.jsx(Ue,{dataDomain:m,scaleType:d,value:h,onChangeMin:g=>{const n=te([g,h[1]],m),[D]=ae(n,m,d);t(D)},onChangeMax:g=>{const n=te([h[0],g],m),[D]=ae(n,m,d);t(D)},bins:c,values:r})}const me=new Float64Array([]);function ds(s){var a,o,t,i;return e.jsx(cs,{histogram:{values:((a=s.histogram)==null?void 0:a.values.data)??me,bins:((o=s.histogram)==null?void 0:o.bins.data)??me},colorMap:s.colorMap,invertColorMap:s.invertColorMap,dataMin:((t=s.statistics)==null?void 0:t.min)??void 0,dataMax:((i=s.statistics)==null?void 0:i.max)??void 0,scaleType:s.scaleType,domain:s.scaleDomain,onDomainChange:l=>{s.autoscale&&s.setAutoscale(!1),s.setScaleDomain(l)}})}const ue=[.1,1];function ms(s){const{dataDomain:a,customDomain:o,scaleType:t,disabled:i=!1}=s,{onCustomDomainChange:l}=s,c=Ye(o,a),[r,d]=Ge(c,a,t),[u,m]=y.useState(c);y.useEffect(()=>{m(c)},[c]);const h=o[0]===null,j=o[1]===null;return e.jsx("div",{style:{width:"1fr",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",padding:"1em"},children:e.jsx("div",{style:{display:"flex",flex:1,padding:"0 0.375rem",marginRight:"-0.375rem"},children:e.jsx($e,{value:u,safeVisDomain:r,dataDomain:a,scaleType:t,errors:d,isAutoMin:h,isAutoMax:j,disabled:i,onChange:g=>{m(g)},onAfterChange:(g,n)=>{l([g?u[0]:o[0],n?u[1]:o[1]])}})})})}function us(s){const{histogram:a,scaleType:o,onDomainChange:t,domain:i=[0,1]}=s,l=Me(a),{bins:c}=l,r=ve(o),[d,u]=y.useState([null,null]),m=ye(c,r),h=y.useMemo(()=>m||(s.dataMin!==void 0&&s.dataMax!==void 0?r===pe.Log&&(s.dataMin<=0||s.dataMax<=0)?ue:[s.dataMin,s.dataMax]:ue),[m,s.dataMin,s.dataMax,r]);return y.useEffect(()=>{u(i)},[i[0],i[1]]),e.jsx(ms,{dataDomain:h,customDomain:d,scaleType:r,onCustomDomainChange:j=>{const g=te(j,h),[n]=ae(g,h,r);t(n)}})}const xe=new Float64Array([]);function xs(s){var a,o,t,i;return e.jsx(us,{histogram:{values:((a=s.histogram)==null?void 0:a.values.data)??xe,bins:((o=s.histogram)==null?void 0:o.bins.data)??xe,colorMap:s.colorMap,invertColorMap:s.invertColorMap},dataMin:((t=s.statistics)==null?void 0:t.min)??void 0,dataMax:((i=s.statistics)==null?void 0:i.max)??void 0,scaleType:s.scaleType,domain:s.scaleDomain,onDomainChange:l=>{s.autoscale&&s.setAutoscale(!1),s.setScaleDomain(l)}})}function hs(s){var re;const{options:a}=s,{tomoconfig:o}=a,t=Ke(),i=be(o??""),l=Te(i),c=Qe({sampleStage:l}),r=((re=l.detector)==null?void 0:re.id)??"",u=Fe()[r],[m,h]=v("tomo/beamshaping/process",E.Proj),j=as(),g=_e({detector:c,sampleStage:l,profile:t.profile,normalization:t.scaleType,autoscale:t.autoscale,autoscaleMode:t.autoscaleMode,domain:t.scaleDomain,histogram:j.displayHistogram,enabled:!0,minRefreshPeriod:.5,processing:m}),n=g.data;Xe({statistics:n==null?void 0:n.statistics,...t});const D=y.useRef(null),O=y.useRef(null),z=Ee("zoom"),{mouseMode:_,setMouseMode:F}=z,[N,L]=v("tomo/beamshaping/roi00",null),[q,ne]=v("tomo/beamshaping/roi01",null),[A,ie]=v("tomo/beamshaping/roi10",null),[X,oe]=v("tomo/beamshaping/roi11",null),H=n==null?void 0:n.statistics,[De,Ne]=y.useState(!1);function we(M){var ce;const S=M.roiMarginPencent,B=((ce=n==null?void 0:n.array)==null?void 0:ce.shape)??[0,0],[P,Z]=B,f=Math.max(Z,P)*S,U=(Z-f*3)*.5,Y=(P-f*3)*.5,C=P*.5,b=Z*.5;L({x1:C-f*.5,y1:b-f*.5,x2:C-f*.5-U,y2:b-f*.5-Y}),ne({x1:C-f*.5,y1:b+f*.5,x2:C-f*.5-U,y2:b+f*.5+Y}),ie({x1:C+f*.5,y1:b-f*.5,x2:C+f*.5+U,y2:b-f*.5-Y}),oe({x1:C+f*.5,y1:b+f*.5,x2:C+f*.5+U,y2:b+f*.5+Y})}const le=(n==null?void 0:n.detectorSize)??{width:1,height:1};function Se(M,S){return!S||{[E.Flatfield]:x.FlatfieldNorm,[E.Proj]:x.Proj,[E.Dark]:x.Dark,[E.Flat]:x.Flat}[M]===S?void 0:{[x.Dark]:"Dark",[x.Flat]:"Flat",[x.Proj]:"Proj",[x.Unknown]:"Unknown data",[x.FlatfieldNorm]:void 0,[x.ProjNorm]:"Only normalized proj",[x.ProjDarkNorm]:"Only normalized proj-dark",[x.ProjFlatNorm]:"Only normalized proj/flat"}[S]}const Ce=Se(m,n==null?void 0:n.datakind);return e.jsxs("div",{className:"plot2d-container w-100 h-100",style:{display:"grid",gridTemplateColumns:"auto min-content"},children:[e.jsxs(Oe,{style:{width:"100%",flex:"1 1 auto",minHeight:0,minWidth:0},plotRef:D,abscissaConfig:{visDomain:[0,le.width],label:"px"},ordinateConfig:{visDomain:[0,le.height],label:"px",flip:!0},aspect:"equal",showAxes:j.displayAxes,mouseMode:_,onMouseInteractionOverlayChanged:M=>{Ne(M!==null)},children:[e.jsx(Ze,{loading:g.loading,info:Ce,warning:n===null?"No data":void 0,danger:g.error}),e.jsx(ze,{zoomMode:!0,panMode:!1,disabled:De}),N&&e.jsx(K,{geometry:N,onGeometryChanged:L,image:n==null?void 0:n.array}),q&&e.jsx(K,{geometry:q,onGeometryChanged:ne,image:n==null?void 0:n.array}),A&&e.jsx(K,{geometry:A,onGeometryChanged:ie,image:n==null?void 0:n.array}),X&&e.jsx(K,{geometry:X,onGeometryChanged:oe,image:n==null?void 0:n.array}),n!==null&&e.jsx(ke,{values:n.displayArray,colorMap:t.colorMap,invertColorMap:t.invertColorMap,scaleType:t.scaleType,domain:t.scaleDomain,size:n.detectorSize,position:[n.detectorSize.width*.5,n.detectorSize.height*.5,0],scale:[1,1,1],ref:O}),e.jsx(os,{x:0,y:0,showMean:j.displayMean,mean:(H==null?void 0:H.mean)??void 0,showEpoch:j.displayEpoch,epoch:n==null?void 0:n.epoch}),e.jsx(We,{guides:j.crossHair?"both":void 0,renderTooltip:(M,S)=>{var P;const B=(P=O.current)==null?void 0:P.pick(M,S);return e.jsx(is,{px:M,py:S,pixel:B,dataKind:n==null?void 0:n.datakind})}})]}),e.jsxs(Pe,{gap:1,direction:"vertical",className:"m-1 pe-2",style:{width:"18em"},children:[e.jsxs(J,{align:"center",children:[e.jsx(Le,{mouseModeInteraction:z}),e.jsx(Q,{title:"Reset zoom (sample stage overview)",variant:"secondary",onClick:()=>{var M;(M=D==null?void 0:D.current)==null||M.actions.resetZoom()},children:e.jsx("i",{className:"fa fa-expand fa-fw fa-lg"})}),e.jsx(Be,{}),e.jsx(ts,{config:j}),e.jsx("br",{}),e.jsx(Ae,{as:R,value:m,onSelect:h,detector:u,showFlatfield:!1})]}),e.jsx("h3",{children:"Colormap"}),e.jsxs(J,{align:"center",children:[e.jsx(qe,{showDisplayed:!1,variant:"secondary",isInverted:t.invertColorMap,onSelectInvertion:t.setInvertColorMap,isDisplayed:!0,onSelectDisplayed:()=>{},lut:t.colorMap,onSelectLut:t.setColorMap,norm:t.scaleType,onSelectNorm:t.setScaleType,autoscale:t.autoscale,onSelectAutoscale:t.setAutoscale,autoscaleMode:t.autoscaleMode,onSelectAutoscaleMode:t.setAutoscaleMode,profile:t.profile,onSelectProfile:t.setProfile,array:n}),e.jsx(Ie,{disabled:H===void 0,...t})]}),(n==null?void 0:n.histogram)!==void 0&&e.jsx(ds,{disabled:H===void 0,statistics:n==null?void 0:n.statistics,histogram:n==null?void 0:n.histogram,...t}),e.jsx(xs,{disabled:H===void 0,statistics:n==null?void 0:n.statistics,...t}),e.jsx("h3",{children:"Quadrants"}),e.jsxs(J,{align:"center",children:[e.jsx(Q,{variant:"secondary",onClick:()=>{we(j)},title:"Initialize 2×2 the ROIs",children:e.jsx("i",{className:"fa fa-fw fam-grid22-arrange"})}),e.jsx(rs,{config:j})]}),e.jsx(es,{geometry00:N,geometry01:q,geometry10:A,geometry11:X,image:n==null?void 0:n.array})]})]})}function fs(s){return e.jsx(hs,{...s})}function Ps(s){const{yamlNode:a,tomoconfig:o,...t}=s;Re(a,"tomoconfig",o),He(a,t);const i={tomoconfig:o};return e.jsx(fs,{options:i})}export{Ps as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,a7 as g,aX as h,aY as S,r as v,B as M,aL as D,a1 as j,q as y}from"./index-0751d893.js";import{u as C,T as w,D as I,S as z,L as T}from"./UseMouseModeInteraction-fc86164b.js";import{u as b}from"./colormap-344855f8.js";import{u as A,a as L,b as R,D as F}from"./DropdownDetector-4ddfa946.js";import{I as H,A as P}from"./AutoscaleOption-d8d0ca8d.js";import{H as N}from"./HistogramDomainSlider-5572e533.js";import{p as q}from"./geometry-1fc3c1a0.js";import{L as V}from"./Label-3c95fb14.js";import{V as Y}from"./VSegment-cf1ceafc.js";import"./index-a0f7b98c.js";import"./hooks-457bfe32.js";import"./Image-1ff7dca9.js";import"./colors-2395de5a.js";function k(s){const{domain:a}=s,{displayArray:i,detectorSize:e}=s.detectorArray;return o.jsx(H,{values:i,domain:a,colorMap:s.lut,invertColorMap:s.isColorMapInverted,scaleType:s.scale,position:[e.width*.5,e.height*.5,0],scale:[1,1,1],size:e})}function O(s){var d,u,p;const{tomoHardware:a,detectorArray:i}=s,e=(u=(d=i.imagePixelSize)==null?void 0:d.to("mm"))==null?void 0:u.scalar,r=a.sy?q(a.sy):null;if(r===null||e===void 0)return o.jsx(o.Fragment,{});const c=i.detectorSize.width,{sampleStage:l}=a,x=((p=l==null?void 0:l.properties.detector_center)==null?void 0:p[0])??0,t=i.detectorSize.height,n=c*.5+r/e-x,m=new g(n,t*.75),f=t/50;return o.jsxs(o.Fragment,{children:[o.jsx(Y,{x:n,y1:t,y2:t*.75,color:"red",gapColor:"white",dashSize:f,gapSize:f,lineWidth:2}),o.jsx(V,{datapos:[m.x,m.y],color:"#FF0000",text:"Theorical rotation axis"})]})}D("daiquiri.components.tomo.detector.Default");function W(s){const{options:a}=s,{tomoconfig:i}=a,e=A(),r=h(i??""),c=S(r),l=L({sampleStage:c}),t=R({detector:l,sampleStage:c,profile:e.profile,normalization:e.scaleType,autoscale:e.autoscale,autoscaleMode:e.autoscaleMode,domain:e.scaleDomain,enabled:!0,minRefreshPeriod:.5}).data,n=v.useRef(null),m=C("zoom"),{mouseMode:f}=m,d=(t==null?void 0:t.detectorSize)??{width:0,height:0},u=t==null?void 0:t.statistics;return b({statistics:t==null?void 0:t.statistics,...e}),o.jsxs("div",{className:"plot2d-container w-100 h-100",style:{flex:"1 1 0%",display:"flex",flexDirection:"column"},children:[o.jsxs(w,{align:"center",children:[o.jsx(I,{mouseModeInteraction:m}),o.jsx(M,{title:"Reset zoom (sample stage overview)",variant:"secondary",onClick:()=>{var p;(p=n==null?void 0:n.current)==null||p.actions.resetZoom()},children:o.jsx("i",{className:"fa fa-expand fa-fw fa-lg"})}),o.jsx(z,{}),o.jsx(F,{showDisplayed:!1,variant:"secondary",isInverted:e.invertColorMap,onSelectInvertion:e.setInvertColorMap,isDisplayed:!0,onSelectDisplayed:()=>{},lut:e.colorMap,onSelectLut:e.setColorMap,norm:e.scaleType,onSelectNorm:e.setScaleType,autoscale:e.autoscale,onSelectAutoscale:e.setAutoscale,autoscaleMode:e.autoscaleMode,onSelectAutoscaleMode:e.setAutoscaleMode,profile:e.profile,onSelectProfile:e.setProfile,array:t}),o.jsx(P,{disabled:u===void 0,...e}),o.jsx(N,{disabled:u===void 0,statistics:t==null?void 0:t.statistics,...e})]}),o.jsx("div",{style:{flex:"1 1 auto",display:"flex",margin:0,minHeight:0},children:o.jsx(T,{plotRef:n,abscissaConfig:{visDomain:[0,d.width],label:"px"},ordinateConfig:{visDomain:[0,d.height],label:"px",flip:!0},mouseMode:f,aspect:"equal",children:t&&o.jsxs(o.Fragment,{children:[o.jsx(k,{detectorArray:t,lut:e.colorMap,isColorMapInverted:e.invertColorMap,scale:e.scaleType,domain:e.scaleDomain}),o.jsx(O,{tomoHardware:c,detectorArray:t})]})})})]})}function B(s){return o.jsx(W,{...s})}function se(s){const{yamlNode:a,tomoconfig:i,...e}=s;j(a,"tomoconfig",i),y(a,e);const r={tomoconfig:i};return o.jsx(B,{options:r})}export{se as default};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import{u as me,j as e,ay as L,aj as S,B as W,g as ue,R as M,C as j,aU as C,aM as xe,aO as fe,a_ as pe,r as b,aN as he,aL as E,ab as F,a7 as je,aZ as ye,aX as ve,aY as ge,aP as H,a1 as we,aw as Se,q as ze}from"./index-0751d893.js";import{O as De}from"./OptionsProcess-6fd11ce7.js";import{u as Ne,T as Me,D as Ce,S as _,L as Q}from"./UseMouseModeInteraction-fc86164b.js";import{p as A,a as R,f as be,g as k}from"./geometry-1fc3c1a0.js";import{I as Ie,a as Pe,A as Fe,T as D}from"./AutoscaleOption-d8d0ca8d.js";import{u as ke}from"./colormap-344855f8.js";import{O as Ve,w as J}from"./index-a0f7b98c.js";import{u as Te,b as He,D as Oe}from"./DropdownDetector-4ddfa946.js";import{S as ee}from"./SceneScale-33094e68.js";import{P as We}from"./SelectionPoint-d30865f3.js";import{L as se}from"./LoadingMessage-e1e479c5.js";import{H as Ye}from"./HistogramDomainSlider-5572e533.js";import{R as Le,a as te}from"./RulerButton-5c2020aa.js";import{r as O}from"./HSegment-8966b13f.js";import{L as ae}from"./Label-3c95fb14.js";import{c as Re}from"./colors-2395de5a.js";import{S as Ee}from"./ScreenScale-ae820d30.js";import{C as Xe}from"./CrossMarker-2285e102.js";import{C as _e}from"./Cross-d0a1a410.js";import{V as Ae}from"./VSegment-cf1ceafc.js";import"./hooks-457bfe32.js";import"./Image-1ff7dca9.js";import"./QtyHelper-8429914f.js";import"./Anchor-3fa6d19c.js";import"./DraggableRect-db33e02e.js";import"./types-46afffa0.js";function Ue(t){const{mouseMode:r,setOrResetMouseMode:a}=t,s=me();function n(x,c){return x?x.alias??x.name:c}function l(x){if(!s)return"You must have the control to the session to move motors";if(!x)return"This motor is not available";if(!x.online)return"This motor is not online";const{state:c}=x.properties;if(!c.includes("READY"))return`This motor is not ready (found ${x.properties.state})`}const i=l(t.sy),o=l(t.sz),m=l(t.sampy),d=n(t.sy,"sy"),u=n(t.sz,"sz"),y=n(t.sampy,"sampy");return e.jsxs(L,{as:S,className:t.className,children:[t.sampy!==null&&e.jsxs(W,{variant:r==="sampy"?"danger":"secondary",onClick:()=>{a==null||a("sampy")},disabled:m!==void 0,title:m,children:[e.jsx("i",{className:"fa fam-arrow-h-over-rot"})," ",y]}),e.jsxs(W,{variant:r==="sy"?"danger":"secondary",onClick:()=>{a==null||a("sy")},disabled:i!==void 0,title:i,children:[e.jsx("i",{className:"fa fam-arrow-h-under-rot"})," ",d]}),e.jsxs(W,{variant:r==="sz"?"danger":"secondary",onClick:()=>{a==null||a("sz")},disabled:o!==void 0,title:o,children:[e.jsx("i",{className:"fa fa-arrows-v"})," ",u]})]})}function qe(t,r,a){const s=ie(t);if(s===null)return null;const{y:n,z:l,fov:i}=s;if(i===null)return null;function o(){if(r===null||a.follow==="motors")return[n,l];const u=re(t,r);return u===null?[0,0]:[u.y,u.z]}const[m,d]=o();return{detectorCenter:[n,l],minDetectorPos:[n-i[0]*.5,l-i[1]*.5],maxDetectorPos:[n+i[0]*.5,l+i[1]*.5],viewCenter:[m-i[0]*.5,d-i[1]*.5*a.fieldOfView],minViewPos:[m-i[0]*.5,d-i[1]*.5*a.fieldOfView],maxViewPos:[m+i[0]*.5,d+i[1]*.5*a.fieldOfView]}}function ie(t){const{sy:r,sz:a,sampy:s,tomoDetector:n,detector:l}=t;if(r===null||a===null)return null;const i=A(a),o=R(s)??0,m=A(r),d=be(n,l);return{y:m+o,z:i,fov:d}}function re(t,r){const{imagePixelSize:a,sampyPosition:s,syPosition:n,szPosition:l,detectorCenterY:i,detectorCenterZ:o}=r;if(a===null||a.units()==="pixel"||n===null||l===null)return null;const{sampleStage:m}=t,d=(m==null?void 0:m.properties.detector_center)??[0,0],u=d[0]??0,y=d[1]??0,x=(i==null?void 0:i.to("mm").scalar)??0,c=(o==null?void 0:o.to("mm").scalar)??0,N=a.to("mm").scalar,I=n.to("mm").scalar,P=l.to("mm").scalar,v=s?s.to("mm").scalar:0,V=I+v+(u-x),w=P+(y-c);return{y:V,z:w,px:N}}function Be(t,r){return t===r?"primary":"secondary"}function p(t){return e.jsx(W,{variant:Be(t.var,t.value),onClick:()=>{t.setter(t.value)},className:"text-nowrap",size:"sm",children:t.children})}function $e(t){const{as:r=void 0,variant:a="secondary",config:s}=t;return e.jsxs(L,{as:r,children:[e.jsx(L.Toggle,{id:"dropdown-basic",variant:a,className:"d-flex align-items-center",children:e.jsx("i",{className:"fa fa-sliders fa-fw fa-lg"})}),e.jsx(L.Menu,{className:"dropdown-menu-center",children:e.jsx("div",{className:"ms-1 me-1",style:{minWidth:"300px"},children:e.jsxs(ue,{children:[e.jsxs(M,{children:[e.jsx(j,{className:"my-auto",children:"Display axes"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.displayAxes,value:!0,setter:s.setDisplayAxes,children:"Yes"}),e.jsx(p,{var:s.displayAxes,value:!1,setter:s.setDisplayAxes,children:"No"})]})})]}),e.jsxs(M,{className:"mt-1",children:[e.jsx(j,{className:"my-auto",children:"Follow"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.follow,value:"motors",setter:s.setFollow,children:"Motors"}),e.jsx(p,{var:s.follow,value:"last-image",setter:s.setFollow,children:"Last image"})]})})]}),e.jsxs(M,{className:"mt-1",children:[e.jsx(j,{className:"my-auto",children:"Field of view"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.fieldOfView,value:1,setter:s.setFieldOfView,children:"×1"}),e.jsx(p,{var:s.fieldOfView,value:1.5,setter:s.setFieldOfView,children:"×1.5"}),e.jsx(p,{var:s.fieldOfView,value:2,setter:s.setFieldOfView,children:"×2"}),e.jsx(p,{var:s.fieldOfView,value:3,setter:s.setFieldOfView,children:"×3"})]})})]}),e.jsxs(M,{className:"mt-1",children:[e.jsx(j,{className:"my-auto",children:"Crosshair"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.crossHair,value:!0,setter:s.setCrossHair,children:"Yes"}),e.jsx(p,{var:s.crossHair,value:!1,setter:s.setCrossHair,children:"No"})]})})]}),e.jsxs(M,{className:"mt-1",children:[e.jsx(j,{className:"my-auto",children:"Mean level"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.displayMean,value:!0,setter:s.setDisplayMean,children:"Show"}),e.jsx(p,{var:s.displayMean,value:!1,setter:s.setDisplayMean,children:"Hide"})]})})]}),e.jsxs(M,{className:"mt-1",children:[e.jsx(j,{className:"my-auto",children:"Timestamp"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.displayEpoch,value:!0,setter:s.setDisplayEpoch,children:"Show"}),e.jsx(p,{var:s.displayEpoch,value:!1,setter:s.setDisplayEpoch,children:"Hide"})]})})]}),e.jsxs(M,{className:"mt-1",children:[e.jsx(j,{className:"my-auto",children:"Histogram"}),e.jsx(j,{xs:7,children:e.jsxs(S,{children:[e.jsx(p,{var:s.displayHistogram,value:!0,setter:s.setDisplayHistogram,children:"Show"}),e.jsx(p,{var:s.displayHistogram,value:!1,setter:s.setDisplayHistogram,children:"Hide"})]})})]})]})})})]})}function Ge(){const[t,r]=C("tomo/detectorview/follow","last-image"),[a,s]=C("tomo/detectorview/axes",!0),[n,l]=C("tomo/detectorview/field-of-view",1),[i,o]=C("tomo/detectorview/crosshair",!1),[m,d]=C("tomo/detectorview/mean",!0),[u,y]=C("tomo/detectorview/epoch",!1),[x,c]=C("tomo/detectorview/histogram",!1);return{follow:t,setFollow:r,displayAxes:a,setDisplayAxes:s,fieldOfView:n,setFieldOfView:l,crossHair:i,setCrossHair:o,displayMean:m,setDisplayMean:d,displayEpoch:u,setDisplayEpoch:y,displayHistogram:x,setDisplayHistogram:c}}class Ze extends fe{constructor(){super({uniforms:{color:{value:new pe},lineWidth:{value:0},sizeXInScreen:{value:0},sizeYInScreen:{value:0},inner:{value:0}},vertexShader:`
|
|
2
|
-
out vec2 pixelCoord;
|
|
3
|
-
|
|
4
|
-
void main() {
|
|
5
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
6
|
-
pixelCoord = vec2(position.x, position.y);
|
|
7
|
-
}
|
|
8
|
-
`,fragmentShader:`
|
|
9
|
-
uniform vec4 color;
|
|
10
|
-
uniform float lineWidth;
|
|
11
|
-
uniform float sizeXInScreen; // signed size
|
|
12
|
-
uniform float sizeYInScreen; // signed size
|
|
13
|
-
uniform int inner; // 0 or 1
|
|
14
|
-
|
|
15
|
-
in vec2 pixelCoord;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Exact signed distance function to compute an
|
|
19
|
-
* orthogonal rectangle.
|
|
20
|
-
*
|
|
21
|
-
* @param pos: Pixel position
|
|
22
|
-
* @param center: Center of the rectangle
|
|
23
|
-
* @param size: Size of the rectangle
|
|
24
|
-
*/
|
|
25
|
-
float sdf_rect(vec2 pos, vec2 center, vec2 size) {
|
|
26
|
-
vec2 d = abs(pos - center) - size * 0.5;
|
|
27
|
-
return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
void main() {
|
|
31
|
-
float is_inner = float(inner);
|
|
32
|
-
float d1 = sdf_rect(
|
|
33
|
-
pixelCoord,
|
|
34
|
-
vec2(
|
|
35
|
-
(sizeXInScreen - (1.0 - is_inner) * lineWidth * sign(sizeXInScreen)) * 0.5,
|
|
36
|
-
is_inner * lineWidth * sign(sizeYInScreen) * 0.5
|
|
37
|
-
),
|
|
38
|
-
vec2(abs(sizeXInScreen), lineWidth)
|
|
39
|
-
);
|
|
40
|
-
float d2 = sdf_rect(
|
|
41
|
-
pixelCoord,
|
|
42
|
-
vec2(
|
|
43
|
-
is_inner * lineWidth * sign(sizeXInScreen) * 0.5,
|
|
44
|
-
(sizeYInScreen - (1.0 - is_inner) * lineWidth * sign(sizeYInScreen)) * 0.5
|
|
45
|
-
),
|
|
46
|
-
vec2(lineWidth, abs(sizeYInScreen))
|
|
47
|
-
);
|
|
48
|
-
float d = min(d1, d2);
|
|
49
|
-
|
|
50
|
-
if (d > 0.2) {
|
|
51
|
-
discard;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
float alpha;
|
|
55
|
-
if (lineWidth >= 1.0) {
|
|
56
|
-
alpha = smoothstep(0.2, 0.0, d);
|
|
57
|
-
} else {
|
|
58
|
-
// simulate line thiner than 1px with alpha
|
|
59
|
-
alpha = lineWidth;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
gl_FragColor = vec4(color.r, color.g, color.b, alpha * color.a);
|
|
63
|
-
}
|
|
64
|
-
`})}}xe({CornerMarkerMaterial:Ze});function Y(t){const{x:r,y:a,color:s="black",opacity:n,sizeXInScreen:l,sizeYInScreen:i,lineWidth:o=1,inner:m=!1,zIndex:d=0}=t,u=b.useRef(null);return b.useEffect(()=>{const y=Re(s,n);if(u.current){const x=u.current.uniforms;x.color.value=y,x.lineWidth.value=o,x.sizeXInScreen.value=l,x.sizeYInScreen.value=i,x.inner.value=m?1:0,he()}},[s,n,o,l,i,m]),e.jsx("group",{position:[r,a,d],children:e.jsx(Ee,{screenDirection:!1,children:e.jsxs("mesh",{children:[e.jsx("ambientLight",{}),e.jsx("planeGeometry",{attach:"geometry",args:[Math.abs(l)*2+o,Math.abs(i)*2+o,1,1]}),e.jsx("cornerMarkerMaterial",{attach:"material",transparent:!0,ref:u})]})})})}const Ke=E("daiquiri.components.tomo.detectorview.ActualDetectorLocation");function Qe(t){const{x:r,y:a,fov:s}=t,n=s[0]*.5,l=s[1]*.5,i=40,o=40;return e.jsxs(e.Fragment,{children:[e.jsx(Y,{x:r+n,y:a+l,sizeXInScreen:-i,sizeYInScreen:-o,color:F.danger,lineWidth:4,inner:!0}),e.jsx(Y,{x:r-n,y:a-l,sizeXInScreen:i,sizeYInScreen:o,color:F.danger,lineWidth:4,inner:!0}),e.jsx(Y,{x:r-n,y:a+l,sizeXInScreen:i,sizeYInScreen:-o,color:F.danger,lineWidth:4,inner:!0}),e.jsx(Y,{x:r+n,y:a-l,sizeXInScreen:-i,sizeYInScreen:o,color:F.danger,lineWidth:4,inner:!0})]})}function Je(t){const{tomoHardware:r}=t,{detector:a}=r,s=ie(r);if(s===null)return Ke("Skipped: one of sy, sz is missing."),e.jsx(e.Fragment,{});const{y:n,z:l,fov:i}=s;return e.jsxs(e.Fragment,{children:[e.jsx(Xe,{x:n,y:l,color:F.danger,sizeInScreen:40,lineWidth:3,zIndex:.5}),i!==null&&e.jsxs(e.Fragment,{children:[e.jsx(ae,{datapos:[n-i[0]*.5,l-i[1]*.5],color:F.danger,text:(a==null?void 0:a.name)??"Detector",anchor:"top-right"}),e.jsx(Qe,{x:n,y:l,fov:i})]})]})}E("daiquiri.components.tomo.detectorview.DetectorPositionMesh");function es(t){const{x:r,y:a,showMean:s,mean:n,showEpoch:l,epoch:i}=t,o=b.useMemo(()=>{if(i!==void 0)return new Date(i*1e3)},[i]);if(!l&&(!s||n===void 0))return e.jsx(e.Fragment,{});function m(d){return d===void 0?"Undefined":`${d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:1})}`}return e.jsxs(Ve,{x:r,y:a,children:[s&&n!==void 0&&e.jsx("div",{className:"ms-2 mt-2",title:"Mean grey level",children:e.jsxs("div",{className:"bg-dark text-light p-1 rounded font-tabular-nums",children:[e.jsx("i",{className:"fa-solid fa-circle-half-stroke fa-fw fa-lg"})," ",n.toFixed(2)]})}),l&&e.jsx("div",{className:"ms-2 mt-2",title:`Timestamp (${(o==null?void 0:o.toUTCString())??"undefined"})`,children:e.jsxs("div",{className:"bg-dark text-light p-1 rounded font-tabular-nums",children:[e.jsx("i",{className:"fa-solid fa-clock fa-fw fa-lg"})," ",m(o)]})})]})}function oe(t){const{config:r,detectorArray:a}=t,{displayArray:s,statistics:n,detectorSize:l,epoch:i}=a,o=re(t.tomoHardware,a);if(o===null)return null;const{y:m,z:d,px:u}=o;return e.jsxs(e.Fragment,{children:[e.jsx(Ie,{ref:t.imageRef,values:s,domain:t.domain,colorMap:t.lut,invertColorMap:t.isColorMapInverted,scaleType:t.scale,position:[m,d,0],scale:[-u,u,u],size:l}),e.jsx(es,{x:m+l.width*u*.5,y:d-l.height*u*.5,showMean:r.displayMean,mean:(n==null?void 0:n.mean)??void 0,showEpoch:r.displayEpoch,epoch:i}),e.jsx(_e,{centerX:m,centerY:d,width:l.width*u,height:l.height*u,color:"white",gapColor:"black",dashSize:5,gapSize:5,lineWidth:1})]})}function ne(t){function r(d,u){return Math.round(d)===d?d.toFixed(0):d.toFixed(u)}const{sampleStage:a}=t,s=R(a.sy);R(a.sz);const n=R(a.sampy),l=k(a.sy,"sy"),i=k(a.sampy,"sampy"),o=k(a.sz,"sz"),m=2;return e.jsx("table",{children:e.jsxs("tbody",{children:[n===null&&s!==null&&e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{children:l}),e.jsx("td",{className:"text-end",children:t.px.toFixed(m)}),e.jsx("td",{className:"text-start",children:"mm"})]}),n!==null&&s!==null&&e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{children:l}),e.jsx("td",{className:"text-end",children:(s+n-t.px).toFixed(m)}),e.jsx("td",{className:"text-start",children:"mm"})]}),n!==null&&s!==null&&e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{children:i}),e.jsx("td",{className:"text-end",children:(t.px-s).toFixed(m)}),e.jsx("td",{className:"text-start",children:"mm"})]}),e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{style:{minWidth:"7em"},children:o}),e.jsx("td",{style:{minWidth:"4em"},className:"text-end",children:t.py.toFixed(m)}),e.jsx("td",{className:"text-start",children:"mm"})]}),t.pixel!==void 0&&e.jsxs("tr",{className:"flex-nowrap text-nowrap",children:[e.jsx("td",{children:"pixel"}),e.jsx("td",{className:"text-end",children:r(t.pixel,m)}),e.jsx("td",{className:"text-start"})]})]})})}E("daiquiri.components.tomo.detectorview.ActualRotationAxisLocation");function ss(t){var u,y;const{tomoHardware:r,sampleStageGeometry:a}=t;if(r.sy===null)return e.jsx(e.Fragment,{});const s=((y=(u=r.sampleStage)==null?void 0:u.properties.detector_center)==null?void 0:y[0])??0,n=a.detectorCenter[0]+A(r.sy)-s,l=a.maxDetectorPos[1],i=a.maxDetectorPos[1]-a.minDetectorPos[1],o=l-i*.1,m=new je(n,o),d=10;return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{x:n,y1:l,y2:o,color:"red",gapColor:"white",dashSize:d,gapSize:d,lineWidth:2,zIndex:1.5}),e.jsx(ae,{datapos:[m.x,m.y],color:"#FF0000",text:"Theorical rotation axis"})]})}E("daiquiri.components.tomo.detectorview.Default");function ts(t,r){return t??r}function os(t){var $,G,Z,K;const{options:r}=t,a=ye(),s=ve(r.tomoconfig??""),n=ge(s),l=(($=n.detector)==null?void 0:$.id)??"",i=a[l],o=Te(),m=ts(r.moveenabled,!0),d=Ge(),[u,y]=b.useState(Pe.Flatfield),x=He({detector:i,sampleStage:n,profile:o.profile,normalization:o.scaleType,autoscale:o.autoscale,autoscaleMode:o.autoscaleMode,domain:o.scaleDomain,histogram:d.displayHistogram,enabled:!0,minRefreshPeriod:.5,processing:u}),c=x.data;ke({statistics:c==null?void 0:c.statistics,...o});const N=b.useRef(null),I=b.useRef(null),P=Ne("zoom"),{mouseMode:v,setMouseMode:V}=P,w=qe(n,c,d);function U(f){if(!n)return null;const h=n[f]||null;if(!h)return null;const z=h.properties.position;return z===null?null:new H(z,h.properties.unit)}const X=U("sampy"),T=U("sy"),le=b.useCallback(f=>{const h=f.dataPt.x,z=f.dataPt.y;switch(v){case"pan":break;case"zoom":break;case"sampy":if(V("pan"),T!==null){const g=new H(h,"mm").sub(T);O({sampy:g})}else console.error("sy axis is not defined");break;case"sy":if(V("pan"),T!==null)if(X!==null){const g=T.add(X).sub(new H(h,"mm"));O({sy:g})}else{const g=new H(h,"mm");O({sy:g})}else console.error("sy axis is not defined");break;case"sz":V("pan"),O({sz:new H(z,"mm")});break;default:console.error(`Unexpected ${v}`)}},[v,X,T,O,c]),q=c==null?void 0:c.statistics,ce=!(c!=null&&c.imagePixelSize)||((G=c==null?void 0:c.imagePixelSize)==null?void 0:G.units())==="pixel";function de(f){return f?{[D.Dark]:"Dark",[D.Flat]:"Flat",[D.Proj]:"Proj",[D.Unknown]:"Unknown data",[D.FlatfieldNorm]:void 0,[D.ProjNorm]:"Only normalized proj",[D.ProjDarkNorm]:"Only normalized proj-dark",[D.ProjFlatNorm]:"Only normalized proj/flat"}[f]:void 0}const B=de(c==null?void 0:c.datakind);return e.jsxs("div",{className:"plot2d-container w-100 h-100",style:{flex:"1 1 0%",display:"flex",flexDirection:"column"},children:[e.jsxs(Me,{align:"center",children:[e.jsx(Ce,{mouseModeInteraction:P}),e.jsx(W,{title:"Reset zoom (sample stage overview)",variant:"secondary",onClick:()=>{var f;(f=N==null?void 0:N.current)==null||f.actions.resetZoom()},children:e.jsx("i",{className:"fa fa-expand fa-fw fa-lg"})}),e.jsx(_,{}),e.jsx(Le,{mouseModeInteraction:P}),m&&e.jsx(Ue,{mouseMode:v,setOrResetMouseMode:P.setOrResetMouseMode,sy:n.sy,sz:n.sz,sampy:n.sampy}),e.jsx(_,{}),e.jsx(Oe,{showDisplayed:!1,variant:"secondary",isInverted:o.invertColorMap,onSelectInvertion:o.setInvertColorMap,isDisplayed:!0,onSelectDisplayed:()=>{},lut:o.colorMap,onSelectLut:o.setColorMap,norm:o.scaleType,onSelectNorm:o.setScaleType,autoscale:o.autoscale,onSelectAutoscale:o.setAutoscale,autoscaleMode:o.autoscaleMode,onSelectAutoscaleMode:o.setAutoscaleMode,profile:o.profile,onSelectProfile:o.setProfile,array:c}),e.jsx(Fe,{disabled:q===void 0,...o}),e.jsx(Ye,{disabled:q===void 0,statistics:c==null?void 0:c.statistics,histogram:c==null?void 0:c.histogram,...o}),e.jsx(De,{as:S,value:u,onSelect:y,detector:i}),e.jsx(_,{}),e.jsx($e,{config:d})]}),e.jsxs("div",{style:{flex:"1 1 auto",display:"flex",margin:0,minHeight:0},children:[w!==null&&e.jsxs(Q,{plotRef:N,abscissaConfig:{visDomain:[w.minViewPos[0],w.maxViewPos[0]],label:`${k(n.sy,"sy")} + ${k(n.sampy,"sampy")} (mm)`,flip:!0},ordinateConfig:{visDomain:[w.minViewPos[1],w.maxViewPos[1]],label:`${k(n.sz,"sz")} (mm)`,flip:!0},showAxes:d.displayAxes,mouseMode:v,aspect:"equal",children:[e.jsx(se,{loading:x.loading,info:B,warning:c===null?"No data":void 0,danger:x.error}),e.jsx(te,{mouseMode:v,plotUnit:"mm"}),c&&e.jsx(oe,{tomoHardware:n,config:d,detectorArray:c,lut:o.colorMap,isColorMapInverted:o.invertColorMap,scale:o.scaleType,domain:o.scaleDomain,imageRef:I}),e.jsx(ss,{tomoHardware:n,sampleStageGeometry:w}),e.jsx(Je,{tomoHardware:n}),e.jsx(J,{guides:d.crossHair?"both":void 0,renderTooltip:(f,h)=>{var g;const z=(g=I.current)==null?void 0:g.pick(f,h);return e.jsx(ne,{sampleStage:n,px:f,py:h,pixel:z})}}),(v==="sz"||v==="sampy"||v==="sy")&&e.jsx(We,{onClick:le}),e.jsx(ee,{unit:"mm"})]}),w===null&&e.jsxs(Q,{plotRef:N,abscissaConfig:{visDomain:[0,((Z=c==null?void 0:c.detectorSize)==null?void 0:Z.width)??1],label:"width (px)",flip:!0},ordinateConfig:{visDomain:[0,((K=c==null?void 0:c.detectorSize)==null?void 0:K.height)??1],label:"height (px)",flip:!0},showAxes:d.displayAxes,mouseMode:v,children:[e.jsx(se,{loading:x.loading,info:B,warning:c===null?"No data":ce?"No sample pixel size defined":void 0,danger:x.error}),c&&e.jsx(e.Fragment,{children:e.jsx(oe,{tomoHardware:n,config:d,detectorArray:c,lut:o.colorMap,isColorMapInverted:o.invertColorMap,scale:o.scaleType,domain:o.scaleDomain,imageRef:I})}),e.jsx(J,{guides:d.crossHair?"both":void 0,renderTooltip:(f,h)=>{var g;const z=(g=I.current)==null?void 0:g.pick(f,h);return e.jsx(ne,{sampleStage:n,px:f,py:h,pixel:z})}}),e.jsx(ee,{unit:"px"}),e.jsx(te,{mouseMode:v,plotUnit:"px"})]})]})]})}function ns(t){return e.jsx(os,{...t})}function Fs(t){const{yamlNode:r,tomoconfig:a,moveenabled:s,...n}=t;we(r,"tomoconfig",a),Se(r,"moveenabled",s),ze(r,n);const l={tomoconfig:a,moveenabled:s};return e.jsx(ns,{options:l})}export{Fs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,a$ as W,b0 as Y,r as h,F as B,o as Q,I as Z,B as w,l as U,b1 as X,aX as J,aS as P,b2 as ee,u as te,b3 as se,b4 as ne,A as V,R,C as x,b5 as L,g as re,aL as ae,b6 as oe,b7 as ie,aP as le,a1 as ce,aw as de,q as ue}from"./index-0751d893.js";import{g as me}from"./geometry-1fc3c1a0.js";function pe(s){const{hardware:t}=s,n=t.online?t.properties.state:"OFFLINE",r={READY:"success",MOVING:"warning",STABILIZING:"warning",INVALID:"danger",INVALID_DETECTOR_BINNING_CHANGED:"danger",INVALID_DETECTOR_DISTANCE_CHANGED:"danger",INVALID_DETECTOR_CHANGED:"danger"},l=r[n]||r.UNKNOWN;return e.jsx(W,{state:n,minWidth:6,variant:l})}function xe(s){return s.type==="tomoholo"}function fe(s){const t=Y(s);return t===null||!xe(t)?null:t}function he(){const[s,t]=h.useState(!1),n=h.useRef(null),r=()=>t(!0),l=()=>t(!1);return h.useEffect(()=>{const a=n.current;return a?(a.addEventListener("mouseover",r),a.addEventListener("mouseout",l),()=>{a.removeEventListener("mouseover",r),a.removeEventListener("mouseout",l)}):()=>{}},[n.current]),[n,s]}function G(s){const{coef:t=1}=s,n=h.useRef(null),[r,l]=h.useState(!1),[a,u]=h.useState(!1);function m(i){if(i===null)return"";const c=i*t;return s.precision!==void 0?c.toFixed(s.precision):c.toString()}h.useEffect(()=>{n.current&&(n.current.value=m(s.value),l(!1))},[s.value,s.precision]);function o(i){const c=m(i);n!=null&&n.current&&(n.current.value=c)}function d(i){function c(){try{return Number.parseFloat(i.target.value)/t}catch{return null}}switch(i.key){case"Enter":{l(!1);const f=c(),g=s.onValidate(f);g&&g.catch(()=>{u(!0),setTimeout(()=>{o(s.value),u(!1)},2e3)}),i.preventDefault(),i.stopPropagation();break}case"Esc":case"Escape":r&&(u(!1),l(!1),o(s.value)),i.target.blur(),i.preventDefault(),i.stopPropagation();break}}function v(i){var c;l(i.target.value!==((c=s.value)==null?void 0:c.toString()))}return e.jsx(B.Control,{className:Q({"form-control-edited":r,"form-control-error":a}),type:"number",ref:n,onChange:v,onKeyDown:d,disabled:s.readOnly,step:s.step})}function ge(s){const{value:t,onValueChanged:n,disabled:r=!1}=s;return e.jsxs(Z,{children:[e.jsx(B.Control,{value:`${t??""}`,disabled:r,readOnly:!0}),e.jsx(w,{variant:t===2?"primary":"secondary",onClick:()=>{n(2)},disabled:r,children:"2"}),e.jsx(w,{variant:t===3?"primary":"secondary",onClick:()=>{n(3)},disabled:r,children:"3"}),e.jsx(w,{variant:t===4?"primary":"secondary",onClick:()=>{n(4)},disabled:r,children:"4"}),e.jsx(w,{variant:t===5?"primary":"secondary",onClick:()=>{n(5)},disabled:r,children:"5"})]})}function je(s){const{style:t,position:n,distances:r,className:l,thumbClassName:a,thumbStyle:u={},thumbTitle:m}=s,o=h.useMemo(()=>{const i=[];if(r.length>1){const c=r[0].position,f=r[1].position;i.push(c-(f-c)*.5)}for(const c of r)i.push(c.position);if(r.length>1){const c=r[r.length-2].position,f=r[r.length-1].position;i.push(f+(f-c)*.5)}return i},[r]),d=h.useMemo(()=>{if(n===null)return null;let i=o.length;for(const[b,C]of o.entries())if(n<C){i=b-1;break}if(i<=-1)return .5;if(i>=o.length)return o.length+.5;const c=o[i],f=o[i+1],g=(n-c)/(f-c),T=i===0?-.5:i,_=i===o.length-2?o.length-.5:i+1;return T*(1-g)+_*g},[o,n]);if(d===null)return e.jsx(e.Fragment,{});const v=U.clamp((d-.5)/(o.length-2),0,1)*100;return e.jsx("div",{className:`multi-linear-range ${l}`,style:t,children:e.jsx("i",{className:`${a}`,style:{...u,left:`${v}%`},title:m})})}ae("daiquiri.components.tomo.TomoDetector");function H(s,t,n,r){return h.useMemo(()=>{function l(m){return m==="um"?"μm":m}function a(m){return r<=0?m.toFixed(r):m.toFixed(r).replace(/\.?0+$/,"")}if(s===null)return"∅";if(t===n)return`${a(s)} ${l(n)}`;const u=le(s,t);return`${a(u.to(n).scalar)} ${l(n)}`},[s,t,n,r])}function ve(s){return s==null?null:s.replace("hardware:","")}function Ne(s){var O,A,S,k,M;const{distance:t,tomoDetector:n,moveToPosition:r,disabled:l=!1,gridColumn:a,stabilizing:u=!1,allowMoveOnFocus:m,sx:o}=s,[d,v]=he(),{onEnter:i,onLeave:c}=s,f=oe(ve((n==null?void 0:n.properties.detector)??null)),g=(f==null?void 0:f.properties.size)??[0,0],T=t.pixel_size*g[0],_=((O=o==null?void 0:o.properties)==null?void 0:O.tolerance)??.001,b=((A=o==null?void 0:o.properties)==null?void 0:A.display_digits)??3,C=((S=o==null?void 0:o.properties)==null?void 0:S.position)??null,$=((k=o==null?void 0:o.properties)==null?void 0:k.limits)??[0,1],z=((M=o==null?void 0:o.properties)==null?void 0:M.unit)??"mm",D=C!==null?Math.abs(t.position-C)<_:!1,j=t.position>=$[0]&&t.position<=$[1],N=t.distanceName==="focal",I=D?u?"warning":"primary":j?"secondary":"danger",E=j?"":"Position is outside of the axis limits";function F(){return N?e.jsx("h5",{className:"py-1",children:"Focal"}):e.jsx("h5",{className:`rounded-4 bg-${I} text-bg-${I} py-1`,children:`Distance ${t.distanceNum}`})}h.useEffect(()=>{v?i==null||i():c==null||c()},[v]);const p=H(t.z1,"mm","um",b-3),y=H(t.pixel_size,"um","nm",3),q=H(T,"um","um",3),K=H(t.position,z,z,b);return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{gridColumn:a,gridRow:1},className:"text-center",title:E,children:e.jsx(F,{})}),e.jsx("div",{style:{gridColumn:a,gridRow:2},className:"text-center",children:p}),e.jsx("div",{style:{gridColumn:a,gridRow:3},className:"text-center",children:!N&&`${y}`}),e.jsx("div",{style:{gridColumn:a,gridRow:4},className:"text-center",children:!N&&`${q}`}),e.jsx("div",{style:{gridColumn:a,gridRow:6},title:E,className:`text-center ${j?"":"text-danger"}`,children:K}),e.jsx("div",{style:{gridColumn:a,gridRow:7},title:`${j?"":"Position is outside of the axis limits"}${j&&u?"Waiting for stabilization":""}`,children:!(N&&!m)&&e.jsx(w,{ref:d,className:"w-100",variant:D?u?"warning":"primary":"secondary",onClick:()=>{r(t.distanceName)},disabled:l||!j||u,children:"Move to"})})]})}function ye(s){const{tomoDetector:t,gridColumn:n}=s;if(t===null)return e.jsx(e.Fragment,{});function r(){return((t==null?void 0:t.properties.detector)??"").replace("hardware:","")}const l=r(),a=t.properties.source_distance;return e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{gridColumn:n,gridRow:1},className:"text-center",children:e.jsx("h5",{className:"py-1",children:"Detector"})}),e.jsx("div",{style:{gridColumn:n,gridRow:2},className:"text-center",children:a&&e.jsxs(e.Fragment,{children:[a.toFixed(2)," mm"]})}),e.jsxs("div",{style:{gridColumn:n,gridRow:5,zIndex:1},className:"text-center text-middle my-auto",children:[e.jsx("img",{className:"mx-auto my-auto",src:"resources/tomo/holo-detector.png",alt:"Detector",style:{gridColumn:7,gridRow:2,width:"92px",height:"92px",zIndex:0,imageRendering:"pixelated"}}),e.jsx("br",{}),l]})]})}function we(s){const t=s.includes("_hd.")?"default":"pixelated";return{"--sprite-sheet":`url(${s})`,"--spritesheet-rendering":t}}function be(s,t){var a;const n=ie(((a=s==null?void 0:s.properties.sample_stage)==null?void 0:a.slice(9))??null),r=(n==null?void 0:n.properties.x_axis_focal_pos)??null,l=(t==null?void 0:t.properties.distances)??[];return h.useMemo(()=>{const u=[];r&&u.push({distanceName:"focal",distanceNum:-1,pixel_size:0,position:r,z1:0});for(const[m,o]of l.entries())u.push({...o,distanceName:`dist${m+1}`,distanceNum:m+1});return u},[r,l])}function Ce(s){var j,N,I,E,F;const{options:t}=s,{tomoconfig:n}=t,r=X(n??""),l=J(n??""),a=fe((l==null?void 0:l.holotomo)??null),u=P((a==null?void 0:a.id)??null),m=ee((l==null?void 0:l.tomoDetector)??null),o=te(),d=se((l==null?void 0:l.sx)??null),v=P((d==null?void 0:d.id)??null),i=(d==null?void 0:d.properties.state[0])==="MOVING",c=be(r,a),[f,g]=h.useState(!1),_=((j=ne().avatar)==null?void 0:j.sprite_sheet)??"resources/tomo/fox-yellow.png";if(!a)return e.jsx(V,{variant:"warning",children:"No holotomo object found"});function b(p){u.call("move",p)}const C=f;function $(){if(d===null)return"tomo-avatar";if(!i)return C?"tomo-avatar stand":"tomo-avatar";const p=d.properties;return p.position===null||p.target===null?"tomo-avatar":p.position<p.target?"tomo-avatar walk-right":p.position>p.target?"tomo-avatar walk-left":"tomo-avatar"}const z=$(),D=me(d,"sx");return e.jsxs("div",{className:"w-100",style:{flex:"1 1 0%",display:"flex",flexDirection:"column"},children:[e.jsx("h2",{children:"Configuration"}),e.jsxs(R,{className:"g-0",children:[e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:2,children:e.jsx("div",{children:"State"})}),e.jsx(x,{className:"p-1",xs:3,children:e.jsx(pe,{hardware:a})})]}),e.jsxs(R,{className:"g-0",children:[e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:2,children:e.jsx("div",{children:"Nb distances"})}),e.jsx(x,{className:"p-1",xs:3,children:e.jsx(ge,{value:(N=a.properties)==null?void 0:N.nb_distances,onValueChanged:p=>{u.setProperty("nb_distances",p)},disabled:!o})})]}),e.jsxs(R,{className:"g-0",children:[e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:2,children:e.jsx("div",{children:"Pixel size"})}),e.jsx(x,{className:"p-1",xs:3,children:e.jsx(G,{value:(I=a.properties)==null?void 0:I.pixel_size,onValidate:p=>{u.setProperty("pixel_size",p)},coef:1e3,readOnly:!o})}),e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:1,children:e.jsx("div",{title:"Nanometer",children:"nm"})}),e.jsx(x,{className:"p-1",xs:1,children:e.jsx(w,{variant:"secondary",onClick:()=>{u.setProperty("pixel_size",null)},disabled:!o||(((E=a.properties)==null?void 0:E.pixel_size)??null)===null,children:e.jsx("i",{className:"fa fa-trash"})})})]}),e.jsxs(R,{className:"g-0",children:[e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:2,children:e.jsxs("div",{children:["Sample position (",D,")"," ",d!==null&&e.jsx(L,{id:d==null?void 0:d.id,options:{header:"none",variant:"state"}})]})}),e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:3,children:e.jsx("div",{children:d!==null&&e.jsx(L,{id:d==null?void 0:d.id,options:{header:"none"}})})}),e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:1}),e.jsx(x,{className:"p-1",xs:1,children:e.jsx(w,{style:{visibility:i?"visible":"hidden"},variant:"danger",onClick:()=>{v.call("stop")},disabled:!o,children:e.jsx("i",{className:"fa fa-xmark"})})})]}),e.jsxs(R,{className:"g-0",children:[e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:2,children:e.jsxs("div",{children:["Settle time",e.jsx("br",{}),e.jsx("small",{children:"(used during acquisition)"})]})}),e.jsx(x,{className:"p-1",xs:3,children:e.jsx(G,{value:(F=a.properties)==null?void 0:F.settle_time,onValidate:p=>{u.setProperty("settle_time",p)},readOnly:!o})}),e.jsx(x,{className:"p-1 text-nowrap my-auto",xs:1,children:e.jsx("div",{title:"Second",children:"s"})})]}),e.jsx("h2",{children:"Distances"}),c.length===0&&e.jsx(V,{variant:"warning",children:"No distances are setup"}),c&&c.length>0&&e.jsxs(re,{style:{display:"grid",gridGap:5,gridTemplateColumns:`auto 1fr 1fr ${"2fr ".repeat(c.length)}`},children:[e.jsx("div",{style:{gridColumn:1,gridRow:1},children:" "}),e.jsx("div",{style:{gridColumn:1,gridRow:2},className:"text-end",title:"Distance from the focal plan",children:"Distance"}),e.jsx("div",{style:{gridColumn:1,gridRow:3},className:"text-end",children:"Pixel size"}),e.jsx("div",{style:{gridColumn:1,gridRow:4},className:"text-end",children:"Field of view"}),e.jsxs("div",{style:{gridColumn:1,gridRow:6},className:"text-end",title:"Position in the x-translation axis",children:[D," position"]}),c.map((p,y)=>e.jsx(Ne,{gridColumn:`${y===0?y+2:y+3} / ${y+4}`,distance:p,tomoDetector:m,moveToPosition:b,disabled:!o||a.properties.state!=="READY",sx:d,stabilizing:a.properties.state==="STABILIZING",onEnter:()=>g(!0),onLeave:()=>g(!1),allowMoveOnFocus:t.enable_move_on_focal_plan??!0},y)),e.jsx("img",{className:"w-100 my-auto",alt:"Beam",src:"resources/tomo/holo-beam.svg",style:{gridColumn:`3 / ${c.length+4}`,gridRow:5,height:"8em",zIndex:0,objectFit:"fill"}}),e.jsx(je,{thumbClassName:`${z}`,style:{gridColumn:`2 / ${c.length+3}`,gridRow:5,zIndex:1},thumbStyle:we(_),thumbTitle:"I am the sample",variant:i?"info":"primary",position:(d==null?void 0:d.properties.position)??null,distances:c}),e.jsx(ye,{tomoDetector:m,gridColumn:c.length+3})]})]})}function _e(s){return e.jsx(Ce,{...s})}function Ee(s){const{yamlNode:t,tomoconfig:n,enable_move_on_focal_plan:r,...l}=s;ce(t,"tomoconfig",n),de(t,"enable_move_on_focal_plan",r),ue(t,l);const a={tomoconfig:n,enable_move_on_focal_plan:r};return e.jsx(_e,{options:a})}export{Ee as default};
|