<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello again,</p>
    <p>If I do that, the chart is not visible anymore (the Qt widget is
      all black), if I change the renderer of the vtkContextView also 
      (the Qt widget is all white) !</p>
    <p>I give up for the moment !</p>
    <p>ParaView is a such complex software, that I can't trace the stuff
      related to anti-alisaing in it (reverse engineering ParaView it is
      tough : a complex build system, many layers, proxies, in fact,
      it's an oriented object mix of a lasagna and spaghetti code !).<br>
    </p>
    <p>Thanks anyway.<br>
    </p>
    <div class="moz-cite-prefix">Le 26/12/2018 à 16:02, Paulo Carvalho a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+xrYwhp+hU847J4jV+ekUgT_H5oYXnXMFXuxiRNYBmOYc=MjQ@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div>
                <div>Hi, Mohammed,<br>
                  <br>
                </div>
                   Strange indeed.  Did you create the vtkRender object
                yourself or you just used the default one returned by
                GetRenderer()?   If the latter is your case, I recommend
                creating your own vtkRender:<br>
              </div>
              <div dir="ltr"><br>
                <span style="color:rgb(128,0,0)">m_renderer</span><span
                  style="color:rgb(192,192,192)"> </span>=<span
                  style="color:rgb(192,192,192)"> </span><span
                  style="color:rgb(128,0,128)">vtkSmartPointer</span><<span
                  style="color:rgb(128,0,128)">vtkRenderer</span>>::<span
                  style="color:rgb(0,103,124)">New</span>();<br>
                <span style="color:rgb(128,0,0)">m_renderer</span>-><span
                  style="font-style:italic;color:rgb(0,103,124)">UseFXAAOn</span>();<br>
                <br>
                    vtkFXAAOptions* const aaOpts =
                m_renderer->GetFXAAOptions();<br>
                     aaOpts->SetRelativeContrastThreshold(0.125);<br>
                     aaOpts->SetHardContrastThreshold(0.045);<br>
                     aaOpts->SetSubpixelBlendLimit(0.75);<br>
                     aaOpts->SetSubpixelContrastThreshold(0.25);<br>
                     aaOpts->SetUseHighQualityEndpoints(true);<br>
                     aaOpts->SetEndpointSearchIterations(12);<br>
                <br>
                <span style="color:rgb(128,0,0)">m_view</span>-><span
                  style="font-style:italic;color:rgb(0,103,124)">GetRenderWindow</span>()-><span
                  style="font-style:italic;color:rgb(0,103,124)">AddRenderer</span>(<span
                  style="color:rgb(128,0,0)"> m_renderer</span> );</div>
              <div><br>
              </div>
              <div>cheers,<br>
                <br>
              </div>
              <div>Paulo<br>
              </div>
              <div dir="ltr"><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">Em qua, 26 de dez de 2018 às 12:15, Mohamed Amine
          Mzoughi <<a href="mailto:aminemzoughi@febus-optics.com"
            moz-do-not-send="true">aminemzoughi@febus-optics.com</a>>
          escreveu:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF">
            <p>Hello Paulo,</p>
            <p>Even without SmoothingOn* instructions, I still have a
              problem in my 2D charts (I use a subclass of vtkChartXY,
              same issue with vtkHistogramChart2D, I have rectangles in
              screen). <br>
            </p>
            <p>In ParaView, the line is smooth :</p>
            <img src="cid:part2.D86F6BAF.87833CA3@febus-optics.com"
              alt="" class=""><br>
            whereas in my VTK app, it isn't :<br>
            <br>
            <img src="cid:part3.2D3DB5FF.23C70F72@febus-optics.com"
              alt="" class=""><br>
            <br>
            I don't know the issue...<br>
            <br>
            I'm calling the FXAA instructions before Render() in the
            constructor, I tried even to call them before each call to
            Render().<br>
            <br>
            Best regards.<br>
            <br>
            <div class="gmail-m_-8765007500146758639moz-cite-prefix">Le
              26/12/2018 à 14:21, Paulo Carvalho a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div>
                            <div>Hello, Mohamed!<br>
                              <br>
                            </div>
                              It seems that your last calls
                            (*SmoothingOn()) conflict with UseFXAAOn().<br>
                            <br>
                          </div>
                          Here is the output I get when I add a call to
                          PolygonSmoothingOn().  Not only it is not
                          antialiased, but you can notice the edges
                          triangle strips, visually ruining the results:<br>
                          <br>
                          <div><img
                              src="cid:part4.164C3B9C.00D4F6C3@febus-optics.com"
                              alt="image.png" class="" width="561"
                              height="354"><br>
                            <br>
                          </div>
                          <div>This one is rendered with only
                            UseFXAAOn() and some configuration to the
                            vtkFXAAOptions object like you did:<br>
                          </div>
                          <div>
                            <div><img
                                src="cid:part5.9820506E.150266E6@febus-optics.com"
                                alt="image.png" class="" width="561"
                                height="366"><br>
                              <br>
                            </div>
                            <div>kind regards,<br>
                              <br>
                            </div>
                            <div>Paulo<br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr">Em qua, 26 de dez de 2018 às 10:03,
                  Mohamed Amine Mzoughi <<a
                    href="mailto:aminemzoughi@febus-optics.com"
                    target="_blank" moz-do-not-send="true">aminemzoughi@febus-optics.com</a>>
                  escreveu:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">Hello,<br>
                  <br>
                  I want to enable Anti-alisaing in my VTK app, so I
                  took some parameters <br>
                  from ParaView and it still doesn't work :<br>
                  <br>
                       m_view->GetRenderer()->UseFXAAOn(); //
                  enable AA<br>
                  <br>
                       vtkFXAAOptions* const aaOpts =
                  m_view->GetRenderer()->GetFXAAOptions();<br>
                       aaOpts->SetRelativeContrastThreshold(0.125);<br>
                       aaOpts->SetHardContrastThreshold(0.045);<br>
                       aaOpts->SetSubpixelBlendLimit(0.75);<br>
                       aaOpts->SetSubpixelContrastThreshold(0.25);<br>
                       aaOpts->SetUseHighQualityEndpoints(true);<br>
                       aaOpts->SetEndpointSearchIterations(12);<br>
                  <br>
                  what am I missing ?<br>
                  <br>
                  Also,
                  m_view->GetRenderWindow()->GetMultiSamples()
                  => returns 8.<br>
                  <br>
                  and I called also :<br>
                  <br>
                  m_view->GetRenderWindow()->LineSmoothingOn();<br>
                  m_view->GetRenderWindow()->PolygonSmoothingOn();
                  <br>
                  m_view->GetRenderWindow()->PointSmoothingOn();<br>
                  <br>
                  Thanks.<br>
                  <br>
                  _______________________________________________<br>
                  Powered by <a href="http://www.kitware.com"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">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"
                    moz-do-not-send="true">http://www.kitware.com/opensource/opensource.html</a><br>
                  <br>
                  Please keep messages on-topic and check the VTK FAQ
                  at: <a href="http://www.vtk.org/Wiki/VTK_FAQ"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
                  <br>
                  Search the list archives at: <a
                    href="http://markmail.org/search/?q=vtkusers"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://markmail.org/search/?q=vtkusers</a><br>
                  <br>
                  Follow this link to subscribe/unsubscribe:<br>
                  <a href="https://vtk.org/mailman/listinfo/vtkusers"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">https://vtk.org/mailman/listinfo/vtkusers</a><br>
                </blockquote>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>