OpenwaterHealth / OpenLIFU-python

focused ultrasound toolbox
GNU Affero General Public License v3.0
8 stars 2 forks source link

Support serialization for Protocols and Transducers (#85) #86

Closed ebrahimebrahim closed 3 weeks ago

ebrahimebrahim commented 3 weeks ago

Close #85

I see there is a custom JSONEncoder in openlifu.util.json, and I considered adding functionality there or re-using that in some way. But I opted not to because there isn't an openlifu-wide consistent method of serializing and deserializing to files; we are currently a bit all over the place with some classes doing their own thing and other classes using openlifu.util.json. So for now I'd rather just have Protocol and Transducer define their own personal serialization functions so that we can use them in SlicerOpenLIFU, and then later if there is interest we can revamp the serialization functionality across all of openlifu to be a bit more streamlined and consistent.