<div dir="ltr"><div dir="ltr"><div>Hi, Mohammed,<br><br></div>      Yes, I know that feeling...  Paraview is complex, yes.  It's difficult to get the hang of its code in a glimpse.  Either you invest the time to dissect the code or look into something simpler.  You may take a look at how I setup a VTK viewer: <a href="https://github.com/PauloCarvalhoRJ/gammaray/blob/master/viewer3d/view3dwidget.cpp">https://github.com/PauloCarvalhoRJ/gammaray/blob/master/viewer3d/view3dwidget.cpp</a> (It's several orders of magnitude simpler than Paraview).  It's a 3D viewer in a Qt window though.  I've never tried VTK charts myself (I use the more lightweight Qwt and Qt Charts APIs for that).<br></div><div><br></div><div>regards,<br></div><div><br></div><div>Paulo<br></div></div><br><div class="gmail_quote"><div dir="ltr">Em qua, 26 de dez de 2018 às 13:38, Mohamed Amine Mzoughi <<a href="mailto:aminemzoughi@febus-optics.com">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 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="gmail-m_6881189974807897250moz-cite-prefix">Le 26/12/2018 à 16:02, Paulo Carvalho a
      écrit :<br>
    </div>
    <blockquote type="cite">
      <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" target="_blank">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:167eb2f0a9e8dc7ba8a1" alt=""><br>
            whereas in my VTK app, it isn't :<br>
            <br>
            <img src="cid:167eb2f0a9e9ee00e052" alt=""><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_6881189974807897250gmail-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:167eb2f0aa0cb971f163" alt="image.png" height="354" width="561"><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:167eb2f0aa0cb971f164" alt="image.png" height="366" width="561"><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">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">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/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">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">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">https://vtk.org/mailman/listinfo/vtkusers</a><br>
                </blockquote>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>