View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011539 | ParaView | Feature | public | 2010-11-30 11:18 | 2016-03-09 13:17 | ||||
Reporter | Rick Angelini | ||||||||
Assigned To | Alan Scott | ||||||||
Priority | normal | Severity | minor | Reproducibility | N/A | ||||
Status | closed | Resolution | fixed | ||||||
Platform | ALL | OS | ALL | OS Version | ALL | ||||
Product Version | Development | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011539: Python Macro to "Rescale Data to Range" | ||||||||
Description | Can I get a single Python macro that is equivalent to "Rescale to Data Range"? I will provide below an example of how I want to use this macro, but I suppose this feature would be valuable for ANY python script that loads a state file where the scale of some variables changes after the state file is created. I am doing some testing with Paraview where I'm looking at how the data is distributed across processors. So, I'm loading my data and applying the Process ID Filter. So far, so good. I'm using PVBATCH to do some of the testing and I'm using a very simple .py file that looks like this: rom paraview.simple import * servermanager.LoadState("cth_390.pvsm") WriteAnimation("./cth_390.png") I need one more command to get things the way that I want them. The color table is not automatically scaled across the number of processors used in the current batch run - it's scaled across the number of processors I used when I created the state file. If I'm running ParaView interactively, I can simply use the "Rescale to Data Range" button. How do I find the appropriate action when running in batch? I looked at the python that was generated when I do this interactively, and the command is specific to the current run - it's not a generic solution: a1_ProcessId_PVLookupTable = GetLookupTableForArray( "ProcessId", 1, RGBPoints=[0.0, 0.23000000000000001, 0.29899999999999999, 0.754, 5.0, 0.70599999999999996, 0.016, 0.14999999999999999] ) Render() I suppose this feature would be valuable for ANY state file where the scale of some variables changes after the state file is created. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Topic Name | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0023581) Rick Angelini (reporter) 2010-11-30 11:26 |
On a side note, it seems as though anything that you can click on in the GUI should have an equivalent Python macro. |
(0035836) Alan Scott (manager) 2016-03-09 13:17 |
This has been implemented, and can be found through the trace recorder (i.e., tools/ start and stop trace). The actual command is # rescale color and/or opacity maps used to exactly fit the current data range canex2Display.RescaleTransferFunctionToDataRange(False) Closing bug. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-11-30 11:18 | Rick Angelini | New Issue | |
2010-11-30 11:26 | Rick Angelini | Note Added: 0023581 | |
2011-06-16 13:10 | Zack Galbreath | Category | Feature Request => Feature |
2016-03-09 13:17 | Alan Scott | Note Added: 0035836 | |
2016-03-09 13:17 | Alan Scott | Status | expired => closed |
2016-03-09 13:17 | Alan Scott | Assigned To | => Alan Scott |
2016-03-09 13:17 | Alan Scott | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |