主要内容

reset

R2026b

Reset e57FileReader object to first frame

Since R2026b

    Description

    reset(e57Reader) resets E57 file reader object e57Reader to its first frame by setting its PointCloudIndex property to 1.

    example

    Examples

    collapse all

    Download a ZIP file containing an E57 file, and then unzip the file.

    zipFile = matlab.internal.examples.downloadSupportFile("lidar","data/e57ParkingLot.zip");
    saveFolder = fileparts(zipFile);
    e57FileName = [saveFolder filesep 'parkingLot.e57'];
    if ~exist(e57FileName,"file")
        unzip(zipFile,saveFolder)
    end

    Create an e57FileReader object.

    e57Reader = e57FileReader(e57FileName);

    Inspect the values of the NumPointClouds and PointCloudIndex properties of the e57Reader object.

    disp(e57Reader.NumPointClouds);
        19
    
    disp(e57Reader.PointCloudIndex);
         1
    

    Read the last point cloud from the E57 file and verify that the readPointCloud object function advances the PointCloudIndex property to the next value after NumPointClouds.

    ptCloud = readPointCloud(e57Reader,e57Reader.NumPointClouds);
    disp(e57Reader.PointCloudIndex);
        20
    

    Reset the e57FileReader object and verify that the value of the PointCloudIndex property is reset to 1.

    reset(e57Reader);
    disp(e57Reader.PointCloudIndex);
         1
    

    Input Arguments

    collapse all

    E57 file reader, specified as an e57FileReader object.

    Version History

    Introduced in R2026b