Code covered by the BSD License  

Highlights from
VERY FAST LOADING OF BULKY POINT CLOUDS AND MATRICES IN ASCII FORMAT

VERY FAST LOADING OF BULKY POINT CLOUDS AND MATRICES IN ASCII FORMAT

by

 

Modules for very fast loading and saving of bulky point clouds and matrices in ASCII format

cloadTest.m
%
% Test file for the function DATA = CLOAD(FILENAMES,DECIMALSIGN)
%

% Workspace
clc
clear all

% Build
fprintf('Building.......................');
mex cload.c
fprintf('ok!\n');

% Filenames
fprintf('Locating point cloud files.....');
[infilelist, infilepath] = uigetfile({'*.xyz','Plain-files (*.xyz)'; '*.*',  'All Files (*.*)'}, 'Pick a file', 'MultiSelect', 'on');

if ~isequal(infilelist,0) && ~isequal(infilepath,0)
    % Full path
    if(iscell(infilelist))
        for n = 1:numel(infilelist)
            infilelist{n} = strrep([infilepath, infilelist{n}], '\', '/');
        end;
    else
        infilelist = {strrep([infilepath, infilelist], '\', '/')};
    end;

    % Data repository
    nfiles = numel(infilelist);
    data = cell(n,1);

    % Files
    message = 'Please wait...';
    h = waitbar(0,message,'Name','Loading files...');
    for n = 1:nfiles
        waitbar(n/nfiles,h,infilelist{n});
        data{n} = cload(infilelist{n});
    end;
    delete(h);
end;
fprintf('ok!\n');

% Clean up
clear infilelist infilepath n nfiles message h
data

% End of test file

Contact us