setFileOptions: Sets File Options

Description Usage Arguments Details Value See Also

View source: R/utils.R

Description

Set file options (opening and saving) for digitMesh.character.

Usage

1
2
setFileOptions(M, sdir=getwd(), patt=".ply", deci.suffix=NULL, deci.dir="DecimMesh",
               saveTPS="", overwrite=FALSE , append=FALSE)

Arguments

M

A character value indicating either a mesh filename (with extension) contained in sdir, or a subdirectory name (not a path) contained in sdir in which a set of mesh files should be processed for digitization.

sdir

A character value indicating the path for the directory containing either the mesh to digitize or the subdirectory containing the mesh files to digitize.
Default: getwd() => working directory.

patt

A character value within {".ply",".stl"} indicating the kind of mesh file to open.
Default: ".ply".

deci.suffix

A character value indicating the suffix added (or to add) at the end of the decimated mesh filenames and before the exension.
Default: NULL.

deci.dir

A character value indicating the name of the subdirectory in M where the decimated mesh will be saved or extracted. By default, deci.dir is set to "DecimMesh", meaning that a subdirectory named "DecimMesh" will be automatically created within M (if it doesn't exist yet).

saveTPS

Either a character value indicating the name (with extension) for the TPS filename to export landmark coordinates, or a FALSE value if user don't want save coordinate. The TPS file will be saved within the directory specified by M.
Default: "" indicates that the tps filename will be set depending on the processed mesh or directory (M).

overwrite

A logical value taking values within {TRUE,FALSE} indicating if the TPS file shoud be overwritten if the provided filename already exists.
Default: FALSE => will generate an error if the file aready exists...

append

A logical value taking values within {TRUE,FALSE} indicating if the landmark coordinates should be appended in the TPS file (it could be the case when user need to digitize a set of meshes in several session but want to store all results in the same file).
Default: FALSE.

Details

This function allows user to set several parameters for mesh file opening and saving as well as TPS export needed during the call of digitMesh.character. With no arguments, this function returns the default settings for file options. Any of those options can be modified by setting new values for the corresponding arguments. Non-filled arguments will be set to default. Ill-filled arguments will return errors or warnings.

Depending on the user choice to perform the mesh decimation either during the mesh digitization, or to use already decimated meshes, the options linked to the decimated mesh (deci.suffix, deci.dir) will concern either the saving of those meshes, or their opening.

Additionnally to the provided parameters, this function will return the information of the directory containing the full mesh(es) as well as the filename(s) of full mesh(es) to treat.

Value

A list of those parameters plus the information of the directory containing the full mesh(es) ( full.dir, as a character value) and the filename(s) of full mesh(es) to treat (full.files as a character vector).

See Also

setDecimOptions, setGraphicOptions, setTemplOptions.


morphOptics/digit3DLand documentation built on July 17, 2021, 8:27 p.m.