<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I use 5.1 because I have to use the .med reader plugin of salome
    8.2.<br>
    <br>
    <br>
    <br>
    Am 02.05.2017 um 20:39 schrieb Scott Wittenburg:<br>
    <blockquote
cite="mid:CAPiw4fDROAT+OtZoo6+CsPxZY0+KyWd+Rk4OqPiPGDXn8XPtFw@mail.gmail.com"
      type="cite">
      <div dir="ltr">That protocols.py code snippet looks kind of old,
        what version of ParaView are you running?  I don't recall
        precisely when we dropped the pipeline manager abstraction in
        favor of the proxy manager, but it seems like awhile ago.  Any
        chance you can update to a more recent paraview?  If you're on
        Linux and using binary distributions, avoid version 5.3.  The
        5.2 binary might be ok for you, or building from master should
        be fine.
        <div><br>
        </div>
        <div>Hope this helps,</div>
        <div>Scott</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, May 2, 2017 at 1:16 AM, Daniel
          Zuidinga <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:info@seoaachen.de" target="_blank">info@seoaachen.de</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> As I've said I edited
              the protocols.py of paraview web:<br>
              <br>
                @exportRpc("pv.pipeline.<wbr>manager.scalarbar.visibility.<wbr>update")<br>
                  def updateScalarbarVisibility(<wbr>self, options):<br>
                      lutMgr = vtkSMTransferFunctionManager()<br>
                      lutMap = {}<br>
                      view = self.getView(-1)<br>
                      if options:<br>
                          for key, lut in options.iteritems():<br>
                              visibility = lut['enabled']<br>
                              if type(lut['name']) == unicode:<br>
                                  lut['name'] = str(lut['name'])<br>
                              parts = key.split('_')<br>
                              arrayName = parts[0]<br>
                              numComps = int(parts[1])<br>
              <br>
                              lutProxy = self.getColorTransferFunction(<wbr>arrayName)<br>
                              barRep = servermanager._getPyProxy(<wbr>lutMgr.<wbr>GetScalarBarRepresentation(<wbr>lutProxy,
              view.SMProxy))<br>
              <br>
                              if visibility == 1:<br>
                                  barRep.Visibility = 1<br>
              <br>
              #EDIT#<br>
                                  barRep.TitleColor=[1.0,0.0,0.<wbr>0]<br>
                                  barRep.LabelColor=[1.0,0.0,0.<wbr>0]<br>
              <br>
                                  barRep.Enabled = 1<br>
                                  barRep.Title = arrayName<br>
                                  if numComps > 1:<br>
                                      barRep.ComponentTitle =
              'Magnitude'<br>
                                  else:<br>
                                      barRep.ComponentTitle = ''<br>
                                  vtkSMScalarBarWidgetRepresenta<wbr>tionProxy.PlaceInView(barRep.<wbr>SMProxy,
              view.SMProxy)<br>
                              else:<br>
                                  barRep.Visibility = 0<br>
                                  barRep.Enabled = 0<br>
              <br>
                              lutMap[key] = { 'lutId': lut['name'],<br>
                                            <wbr>          'name':
              arrayName,<br>
                                            <wbr>          'size':
              numComps,<br>
                                            <wbr>          'enabled':
              visibility }<br>
                      return lutMap
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <div class="m_2525276864171641934moz-cite-prefix">Am
                    01.05.2017 um 21:03 schrieb Scott Wittenburg:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Maybe we need to see more context
                      (how you got your hands on barRep, and what else
                      you did)?  I just used ParaView Qt client to
                      visualize the wavelet, and I changed these colors
                      before exporting the state as a python script.  I
                      think the following covers what you should need to
                      do:
                      <div><br>
                      </div>
                      <div>from paraview.simple import *</div>
                      <div>...</div>
                      <div>rv1 = CreateView('RenderView')</div>
                      <div>...</div>
                      <div>
                        <div>lut = GetColorTransferFunction('RTDa<wbr>ta')</div>
                        <div>...</div>
                        <div>repr = Show(someSrc, rv1)</div>
                        <div>repr.LookupTable = lut<br>
                        </div>
                        <div>...</div>
                        <div>repr.SetScalarBarVisibility(rv<wbr>1, True)</div>
                        <div>...</div>
                        <div>lutColorBar = GetScalarBar(lut, rv1)</div>
                        <div>lutColorBar.TitleColor = [...]</div>
                        <div>lutColorBar.LabelColor = [...]</div>
                      </div>
                      <div><br>
                      </div>
                      <div>Then finally maybe a Render() is required?</div>
                      <div><br>
                      </div>
                      <div>If you do all that and the color doesn't
                        change, there may be a bug.  Even though the
                        protocols we have now do not allow for changing
                        the title and label color (at least not to my
                        knowledge), you can manage this all in your
                        application code.   </div>
                      <div><br>
                      </div>
                      <div>Hope this helps,</div>
                      <div>Scott</div>
                      <div><br>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Mon, May 1, 2017 at
                        12:00 PM, Daniel Zuidinga <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:info@seoaachen.de"
                            target="_blank">info@seoaachen.de</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">Hi,<br>
                          <br>
                          I try to set the color legend font color in
                          protocols.py of paraview web visualizer.<br>
                          <br>
                          def updateScalarbarVisibility(self<wbr>,
                          options):<br>
                              ...<br>
                             barRep.TitleColor=[0.0,0.0,0.<wbr>0]<br>
                             barRep.LabelColor=[0.0,0.0,0.<wbr>0]<br>
                          <br>
                          but it doesn't change the color. Where can I
                          change it (default)? I would also show it as
                          default.<br>
                          <br>
                          regards<br>
                          Daniel<br>
                          ______________________________<wbr>_________________<br>
                          Powered by <a moz-do-not-send="true"
                            href="http://www.kitware.com"
                            rel="noreferrer" target="_blank">www.kitware.com</a><br>
                          <br>
                          Visit other Kitware open-source projects at <a
                            moz-do-not-send="true"
                            href="http://www.kitware.com/opensource/opensource.html"
                            rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
                          <br>
                          Please keep messages on-topic and check the
                          ParaView Wiki at: <a moz-do-not-send="true"
                            href="http://paraview.org/Wiki/ParaView"
                            rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
                          <br>
                          Search the list archives at: <a
                            moz-do-not-send="true"
                            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 moz-do-not-send="true"
                            href="http://public.kitware.com/mailman/listinfo/paraview"
                            rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview</a><br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>