Code covered by the BSD License  

Highlights from
VMAT QA

image thumbnail

VMAT QA

by

 

10 Apr 2013 (Updated )

Analyzes VMAT quality assurance EPID images for routine Varian linac QA.

LoadOrSetPref(preferencegroup,preference,default,isGUIobject,handlesob)
function [prefval] = LoadOrSetPref(preferencegroup,preference,default,isGUIobject,handlesob)

if isGUIobject
    style = get(handlesob,'Style');
    switch style
        case 'edit'
            tag = 'String';
        case 'checkbox'
            tag = 'Value';
        case 'text'
            tag = 'String';
    end
end

if ispref(preferencegroup,preference)
    prefval = getpref(preferencegroup,preference);
    if isGUIobject
        set(handlesob,tag,prefval)
    end
else
    prefval = default;
    if isGUIobject
        set(handlesob,tag,default)
    end
end

Contact us