Plexon has a C++ SDK which I was toying around with because all Plexon software including the Matlab API is Windows only, and all of our analyses run on 64-bit Ubuntu. So I figured the command line version of the .plx reader could be modified to run on Linux and suit our needs. Surprisingly, this is pretty easy:
- In Plexon.h, remove all references to the Windows API.
- This is the hard part to figure out: in Plexon.h, in the definition of struct PL_DataBlockHeader, change unsigned long TimeStamp to unsigned int TimeStamp. A long is 8 bytes in 64-bit Linux g++ but 4 bytes in MSVC, so as is the file reader will read too many bytes per data block and then the data won’t be aligned anymore and it will crash.
- In plxread.cpp, #define LONGLONG long or #define LONGLONG int64_t
- Compile with g++
- If g++ bothers you about *printf, change %I64 tokens to %ld.
It should work as is. This also works for Mac. See here for an example of how you can use the SDK to process .plx files on non-Windows OS. Alternative approaches to reading .plx files in Linux include using Python with OpenElectrophy and the FieldTrip toolbox in Matlab.