Git Product home page Git Product logo

lazyphysicist's Introduction

LazyPhysicist

WARNING! THE PROJECT IS UNDER DEVELOPMENT! Use in the clinic at your own risk!

Hello, ESAPI!

This project is designed to make it easier to solve our daily tasks in radiotherapy planning. And also for practice in C# programming.
There are several ideas for future projects based on my vision of simplifying the planning process. There are no comments and unit tests yet, but I hope everything will be.

Check out what's already done ↓ and stay tuned ;)

LazyOptimizer —

is a plugin that helps to fill the plan optimizer based on the user's previously created plans. Plan data is taken from the SQLite database, which is filled in by the PlansCache app.
Optimizer templates are not lazy enough.
The selection of a suitable plan is based on the number of fractions, single dose, treatment machine, technique and, most importantly, patient's structures.

— Why not objective templates? you may ask.
Because they need to be updated quite often, removing irrelevant ones if your planning skills change. With this plugin, this is not necessary.
You just make your plans and they will always be up to date for reuse. Also, templates don't always match structures so well.

How LazyOptimizer works

Using LazyOptimizer

Standard workflow:

  • Create a plan, add fields
  • Run the plugin
  • Choose a plan from those offered
  • Click the "Load into plan" button

More details:

First you need to compile and add the script from LazyPhysicist\bin\release to Eclipse from Tools > Scripts menu.
The plugin can be on the local network, as the user settings and database will be initially stored in the local folder %APPDATA%\LazyOptimizer.
You can change the general user path in the _GeneralSettings.xml file that will be created on first run in the plugin path. Or add it manually. File example
This can be a network path, but users must have write access.
There will be no conflicts in user files.

You also need to install the .NET Framework 4.8 Runtime on your clinical workstations.

Scripts to be approved in Tools > Script Approvals...

  • LazyOptimizer.esapi
  • PlansCache.exe
  • ESAPIInfo.esapi

Create the plan you are going to calculate, add the fields and run this plugin.

At the first start, it is necessary to fill the database with previous plans in the Check Previous Plans tab.
The first launch can be long, as all plans for all patients are checked (about a couple of minutes per thousand patients).
It is possible to limit the number of years for the creation date of patients.
Only the current user's plans (as accurate as possible) are written to the database. On next launches, only new patients will be checked.

If plans are found that match the current plan, they will be shown in the list. Plan Selection Criteria:

  • The number of factions matches
  • Same dose per fraction
  • Similar set of structures
  • Optionally the same Treatment Machine and Technique
  • Optionally selected Approval Statuses (check the Settings tab)

You can also star your favorite plans and filter them.

Choose the plan that suits you, match the structures if there are inaccuracies.
Structures are matched using the Levenshtein algorithm, the names of the structures do not have to be exactly the same.
If no match is found for a structure, then you can double-click on the structure in the list of undefined structures.
The best match will be found in other plans and added.

If you see the ! in front of a structure, then the current plan target doesn't match the selected structure.

There is one more option - Merging the structures of several plans, and averaging the doses, priorities and EUD A parameters in the structures. Activate this mode in the settings if you want to use it.

You can override the objective priorities for all OARs by clicking the buttons:

  • =0 — set to zero
  • As Is — as in the plan from the database
  • Set — its value in the field next

Check or uncheck the box for adding NTO.

Remove current plan objectives if needed.

Add objectives to the plan by clicking the Load into plan button.

PlansCache —

is a standalone console app that fill the SQLite database for LazyOptimizer plugin.

How PlansCache works

FieldIdAsGantry

Well, why not write own plugin for changing field IDs? Here it is.

It's simple:
If the beam is static, then the gantry angle will be record.
If not, then CW or CCW.

If the angles are repeated, then the postfix ".number" wil be added.
The plugin is independent.

How FieldIdAsGantry works

PluginTester —

is an app that can run and debug plugins. For this, the plugins available here are a little prepared.

They have a class PluginTesterInitializer of the same kind, for example here and here.
The PluginTester needs this class to exist and needs the plugin project to be included in the references.

Tested in ESAPI Versions

  • 15.6
  • 16.1

lazyphysicist's People

Contributors

alexandervahner avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chenmi0201

lazyphysicist's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.