This page details the objects that are created when a QAMgr object is created and its .run() method is called. You should not need to access these unless you are experiencing errors.
from qamgr import *This loads the qamgr package.
Note: The first time you import qamgr after installing or updating on Windows, you may see some warnings about escape sequences. These can be safely ignored.
You can specify a DICOM RTPLAN file manually by either typing or pasting it in place of <FILENAME>:
q = QAMgr('<FILENAME>')Alternately, you can choose from a list of files by simply creating the QAMgr object without and argument:
q = QAMgr()In either case, calling the QAMgr constructor prompts the user for their initials, then loads the DICOM file and extracts the needed information.
It also prints some basic information about what it found in the DICOM file; you can see this information again at any time by calling q.info().
The main object qamgr.QAMgr and its successive child objects are structured and retrieved as follows (with duplicate references excluded):
QAMgr # q = QAMgr()
├── Patient # pat = q.patient
│ ├── RTPlan # rtp = pat.rtplan
│ └── dcinfo # dci = pat.dcinfo
├── OSInfo # osi = q.os_info
│ ├── MountedDrive0 # md0 = osi.<DRIVE_LETTER_0>
│ ├── MountedDrive1 # md1 = osi.<DRIVE_LETTER_1>
│ └── (etc...) # # as above
└── QAStatusMonitor # qas = q.status_monNote: The dcinfo object is an instance of the class pydicom.dataset.FileDataset.
You can print summary information at any time using the .info() method, which is shared by all of the following objects:
QAMgr, Patient, RTPlan, OSInfo, MountedDrive, and QAStatusMonitor.
The only immediate missing object is QAMgr.Patient.dcinfo, since it is from the pydicom package. However, its top-level information can be summarized by calling the print function on the dataset object’s .top() method. For convenience, all of the mentioned information methods are illustrated in the example below:
from qamgr import * # import module(s)
q = QAMgr() # create QAMgr object
q.info() # print summary for QAMgr
pat = q.patient # retrieve Patient object
pat.info() # print summary for Patient
rp = pat.rtplan # retrieve RTPlan object
rp.info() # print summary for RTPLAN
dc = rp.dcinfo # retrieve pydicom dataset object
print(dc.top()) # print summary for pydicom dataset
osi = q.os_info # retrieve OSInfo object
osi.info() # print summary for OSInfo
L = osi.L # retrieve MountedDrive object for drive 'L:' (Windows) or '/mnt/l' (Mac/Linux)
L.info() # print summary for drive L
sm = q.status_mon # retrieve QAStatusMonitor object
sm.info() # print summary for QAStatusMonitorWhen QAMgr.run() is called, it executes a sequence of steps. These can be called individually if needed as follows:
from qamgr import *
q = QAMgr()
q.create_subdirs()
q.create_spreadsheet()
q.start_2dc()
q.prepare_report()
q.info()
q.status('nodrives')Please see the Python help for the class (via “help(q)”) and the individual functions (via “help(q.create_subdirs)”, “help(q.create_spreadsheet)”, etc.) for further information.