asking for *.bin file for test

Feel free to ask any question here
Post Reply
hanyan0125
Posts: 2
Joined: Tue Dec 07, 2010 12:36 pm

asking for *.bin file for test

Post by hanyan0125 »

Dear sir:
I'm a new user of CloudCompare,I want to test the software .But I could not open my binfile,so I search it in this web and couldn't find any.I notice it in the FILE I/O page that it's CloudCompare own format .But I could find some example data in the website.Could anyone do me a favor to help me about that?Thank you so much!
Last edited by hanyan0125 on Sun Mar 13, 2011 1:20 pm, edited 1 time in total.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: asking for *.bin file for test

Post by daniel »

Hello,

in fact, people generally import their own data from an ASCII file (one point per line - 'x y z' coordinates in clear text). Once loaded, they can save it in 'bin' format to make smaller files and faster loading.

However, you'll find in attach such a 'bin' file.

Daniel
Attachments
Rem_Khoolhaas.zip
Rem Khoolhaas house - single point of view
(1.04 MiB) Downloaded 1035 times
Daniel, CloudCompare admin
hanyan0125
Posts: 2
Joined: Tue Dec 07, 2010 12:36 pm

Re: asking for *.bin file for test

Post by hanyan0125 »

daniel wrote:Hello,
in fact, people generally import their own data from an ASCII file (one point per line - 'x y z' coordinates in clear text). Once loaded, they can save it in 'bin' format to make smaller files and faster loading.
However, you'll find in attach such a 'bin' file.
Daniel
Daniel:
Thank you very much for your test data! By the way, my original purpose is to write this kind of binfile in my other software ,so I can do less converting works while using CloudCompare . Could you please explain the structure of this binfile to me ?
Thank you again for your attention!
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: asking for *.bin file for test

Post by daniel »

You'd best look directly at 'qCC\fileIO\BinFilter.cpp (the 'saveToOpenedFile' and 'WriteListHeader' methods).

the content is as following:
  • [4 bytes - unsigned int] the number of clouds stored in the file
  • then for each cloud:
    • [4 bytes - unsigned int] the number of points in the cloud
    • [1 byte - unsigned char] binary flags with the following bits (from least to most significant) :
      - bit 1: always '1'
      - bit 2: cloud has colors
      - bit 3: cloud has normals
      - bit 4: cloud has an associated scalar field (per-point scalar value)
      - bit 5-8: not used (0)
    • then for each point
      • [3*4 bytes - floats] X,Y,Z coordinates
      • if cloud has colors: [3*1 bytes - unsigned char] RGB values
      • if cloud has normals: [3*4 bytes - floats] (Nx,Ny,Nz) values
      • if cloud has a scalar field: [4 bytes - float] scalar value
That's it!
Daniel, CloudCompare admin
Post Reply