You are here: The SDK Classes > The MG4PointReader Class

## The MG4PointReader Class

The MG4PointReader class is the class that you will use to enable your application to read LiDAR-based MG4 files. MG4PointReader is a concrete implementation of the PointSource class (see "The PointSource Class").

###### Opening an MG4 File

There are two methods of opening an MG4 file:

- init() with an IO object
- init() with a file name

The first is the preferred method; create a FileIO object for the file name and then pass the FileIO object to MG4PointReader::init()(see "The IO Classes").

The second method takes a string for the file name.

NOTE: The string used in the second method is a native codepage string, which is much simpler to use for testing but can cause problems if you can't represent the file path in the codepage.

For an example of MG4PointReader class usage, see "Code Examples".