Anonymizing raw data (rda, twix)

Hello everyone,

I need to share some raw data and was wondering if there is a way to anonymize them without converting to Nifti.

Thank you in advance!

We have a few MATLAB functions for TWIX data in this GitHub repo.

I don’t have anything for RDA - since these are basically just text files, you should be able to open them with any editor like VS Code. There’s also a script on MATLAB File Exchange, but it’s 10 years old and who knows whether it works with newer RDA data.

1 Like

Thank you so much @admin for sharing those scripts. Another question, do you know how can I reduce the size of a Twix file to be used as testing data on GitHub? I need only voxel position info on that and it’s important to be in .dat extension.

It’s not possible to “reduce” an existing Twix file, while keeping it as a valid Twix file… fiddling with the data format would mean it’s no longer a reliable, representative case to use as test data. I would think the best solution would be just to take a short acquisition (low number of repetitions, maybe a limited number of coil elements).

In principle, most of the header information is at the beginning of the file, so in certain limited cases you might get away with truncating after the header.

If your main concern is avoiding a bloated git repository, why not use something like git LFS?

1 Like

@Behrouz ,

The best strategy I’ve found (for the spec2nii testing data) is to acquire a specific dataset. If you are just interested in the orientation/position information, then you can turn the spectral resolution to minimum, set the number of averages to 1 and acquire using a single volume coil (rather than 32/64). You will probably find that this makes the data a few MB or smaller.

1 Like

Thank you @alex and @wclarke for your suggestions. I agree that acquiring data with minimum averages and coil elements would definitely work.