<div dir="ltr">I'ld use something like the PythonCalculator to pass through a renamed copy of the original array.<div>Once the copy is renamed, paraview will let you color and otherwise treat it independently from the input array that it is a copy of.</div><div><br></div><div>You can probably get away with a shallow copy of the array contents too. Then the only cost will be a few bytes for the new container data structures. I'ld start going about doing that at the VTK API level in the python programmable filter.<br></div><div><br></div><div class="gmail_extra"><div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div></div>
<br><div class="gmail_quote">On Thu, Nov 27, 2014 at 3:12 AM, Christian Butcher <span dir="ltr"><<a href="mailto:christian.butcher@oist.jp" target="_blank">christian.butcher@oist.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear ParaView list,<br>
<br>
I'm currently trying to open multiple 'RenderView' windows so that I<br>
can show, for example, U_x, U_y, and U_z along with U_Magnitude<br>
simultaneously for the purpose of exporting an animation using<br>
ParaView-v4.2.0.<br>
<br>
Studying a Python trace whilst switching components using the Qt GUI<br>
suggests this is not trivially possible using either the GUI or a<br>
Python shell.<br>
<br>
The Python trace shows these lines:<br>
   uLUT = GetColorTransferFunction('U')<br>
   uLUT.VectorMode = 'Magnitude'<br>
and switching to, for example, U_y requires<br>
   uLUT.VectorMode = 'Component'<br>
   uLUT.VectorComponent = 0<br>
<br>
Since the uLUT proxy is returned by the GetColorTransferFunction('U')<br>
function, I'm unsure but doubting that I can duplicate this proxy and<br>
set different values in different Views.<br>
<br>
Duplicating data files allows the reading of a file multiple times,<br>
but isn't really practicable given memory constraints etc.<br>
<br>
Looking at the OpenFOAM reader in vtkOpenFOAMReader.{h,cxx} and<br>
vtkPOpenFOAMReader.{h,cxx} suggests that the relevant function to<br>
modify in the reader might be<br>
<br>
    vtkFloatArray *vtkOpenFOAMReaderPrivate::FillField(vtkFoamEntry<br>
*entryPtr, int nElements, vtkFoamIOobject *ioPtr, const vtkStdString<br>
&fieldType)<br>
.P<br>
but since this has to return a (single) vtkFloatArray*, I'm unsure if<br>
any modifications are likely to help me.<br>
<br>
The 'U' field can be identified using statements like:<br>
    if (ioPtr->GetObjectName() == "U") { // process here }<br>
Individual components are accessible using:<br>
<br>
    data = static_cast<vtkFloatArray *>(entry.Ptr());<br>
    float *tuple = data->GetPointer(nComponents * tupleI);<br>
    tuple[0] = xValueOfVelocityForCellReferedToByTupleI;<br>
<br>
etc.<br>
<br>
The function can be found around line 6480 in vtkOpenFOAMReader.cxx<br>
<br>
Does anyone have an idea I could use to simultaneously display<br>
different velocity components (and magnitude, if possible, but this<br>
can be coded into a 4th component fairly easily I suspect, if only<br>
individual components could be simultaneously shown)?<br>
<br>
Best,<br>
<br>
Christian Butcher<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</blockquote></div><br></div></div>