<div dir="ltr">I think the python scripting with embedded data is worth a try. I'm not familiar with the built-in vs other server modes so I'm not sure what kind of restrictions that entails. <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Probably my ultimate goal is to build a reader plugin that will parse the data out of my application's native format but generating a script seems like a decent interim solution.</span><div><br></div><div>Thanks,</div><div>Wyatt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 29, 2018 at 5:57 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wyatt,<br>
<br>
ParaView provides extensive Python scriptability. One solution is to<br>
write out a Python script from your program. Within the Pythons<br>
script, you set up the data, set up filters and modify visualization<br>
settings just as you wish. Once it is loaded, you can continue to<br>
explore your data by creating new filters, changing visualization<br>
parameters, and so on.<br>
<br>
Creating example Python scripts is easy using the Trace functionality<br>
(Tools menu -> Start Trace) - you just interact with the UI and the<br>
equivalent Python operations will be written to the trace file. Use<br>
such a trace as a basis for what is written from your program.<br>
<br>
To save the data to the Python script and then load it is a different<br>
use case from what we typical support, but I think it is doable. It<br>
would just look a little ugly (and it would only work in built-in<br>
server mode). Basically, you could write out your data in a NumPy<br>
array within the script, as if you were entering the array information<br>
by hand, then provide that data to what's called a TrivialProducer<br>
source. This source would stand in place of a reader. There is a<br>
little bit of code required to do that that isn't super obvious -<br>
before sketching it out, would this approach work for your needs?<br>
<br>
Thanks,<br>
Cory<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Sun, Jan 28, 2018 at 10:10 PM, Wyatt Spear <<a href="mailto:wspear@cs.uoregon.edu">wspear@cs.uoregon.edu</a>> wrote:<br>
> Thanks, I'll take a look at this. My use case is pretty severely<br>
> underutilizing ParaView's capabilities though. I'm rendering very large<br>
> multi-variable heat maps. So color mapped 2d points are all I need rendered,<br>
> (until I can figure out how to map glyph height to another variable).<br>
><br>
> =Wyatt<br>
><br>
><br>
> On Sat, Jan 27, 2018 at 8:52 AM Samuel Key <<a href="mailto:samuelkey@bresnan.net">samuelkey@bresnan.net</a>> wrote:<br>
>><br>
>> Wyatt--<br>
>><br>
>> While ParaView can read CSV files and subsequently generate images, the<br>
>> CSV format for simulation results limits the functionality available to you<br>
>> in ParaView. My suggestion is that you write your simulation results in a<br>
>> format that contains geometry information, as well as, Point and Cell<br>
>> centered values like displacement, velocity, acceleration, temperature,<br>
>> concentrations, volume fractions, et cetera.<br>
>><br>
>> The attached document is a good place to start. (This document is very<br>
>> concise and very complete, but the information is only written down once. As<br>
>> a result, the format information is sometimes not located where you need<br>
>> it.)<br>
>><br>
>> If your simulations are concerned with the deformation of 3-D solids and<br>
>> structures, I can provide you with FORTRAN95 routines that you can use to<br>
>> write VTK-formatted simulation results.<br>
>><br>
>> Once you can generate VTK-formatted datum sets, The File > Save State<br>
>> command will generate *.pvsm files that will let you "recreate" a previously<br>
>> constructed Browser Pipeline. (The PV *.pvsm reader gives you the<br>
>> opportunity to select a different datum set.)<br>
>><br>
>> There is a small two-cell mesh file attached that might be helpful to you<br>
>> when constructing a VTK-formatted file writer in your application.<br>
>><br>
>> --Sam<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> On 1/27/2018 8:46 AM, Wyatt Spear wrote:<br>
>><br>
>> Greetings,<br>
>><br>
>> Currently I am using my own application to generate a simple CSV file<br>
>> which can be loaded up in ParaView. I then create the visualization I want<br>
>> with a few manual filter operations.<br>
>><br>
>> What I would like is to generate a file, preferably still with a field for<br>
>> CSV-like raw data, that tells ParaView to load the data and then apply the<br>
>> filters I want, so the view I want is immediately available upon loading the<br>
>> file and the raw data is available if I want to try other filters.<br>
>><br>
>> I've taken a look at vpt and pvd files saved from my intended view but I'm<br>
>> not seeing much correspondence between the CSV data I generate, the filters<br>
>> I apply and the data fields in there. I'm also pondering the save-state and<br>
>> trace/macro features of ParaView but I suspect those won't quite square with<br>
>> my aim of generating a file in an external application which includes data.<br>
>><br>
>> Could someone point me toward a proper way to do this? If it comes down to<br>
>> plugin development I'm willing to take a look at that.<br>
>><br>
>> Thanks,<br>
>> Wyatt Spear<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the ParaView Wiki at:<br>
>> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="https://paraview.org/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://paraview.org/mailman/<wbr>listinfo/paraview</a><br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the ParaView Wiki at:<br>
>> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="https://paraview.org/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://paraview.org/mailman/<wbr>listinfo/paraview</a><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://paraview.org/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://paraview.org/mailman/<wbr>listinfo/paraview</a><br>
><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<br>
<br>
</font></span></blockquote></div><br></div>