Description Usage Arguments Details Value See Also Examples
Add or replace lines in the header of a nrrd file
1 2 | AddOrReplaceNrrdHeaderField(infile, outfile, newfields, Force = FALSE,
Detached = FALSE, action = c("addreplace", "addonly", "replaceonly"))
|
infile |
Path to input file |
outfile |
Path to output file |
newfields |
Named character vector of fields to replace (see details) |
Force |
Overwrite existing file (default FALSE) |
Detached |
Write a detached header insted of a nrrd (default FALSE) |
action |
addreplace (Default) addonly or replaceonly |
Input is a named vector of new fields. Use unnamed fields for comments. Quote field names with spaces (conventionally with back ticks). Note that this function will error out for invalid field names. See http://teem.sourceforge.net/nrrd/format.html for nrrd field details
Note that newfields
should specify the complete replacement line as
a string (not the individual values for fields containing multiple
elements) without the leading field name (see examples).
TRUE or FALSE depending on success
1 2 3 4 5 | ## Not run:
AddOrReplaceNrrdHeaderField(lhmaskfile,outfile=file.path(tmpdir,"LHMask.nrrd"),
c("# My interesting comment",`space origin`="(2,2,2)"),Force=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.