I'm having some trouble figuring out how to properly encapsulate binary STLs. Every time I've tried to open a DICOM encapsulated binary STL that I've created, I get errors suggesting there is something wrong with the encapsulated data.
In C#, I've generally opened files and written them to byte arrays to then store as the encapsulated document. [0] This has worked well for ASCII OBJ and STL files, but does not work as intended for binary STLs. Am I missing a critical step in the encapsulation process?
[0]
https://docs.microsoft.com/en-us/dotnet/api/system.io.file.readallbytes?view=net-6.0