File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,9 @@ const applyLayerColoring = () => {
7373 if (! config ) return ;
7474
7575 const cfun = sliceRep .property .getRGBTransferFunction (0 );
76- const ofun = sliceRep .property .getScalarOpacity (0 );
76+ const ofun = sliceRep .property .getPiecewiseFunction (0 );
77+
78+ if (! cfun || ! ofun ) throw new Error (' Missing transfer functions' );
7779
7880 applyColoring ({
7981 props: {
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ const applySegmentColoring = () => {
105105 const cfun = sliceRep .property .getRGBTransferFunction (0 );
106106 const ofun = sliceRep .property .getPiecewiseFunction (0 );
107107
108+ if (! cfun || ! ofun ) throw new Error (' Missing transfer functions' );
109+
108110 cfun .removeAllPoints ();
109111 ofun .removeAllPoints ();
110112
@@ -142,10 +144,12 @@ const config = computed(() =>
142144);
143145
144146const outlineThickness = computed (() => config .value ?.outlineThickness ?? 2 );
147+ // @ts-expect-error vtk.js types are incomplete
145148sliceRep .property .setUseLabelOutline (true );
146149sliceRep .property .setUseLookupTableScalarRange (true );
147150
148151watchEffect (() => {
152+ // @ts-expect-error vtk.js types are incomplete
149153 sliceRep .property .setLabelOutlineOpacity (config .value ?.outlineOpacity ?? 1 );
150154});
151155
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ const LayersConfig = z.object({
218218
219219const SegmentGroupConfig = z . object ( {
220220 outlineOpacity : z . number ( ) ,
221+ outlineThickness : z . number ( ) ,
221222} ) satisfies z . ZodType < SegmentGroupConfig > ;
222223
223224const ViewConfig = z . object ( {
You can’t perform that action at this time.
0 commit comments