<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Alan,<br>
      <br>
      You get the array object from the source/reader/filter's point
      data. for example <br>
      <blockquote>w = Wavelet()<br>
        wa = w.PointData.GetArray('RTData')<br>
      </blockquote>
      See if this example doesn't help:
      <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView/Python/Lookup_tables">http://paraview.org/Wiki/ParaView/Python/Lookup_tables</a><br>
      <br>
      Burlen<br>
      <br>
      On 2/24/2014 1:29 PM, Scott, W Alan wrote:<br>
    </div>
    <blockquote
cite="mid:9047EE0D4D3C8E43B93980DA10A073809476F99B@EXMB04.srn.sandia.gov"
      type="cite">
      <pre wrap="">I have a user that is trying to assign a custom color map in Python.  How is this done?  I tried the trace recorder, but it doesn't show this action/command.  Mu user's note is below:

Thanks,

Alan



Hello,

I am trying to use paraview.simple python interface to assign a custom color map, but I can't seem to get it to work with even the default color maps.  For example

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">AssignLookupTable("nodal_eqps", "Warm")
</pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre wrap="">Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/paraview.app/Contents/Python/paraview/simple.py", line 770, in AssignLookupTable
    return _GetLUTReaderInstance().GetLUT(arrayObject, LUTName, rangeOveride)
  File "/Applications/paraview.app/Contents/Python/paraview/lookuptable.py", line 234, in GetLUT
    range = self.__GetRange(aArray,aRangeOveride)
  File "/Applications/paraview.app/Contents/Python/paraview/lookuptable.py", line 301, in __GetRange
    nComps = aArray.GetNumberOfComponents()
AttributeError: 'str' object has no attribute 'GetNumberOfComponents'

I have been looking at

<a class="moz-txt-link-freetext" href="http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/_modules/paraview/simple.html#AssignLookupTable">http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/_modules/paraview/simple.html#AssignLookupTable</a>

and it appears I need to pass "AssignLookupTable" an "arrayObject".  The "arrayname" called "nodal_eqps" works fine with "GetLookupTableForArray", but I don't know how to create an "arrayObject" from this "arrayname".

Thanks for any help you can lend.


_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>