<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 17, 2018 at 8:52 AM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all:<div><br></div><div>I have a trace from a simple contour that I drew on a data set, and there are parts of it that I don't understand. Here it is, with some question numbers:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>from paraview.simple import *</div></div><div><div><br></div></div><div><div>data = EnSightReader(CaseFileName='/<wbr>my/data/file.case')</div></div><div><div><br></div></div><div><div>renderView1 = GetActiveViewOrCreate('<wbr>RenderView')</div></div><div><div>dataDisplay = Show(data, renderView1) ## 1</div></div><div><div><br></div></div><div><div>dataDisplay.Representation = 'Surface'</div></div><div><div>renderView1.ResetCamera()</div></div><div><div>dataDisplay.<wbr>SetScalarBarVisibility(<wbr>renderView1, True)</div></div><div><div>renderView1.Update()</div></div><div><div><br></div></div><div><div>pressureLUT = GetColorTransferFunction('<wbr>pressure') ## 2</div></div><div><div>contour1 = Contour(Input=data)</div></div><div><div><br></div></div><div><div>contour1.ContourBy = ['POINTS', 'uds_0_scalar']</div></div><div><div>contour1.Isosurfaces = [500.0]</div></div><div><div><br></div></div><div><div>contour1Display = Show(contour1, renderView1)</div></div><div><div>contour1Display.Representation = 'Surface'</div></div><div><div>Hide(data, renderView1)</div></div><div><div><br></div></div><div><div>contour1Display.<wbr>SetScalarBarVisibility(<wbr>renderView1, True) ## 3</div></div><div><div>renderView1.Update()</div></div></blockquote><div><br></div><div>My questions: </div><div><br></div><div> 1. Why do I have to "Show" the raw data right after it's read? I almost never actually want to do that. I just want to show the contour. Showing and Hiding the raw data seems like a waste of cycles, but when I remove references to dataDisplay, I get an error: "Failed to determine the LookupTable being used." which seems oddly unrelated to what I did.<br></div></div></blockquote><div><br></div><div>Show() sets up the representation for the data you have loaded. I suspect you are getting the LookupTable error message if you retain the "Hide(data, renderView1)" call because it is expecting to find representation state for "data" that you have not set up with "Show()" and it cannot find it. Try removing the "Hide()" and see if you still see the error.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div> 2. Where does this value get used? It doesn't seem to me that it is being used, but it seems related to the last and the next question:</div></div></blockquote><div><br></div><div>I assume you mean the "dataDisplay" variable. It is not used in your script directly, but you could set representation properties later on, which is why the tracing function defines it. Tracing is pretty awesome, but it doesn't do anything as fancy as analyzing the resulting trace to remove unused variables, for instance.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div> 3. When I choose different scalar values to contour, I often see the same "Failed to determine the LookupTable being used." here. There seem to be some limitations on what scalars I can use, but what are they and where can I read more about these missing lookup tables?</div></div></blockquote><div><br></div><div>See if my answer to 1 solves the problem. If not, do you see this when you are coloring by the same array as the array for the lookup table? If so, you should call "contour1.ComputeScalars = 1". This will tell the contour filter to produce a scalar array corresponding to the array by which you contoured. It will contain only the isovalues, which is why it is off by default.</div><div><br></div><div>Thanks</div><div>Cory</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thank you,</div><div><br></div><div> -Tom<br><br><br><br></div></div>
<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 <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: <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://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div></div>