Learn R Programming

DVHmetrics (version 0.2)

readDVH: Read DVH text files

Description

Reads single or multiple DVH text files as exported from Varian Eclipse(TM), CadPlan(TM), MasterPlan(TM), or Pinnacle3 (TM). Supports cumulative and differential DVHs.

Usage

readDVH(x, type=c("Eclipse", "Cadplan", "Masterplan", "Pinnacle"),
        planInfo=FALSE, add)

Arguments

x
character vector giving paths to DVH text files. May contain globbing symbols understood by Sys.glob. If missing and in interactive mode, readDVH opens a file selector widget.
type
character string. Indicates which program the DVH text files were exported from. Supported: "Cadplan" (tested with version 6.4.7), "Eclipse" (tested with versions 10-13), "Masterplan" (tested with versio
planInfo
Experimental: Either FALSE or character string. In the latter case, readDVH tries to extract additional information from the Plan field in the DVH file, e.g., the prescription dose for a sum plan or the
add
DVHLstLst object. Existing object that should be merged with the new data from the files.

Value

  • Returns an object of class DVHLstLst. This is a list (one component with class DVHLst for each original file from one patient) of lists (each component is an object of class DVHs). A DVHs object is a list with the following components: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

item

Directory: Data:
  • Info.csv(variables"Filename","RegionOfInterestName","DoseMin cGy","DoseMax cGy","DoseMean cGy","Volume ccm")
DVH1.csv, DVH2.csv, ... - the actual DVH data files with names defined in Info.csv variable "Filename". They should look like NumberOfDimensions = 2; NumberOfPoints = 431; Points[] ={ 0,0 10,0 ... 4000,100 };

Details

Absolute dose values need to be given in Gy or cGy, absolute volume values in cm^3. Differential DVHs are automatically converted to cumulative DVHs, but the differential DVH information is kept. Sum plans are supported. Pinnacle3 files have to be exported using its own scripting facility such that information from one patient is contained in one directory. The directory layout for one patient has to be as follows (experimental, likely to change in future versions):
  • Files (CSV format with column headers):
    • DoseInfo.csv(variables"PrescriptionDose cGy","NumberOfFractions","Dosis cGy")
  • PatInfo.csv(variables"LastName","FirstName","MedicalRecordNumber")
PlanInfo.csv (variable "PlanName")

See Also

Sys.glob, print.DVHs, showDVH, getMetric, checkConstraint

Examples

Run this code
# pick DVH files interactively
res <- readDVH()
res

# read all txt files in subdirectory DVH
res <- readDVH("DVH/*.txt", type="Eclipse")
res

Run the code above in your browser using DataLab