[Paraview] Show scalar range on a slider bar

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Dec 4 12:27:03 EST 2013


Cool. Sorry, this email got lost in the chaos that I call my Inbox :).

Utkarsh

On Wed, Nov 27, 2013 at 2:18 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu> wrote:
> I figured this out by looking at the 'vtkThreshold' section in Paraview's
> 'filters.xml'.
>
> Use
>
> <ArrayRangeDomain name="range">
>      <RequiredProperties>
>        <Property function="Input"
>                  name="Input" />
>        <Property function="ArraySelection"
>                  name="SelectInputScalars" />
>      </RequiredProperties>
> </ArrayRangeDomain>
>
> instead of <DoubleRangeDomain name="range" min="0.0" max="1.0" />.
>
>
> On Wed, Nov 27, 2013 at 1:37 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu>
> wrote:
>>
>> What I am asking is how to dynamically change a slider's min and max
>> values on Properties panel.
>>
>> ParaView wiki has this code to add a slider on Properties panel:
>>
>> <DoubleVectorProperty
>> name="PercentToRemove"
>> command="SetPercentToRemove"
>> number_of_elements="1"
>> default_values="0.1">
>> <DoubleRangeDomain name="range" min="0.0" max="1.0" />
>> </DoubleVectorProperty>
>>
>> This slider has values ranging from 0.0 to 1.0 hard-coded. I want to
>> change the min and max values to the min and max values in my data's scalar
>> field, but those values are not available until I read the data in.
>>
>>
>>
>> On Wed, Nov 27, 2013 at 10:46 AM, Utkarsh Ayachit
>> <utkarsh.ayachit at kitware.com> wrote:
>>>
>>> I am not sure I follow the question. Are you talking about how to put
>>> a slider on Properties panel based on something on the filter XML?
>>>
>>> On Tue, Nov 26, 2013 at 3:19 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu>
>>> wrote:
>>> > Hi,
>>> >
>>> > I'd like to expose a double variable in the form of slider. In the Wiki
>>> > example, the range of the scalar values are hard-coded. I wonder if
>>> > there's
>>> > any why to read the scalar range in my code and reflect that back to
>>> > the the
>>> > slider.
>>> >
>>> > Thanks,
>>> > Joe
>>> >
>>> > _______________________________________________
>>> > Powered by www.kitware.com
>>> >
>>> > Visit other Kitware open-source projects at
>>> > http://www.kitware.com/opensource/opensource.html
>>> >
>>> > Please keep messages on-topic and check the ParaView Wiki at:
>>> > http://paraview.org/Wiki/ParaView
>>> >
>>> > Follow this link to subscribe/unsubscribe:
>>> > http://www.paraview.org/mailman/listinfo/paraview
>>> >
>>
>>
>


More information about the ParaView mailing list