ParameterNodeWrapper with dynamic Minimum/Maximum

Hi,

I am working on adapting some code to use the parameterNodeWrapper and was wondering if there is any way to set the validator’s Minimum and Maximum values of ctkSliderWidget dynamically at runtime.

Use case

I have a volume sequence selector in the UI which upon selection should set the maximum value of the slider to the number of data nodes -1.

I can directly set the maximum of the slider, but I will receive a ValueError when exceeding the initially set Minimum/Maximum.

Similarly, it would be interesting to validate the value of one parameter to be smaller/larger than another parameter.

Since there is already a binding between the UI and the parameter node, could we simply update the UI component’s minimum/maximum values and adjust the validation parameters accordingly?

Is there a way to access the validator directly through the parameterNodeWrapper?