R/skel.R
skeletonise_nrrds.Rd
Skeletonise NRRD images (e.g. to make them suitable for NBLAST)
skeletonise_nrrds( input, outdir, threshold = 0, threshold.first = FALSE, fileregex = NULL, DryRun = TRUE, ... )
input | Path to single input file or an input directory |
---|---|
outdir | Path to output directory |
threshold | Integer specifying an absolute threshold or string specifying ImageJ authothreshold method. |
threshold.first | Whether to threshold the image before rescaling. This
is a good idea if you have mask images (especially 0-1 masks) as your
input. (default: |
fileregex | Optional regex matching the whole of the filename (NB just filename without parent directory) |
DryRun | Show what would happen but don't run (default TRUE) |
... | Additional arguments passed to |
Logical indicating if the command completed successfully
if (FALSE) { # basic version skeletonise_nrrds('/path/to/indir', '/path/to/outdir') # convert those to dotrops for NBLAST dps=dotprops(dir('/path/to/outdir', pattern='nrrd$', full.names=TRUE)) # additional arguments skeletonise_nrrds('/path/to/indir', '/path/to/outdir', threshold='Iso_Data') skeletonise_nrrds('/path/to/indir', '/path/to/outdir', fileregex='^seg_whole.*c0\\.nrrd') }