Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to replace default point shape in PCLVisualizer to other shape?
Forum Update on Monday, May 27th 2025

How to replace default point shape in PCLVisualizer to other shape?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 613 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    npatil15
    wrote on last edited by
    #1

    Hello All,

    I'm drawing the point cloud data using this library, http://docs.pointclouds.org/1.8.1/cl...isualizer.html

    Now I can see point cloud data (In terms of points) on the widgets, but I want to replace all points with another shape (like cross and circle).

    I know we can add shapes (line, sphere, arrow, polygon) to widgets, but I don't want to add, I just want to replace all point to a particular shape.

    So if anyone has done this or has an idea please suggest me.

    Thanks in advance!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What are you doing with theses widgets ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        npatil15
        wrote on last edited by
        #3

        I'm displaying radar point cloud data on widgets. Now I can see all the points, but if I connect multiple radar PCD input then the user should have the option to distinguish the data from other PCD data. So for my concern, I want to add some shapes like circles or cross instead of points.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What are you using to render your points ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • N Offline
            N Offline
            npatil15
            wrote on last edited by npatil15
            #5

            Somehow I have added shapes as,
            For Cross:

                pcl::PointXYZ point2(points.x()+2, points.y()+2, points.z());
                pclVisualizer.addLine(point1, point2, id);
            
                pcl::PointXYZ point3(points.x()+2, points.y()-2, points.z());
                pcl::PointXYZ point4(points.x()-2, points.y()+2, points.z());
                pclVisualizer.addLine(point3, point4, id1);
            

            For Circle:

                pcl::ModelCoefficients circle_coeff;
                circle_coeff.values.resize (3);    // We need 3 values
                circle_coeff.values[0] = points.x();
                circle_coeff.values[1] = points.y();
                circle_coeff.values[2] = 1;
                pclVisualizer.addCircle(circle_coeff, id);
            

            Now I can see cross and circle, but the circle is not so clear so far, How I can make it clear or increase its width?
            Thanks

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved