File: minc_modify_header.man1

package info (click to toggle)
minc 2.1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,160 kB
  • sloc: ansic: 82,507; sh: 10,666; yacc: 1,187; perl: 612; makefile: 586; lex: 319
file content (99 lines) | stat: -rw-r--r-- 3,865 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.\"                                      Hey, EMACS: -*- nroff -*-
.\" Copyright 1995 Peter Neelin, McConnell Brain Imaging Centre,
.\" Montreal Neurological Institute, McGill University.
.\" Permission to use, copy, modify, and distribute this
.\" software and its documentation for any purpose and without
.\" fee is hereby granted, provided that the above copyright
.\" notice appear in all copies.  The author and McGill University
.\" make no representations about the suitability of this
.\" software for any purpose.  It is provided "as is" without
.\" express or implied warranty.
.\"
.\" $Header: /private-cvsroot/minc/progs/minc_modify_header/minc_modify_header.man1,v 6.4 2004-05-25 21:33:11 bert Exp $
.\"
.TH MINC_MODIFY_HEADER 1 "$Date: 2004-05-25 21:33:11 $" "" "MINC User's Guide"

.SH NAME
minc_modify_header - modify the attributes in the header of a minc file

.SH SYNOPSIS
.B minc_modify_header
[<options>] <file>.mnc

.SH DESCRIPTION

\fIMinc_modify_header\fR allows the modification, insertion or
deletion of attributes in a minc file. If possible, the file is
modified in place, without copying the data. This will happen when
inserting (modifying) an attribute that already exists and that ends
up being the same length or shorter in the new file. 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.

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"). 
The new file will not be re-compressed.

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.

.SH OPTIONS
Note that options can be specified in abbreviated form (as long as
they are unique) and can be given anywhere on the command line.
.TP
\fB\-sinsert\fR \fIvar:attr=value\fR
Insert a string attribute into the header. If the attribute does not
exist or the new string is longer than the existing one, then all data
in the file will be copied.
.TP
\fB\-sappend\fR \fIvar:attr=value\fR
Similar to \fB\-sinsert\fR, but appends the string to the attribute's
value.  If the attribute already exists it must be of string type.
.TP
\fB\-dinsert\fR \fIvar:attr=value(,...)\fR
Insert a double precision attribute into the header. If the attribute
does not exist or the new attribute is longer than the existing one,
then all data in the file will be copied. A comma-separated array of
values can be specified.
.TP
\fB\-dappend\fR \fIvar:attr=value(,...)\fR
Similar to \fB\-dinsert\fR, but appends the list of double precision 
values to the attribute's value.  If the attribute already exists it 
must be of double precision type.
.TP
\fB-delete\fR \fIvar:attr\fR
Delete an attribute from the header. USE OF THIS OPTION WILL FORCE A
COMPLETE COPY OF ALL DATA TO BE MADE. Use \fB-sinsert\fR with an empty
string to delete information without copying data (the attribute will
continue to exist).
.TP
\fB-help\fR
Print summary of command-line options and exit.
.TP
\fB\-version\fR
Print the program's version number and exit.

.SH EXAMPLES:
.PP
To replace the patient name with an identifier string:
.IP
minc_modify_header file.mnc -sinsert 'patient:full_name=C02-F0023'
.PP
To delete the patient name completely (forcing a copy of all data):
.IP
minc_modify_header file.mnc -delete 'patient:full_name'
.PP
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):
.IP
minc_modify_header file.mnc -sinsert 'patient:full_name='

.SH AUTHOR
Peter Neelin

.SH COPYRIGHTS
Copyright \(co 1995 by Peter Neelin