LabKit MATLAB Workbench

reference

API ReferenceImage API

labkit.image.displayName

Return a short image-file display name.

Syntax

name = labkit.image.displayName(pathValue)

Description

Removes the folder portion of one path and returns the final filename with its extension. The function performs text processing only; the path does not need to exist. If fileparts cannot derive a filename, the trimmed input text is returned.

Inputs

pathValue
Character vector, string scalar, or another value convertible to one string scalar.

Outputs

name
String scalar containing the filename and extension.

Errors

labkit:image:InvalidPath
pathValue converts to more than one string.

Example

name = labkit.image.displayName(fullfile("images", "frame01.tif"));

Source

This page is generated from the MATLAB help text in +labkit/+image/displayName.m.