MINC_MODIFY_HEADER(1)
π minc_modify_header β the MINC User's Guide glow-up edition π
okay bestie, buckle up, because this is the little tool that lets you poke at the header of a minc file. yes, just the header. the vibes. the metadata. the β¨attributesβ¨. and it's from the MINC User's Guide, so you know it's legit.
β¨ NAME β¨
minc_modify_header β modify the attributes in the header of a minc file π
πΈ SYNOPSIS πΈ
minc_modify_header [<options>] <file>.mnc
π DESCRIPTION π
So like, minc_modify_header lets you modify, insert or delete attributes in a minc file. and here's the tea: if possible, the file is modified in place, without copying the data. no cap. π₯
That in-place magic happens when you're inserting (modifying) an attribute that already exists and that ends up being the same length or shorter in the new file. slay, efficient.
But if an attribute is deleted or lengthened? π then a complete copy of the data is made, resulting in a completely new file that replaces the original. it's giving "new phone who dis" but for files.
If the file is compressed, then it is first decompressed into a file whose name is either the same as that of the original file up to the ".mnc" extension, or the same minus the compression extension (".bz", ".bz2", ".gz", ".Z", ".z" or ".zip"). and bestie, listen: the new file will not be re-compressed. she's staying decompressed, periodt. π
Care is taken to completely overwrite any existing attribute when inserting a new attribute, so that information is guaranteed to be removed from the file. we do not leave ghost data. we are thorough. π
π OPTIONS π
heads up gorgeous: options can be specified in abbreviated form (as long as they are unique) and can be given anywhere on the command line. yes, anywhere. she's flexible. π
-sinsert var:attr=valueβ insert a string attribute into the header. if the attribute doesn't exist, or the new string is longer than the existing one, then all data in the file will be copied. (copy time, bestie π«Ά)-sappend var:attr=valueβ basically-sinsert's sister, but she appends the string to the attribute's value. if the attribute already exists, it must be of string type. no exceptions. π-dinsert var:attr=value(,...)β insert a double precision attribute into the header. if the attribute doesn't exist, or the new attribute is longer than the existing one, then all data in the file will be copied. you can also pass a comma-separated array of values. go off. π₯-dappend var:attr=value(,...)β like-dinsertbut she appends the list of double precision values to the attribute's value. if the attribute already exists, it must be of double precision type. respect the type, babes.-delete var:attrβ delete an attribute from the header. π¨ USE OF THIS OPTION WILL FORCE A COMPLETE COPY OF ALL DATA TO BE MADE. like, the whole thing. every byte. π¨ use-sinsertwith an empty string instead to delete the information without copying data (the attribute will continue to exist, it's just... empty. ghost attribute energy π»).-helpβ print a summary of the command-line options and exit. your little cheat sheet. π-versionβ print the program's version number and exit. iykyk. β¨
π¦ EXAMPLES: π¦
1. to replace the patient name with an identifier string:
minc_modify_header file.mnc -sinsert 'patient:full_name=C02-F0023'
2. to delete the patient name completely (forcing a copy of all data):
minc_modify_header file.mnc -delete 'patient:full_name'
3. to hide the patient name without copying data, assuming that we know that the attribute exists (the attribute will remain in the file, but it will be empty):
minc_modify_header file.mnc -sinsert 'patient:full_name='
look at that last one. empty string. stealth mode. π iconic behavior honestly.
π AUTHOR π
Peter Neelin β the main character who wrote this. respect. π«Ά
π COPYRIGHTS π
Copyright Β© 1995 by Peter Neelin
okay that's the whole page bestie, you're fully caught up. πβ¨
and for the cute sign-off: this little legend comes from the MINC User's Guide, rocking the date stamp $Date: 2004-05-25 21:33:11 $ β so yes, she's an elder icon, a vintage queen, and she still slays. ππ
π
π¦ where this page comes from
- debian bookworm: minc-tools 2.3.00+dfsg-10 Β· as_is
- debian trixie: minc-tools 2.3.00+dfsg-12 Β· as_is
- nixpkgs unstable: minc-tools 2.3.06-unstable-2024-11-28
- ubuntu jammy: minc-tools 2.3.00+dfsg-8 Β· as_is
- ubuntu noble: minc-tools 2.3.00+dfsg-10build2 Β· as_is
- ubuntu questing: minc-tools 2.3.00+dfsg-12
- ubuntu resolute: minc-tools 2.3.00+dfsg-15 Β· NTP
- ubuntu stonking: minc-tools 2.3.00+dfsg-17 Β· NTP
- Copyright 1995 Peter Neelin, McConnell Brain Imaging Centre
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms