Skip to content

Save the command used to generate a file in the output header #183

@draffelt

Description

@draffelt

We could even propagate the commands saved in the input images to the output images, such that each file has a history of where it came from.

By saving absolute file paths in combination with the git hash (see #111), a record of exactly how the file was generated would exist. We could add a -history option to mrinfo to dump what is effectively a bash script, so then you could re-run the analysis if code or the input images are changed. Since some files may have common ancestors, we could even have a dedicated mrtrix command called 'regenerate', that takes multiple input files, reads their history, removes any duplicate commands, and re-runs the analysis.

This would also serve as a great tool for making backups of what you did, without having to store duplicate copies of all images.

As Thijs raised, the only concern with absolute paths is that sensitive information might be saved in files (such as a persons username or patient names if the parent folder is labelled as such)

Of course if files are moved after they are created then this will also be an issue. But the history 'script' could easily be modified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions