Skip to content

Interprets trajectorylog binary files into .NET class specifications.

License

Notifications You must be signed in to change notification settings

WUSTL-ClinicalDev/TrajectoryLog.NET

Repository files navigation

TrajectoryLog.NET (TrajectoryLog "dot" NET)

Summary

API Methods

  • EnableDebug: Writes additional log files through the console to assist in debugging the application when loading and interpreting Trajectory Logs.
  • DisableDebug: Turns off the Debug messages from the API.
  • LoadLog: Reads the file presented to the method and inteprets it to a TrajectoryLogInfo class object.
  • ToCSV: Export Trajectory Log to CSV file.
  • BuildFluence: Generates a 1mm resolution fluence image based on MLC positions. Inputs for MLCString include Expected or Actual.
  • PublishPDF: Generates a simple PDF report of a Trajectory Log file.

Description

Prior to using the TrajectoryLog.NET API, clone the code from this repository and compile using the same .NET Framework version as your ESAPI version (if intended to be used alongside ESAPI). Add the using directive for TrajectoryLog.NET

using TrajectoryLog.NET;

Note: Nuget packages specific to ESAPI versions for TrajectoryLog.NET to be available soon

LoadLog

This method shows how to interpret the Trajectory Log.

OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Trajectory Log File (*.bin)|*.bin";
TrajectoryAPI.EnableDebug();
TrajectorySpecifications.TrajectoryLogInfo localLog = null;
if(ofd.ShowDialog() == true)
{
  localLog = TrajectoryAPI.LoadLog(ofd.FileName);
}

BuildFluence

This method returns a matrix with pixel values relative to the amount of MU delivered to open leaf segments

double[,] actualFluence = TrajectoryAPI.BuildFluence(localLog, "Actual");
double[,] expectedFluence = TrajectoryAPI.BuildFluence(localLog,"Expected");

Items of Note

  • The fluence resolution is 1mm.
  • The fluence resolution does not currently consider the position of any collimating jaws. Fluence shows leaf openings behind jaws
  • Rounding of positions could lead to a single vertical line where the leaf meeting point is (even if behind the jaws).

ToCSV

This method will export a CSV to a user specified location.

Console.WriteLine("Do you want to write .csv? (y/n)");
if (Console.ReadLine().Trim().Equals("y",StringComparison.OrdinalIgnoreCase))
{
  TrajectoryAPI.ToCSV(localLog);
}

The CSV file export will open a SaveFileDialog for the user to select their own save location for CSV. CSV Example

PublishPDF

TrajectoryAPI.PublishPDF(localLog);

PDF Example

For any questions or issues, please note them through Github features or send to matthew.schmidt@wustl.edu.

About

Interprets trajectorylog binary files into .NET class specifications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages