niimath and fslmaths: replication as a method to enhance popular neuroimaging tools
Rorden C., Webster M., Drake C., Jenkinson M., Clayden JD., Li N., Hanayik T.
Neuroimaging involves the acquisition of extensive 3D images and 4D time series data to gain insights into brain structure and function. The analysis of such data necessitates both spatial and temporal processing. In this context, “fslmaths” has established itself as a foundational software tool within our field, facilitating domain-specific image processing. Here, we introduce “niimath,” a clone of fslmaths. While the term “clone” often carries negative connotations, we illustrate the merits of replicating widely-used tools, touching on aspects of licensing, performance optimization, and portability. For instance, our work enables the popular functions of fslmaths to be disseminated in various forms, such as a high-performance compiled R package known as “imbibe”, a Windows executable, and a WebAssembly plugin compatible with JavaScript. This versatility is demonstrated through our NiiVue live demo web page. This application allows ‘edge computing’ where image processing can be done with a zero-footprint tool that runs on any web device without requiring private data to be shared to the cloud. Furthermore, our efforts have contributed back to FSL, which has integrated the optimizations that we’ve developed. This synergy has enhanced the overall transparency, utility and efficiency of tools widely relied upon in the neuroimaging community.