mghro / rad-collision

Platform for collision detection during treatment planning in radiotherapy
GNU General Public License v3.0
32 stars 13 forks source link

mismatch of couch angle naming convention #18

Closed ferdymercury closed 4 years ago

ferdymercury commented 4 years ago

luke found that in proton therapy, there script crashes when clicking on check beamset. Apparently proton RTplans have a CouchAngle rather than a CouchRotationAngle.

Error: Unhandled Exception: System.InvalidOperationException: Object has no member 'CouchRotationAngle'.
Error:    at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value)
Error:    at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Run(InterpretedFrame frame)
Error:    at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception)
Error:    at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
Error:    at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
Error:    at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0)
Error:    at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
Error:    at _Scripting_(Object[] , Object )
Error:    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
Error:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
Error:    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
Error:    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
Error:    at System.Threading.ThreadHelper.ThreadStart(Object obj)
jmartens commented 4 years ago

That is not true, this member has changed name as of RayStation 9B, since 9B it is CouchRotationAngle, before it it CouchAngle. AFAICT is has nothing to do with which modality you are using, only the RayStation version and it's implementation.

jmartens commented 4 years ago

You can confirm this by examining the Scripting Guideline section 5 Example of a recorded script, it is changed there as well.

ferdymercury commented 4 years ago

Good point! So it was a confounding factor that my dataset on 10A was photons and his dataset on 8B was protons. I will amend the documentation.

lukejamesmurray commented 4 years ago

We are 9A here, good spot @jmartens