[Paraview] Setting a color map

Reuter, Michael A. reuterma at ornl.gov
Fri Jun 24 14:55:58 EDT 2011


Thanks for the tip on the LUT modification. I finally got to put this into
action and it work great.

M

On 6/13/11 4:33 PM, "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com> wrote:


>I couldn't find any code that converts a pqColorMapModel to properties
>on the LUT proxy directly. However, once you get access to the
>existing LUT proxy on the representation, it shouldn't be too hard to
>map the scalar+color values from the pqColorMapModel to the RGBPoints
>on the LUT proxy. To access the LUT proxy you can use
>pqDataRepresentation::getLookupTableProxy().  There's code in
>pqColorScaleEditor::loadPreset that may help, but it doesn't update
>the proxy directly.
>
>Utkarsh
>
>On Mon, Jun 13, 2011 at 10:38 AM, Reuter, Michael A. <reuterma at ornl.gov>
>wrote:
>> My current situation is that the user has already chosen an array to
>>color
>> by. I'm then using the handy dialog box provided by the
>> pqColorPresetManager to allow the user to select a new colormap. I
>> retrieve the pqColorMapModel from the selection and then I want to apply
>> the new colormap to the current color array.
>>
>> Cheers,
>> M
>>
>>
>>
>>
>> On 6/13/11 9:08 AM, "Utkarsh Ayachit" <utkarsh.ayachit at kitware.com>
>>wrote:
>>
>>>Out of curiosity, how was the pqColorMapModel created? It's generally
>>>easier to directly manipulate the properties of a lookup table proxy.
>>>To provide you with the easiest path forward, I was wondering what
>>>your setup is. Has the user chosen the array to color by and now you
>>>want to change the  existing LUT's properties or do you want to setup
>>>a brand new LUT for this representation. In case of former, any other
>>>representation being colored with the same array will automatically
>>>use your changed LUT, which won't be the case with the latter.
>>>
>>>Utkarsh
>>>
>>>On Fri, Jun 10, 2011 at 1:35 PM, Reuter, Michael A. <reuterma at ornl.gov>
>>>wrote:
>>>> Hi,
>>>>
>>>>  I have a pqColorMapModel that I want to programmatically (C++) set on
>>>>a pqPipelineRepresentation. I've been looking at the code and thought
>>>>that the way forward was via pqScalarsToColors and setting the
>>>>LookupTable property on the representation. However, I don't see a way
>>>>to translate between the pqColorMapModel and pqScalarsToColors. What is
>>>>the correct way to handle this situation?
>>>>
>>>> Thanks,
>>>> M
>>>>
>>>>
>>>> Dr. Michael Reuter
>>>> Scientific Data Analysis Group
>>>> Neutron Scattering Science Division
>>>> Oak Ridge National Laboratory
>>>>
>>>> Office: 1-865-241-7216
>>>> Fax: 1-865-574-6080
>>>> Email: reuterma at ornl.gov<mailto:reuterma at ornl.gov>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>>blockedblockedhttp://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>blockedblockedhttp://paraview.org/Wiki/ParaView
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> blockedblockedhttp://www.paraview.org/mailman/listinfo/paraview
>>>>
>>>
>>
>>
>



More information about the ParaView mailing list