Arbitrary VOILUT in cornerstone3D?

In original cornerstone you can create a viewport object with a “VOILUTFunction” field that can be set to an arbitrary LUT object (the format of which is based on the relevant format used in DICOM).

It seems like you can’t do that in cornerstone3D. The viewport properties “VOILUTFunction” field is an enum - either linear or sigmoid.

Can you set an arbitrary VOI LUT?

I’m wondering if I need to use the “colormap” viewport property to achieve what I want - i.e. to support an arbitrary mapping from DICOM data values (after modality LUT applied) to display pixel values. Is colormap applied after VOI transformation?

I tried to set a colormap. I can’t see any docs for this. I can set an ‘hsv’ colormap (seems built-in as shown in examples) on the viewport. Works as expected. If I use registerColormap from the utilities to add a new colormap and then set that on viewport seems to have no effect.

Thank you taking a look!

No worries. I made registerColormap and setProperties on viewport do something sensible - I think. I figured out the format of the colormap from looking in vtk library:
vtk-js/Sources/Rendering/Core/ColorTransferFunction/ColorMaps.json at bbfd8977249b820bae3a3ae8b8b639a6017ce352 · Kitware/vtk-js · GitHub

Is use of custom colormaps documented in cornerstone3D somewhere I missed?