read_segment_definitions function

Read Segment Definitions from Excel File

Read Segment Definitions from Excel File

Reads an Excel file defining the markers in each segment and creates a list suitable for use with plot_chest_3d and calculate_segment_volumes functions.

read_segment_definitions(filepath)

Arguments

  • filepath: A string specifying the path to the Excel file containing segment definitions.

Returns

A named list where each element is a character vector of marker names defining a segment.

Details

The Excel file should have a specific format:

  • Each row represents a segment.
  • The first column contains the segment names.
  • Subsequent columns contain the marker names belonging to each segment.

Missing marker entries can be left blank or filled with NA.

Examples

# 'segment_def.xlsx' is the Excel file with segment definitions path <- system.file("extdata", "segment_def.xlsx", package="ChestVolume") segments <- read_segment_definitions(path) head(segments)
  • Maintainer: Wai-Hang Kwong
  • License: MIT + file LICENSE
  • Last published: 2025-01-24

Useful links