How does 3D Slicer load png sequence and export mha data

I am developing PlusLib and trying to make a certain interface for offline ultrasound image sequence reconstruction. I’m wondering which part of PlusLib does 3D Slicer use to read png sequences of ultrasound image, and export mha output. Great thank!