Add toJSON back to image filters
Add toJSON to unit tests